@font-face {
  font-family: "Fraunces";
  src: url("vendor/fonts/fraunces-latin-full-normal.woff2") format("woff2-variations"),
       url("vendor/fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("vendor/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"),
       url("vendor/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0B1330;
  --night-deep: #070C22;
  --night-band: #111A3E;
  --gold: #F0B95B;
  --gold-hi: #F7CC7E;
  --gold-press: #D99F42;
  --cream: #F6EDD9;
  --paper: #EBDDBC;
  --fold-a: #F6EDD7;
  --fold-b: #EFE2C3;
  --ink: #17183A;
  --ink-hi: #2B2D62;

  --vanilla: #A97A2C;
  --berry: #9C2C5E;
  --caramel: #BD6619;
  --cocoa: #6E3B24;
  --flavor: var(--vanilla);
  --vanilla-hi: #F4DDA6;
  --berry-hi: #E0528A;
  --caramel-hi: #E59A3A;
  --cocoa-hi: #A9673F;

  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --t-display: clamp(50px, 6.6vw, 112px);
  --t-head: clamp(40px, 4.6vw, 72px);
  --t-statement: clamp(22px, 1.9vw, 30px);
  --t-body: 18px;
  --t-small: 14px;

  --gutter: clamp(20px, 4.45vw, 64px);
  --bar-h: 68px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.chart-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 480;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--gold); color: var(--night); padding: 12px 18px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.statement {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 380;
  font-size: var(--t-statement);
  line-height: 1.3;
}
.small { font-size: var(--t-small); line-height: 1.5; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 30px;
  border: 0; border-radius: 999px;
  font-family: var(--f-body); font-size: 17px; font-weight: 650; letter-spacing: .005em;
  cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, transform .15s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-gold:active { background: var(--gold-press); }
.btn-ink { background: var(--ink); color: var(--fold-a); }
.btn-ink:hover { background: var(--ink-hi); }
.btn-ink:active { background: #0C0D26; }
.btn-ink:focus-visible { outline-color: var(--ink); }
.btn-star { width: 20px; height: 20px; fill: currentColor; transition: transform .5s var(--ease); }
.btn:hover .btn-star { transform: rotate(45deg) scale(1.1); }

.btn-text {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 6px;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
  font-size: 17px; font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color .2s ease, transform .15s ease;
}
.btn-text svg { width: 20px; height: 20px; flex: none; }
.btn-text:hover { text-decoration-color: currentColor; }
.btn-text:active { transform: translateY(1px); }
.btn-text:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Header */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--gutter);
  background: var(--night);
}
.wordmark {
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 28px; font-weight: 560; letter-spacing: -.01em;
  text-decoration: none; margin-right: auto; border-radius: 6px;
}
.bar-nav { display: flex; gap: 28px; }
.bar-nav a, .list-link {
  font-size: 16px; font-weight: 550;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px;
  text-decoration-color: transparent;
  padding: 8px 2px; border-radius: 6px;
  transition: text-decoration-color .25s ease;
}
.bar-nav a:hover, .list-link:hover { text-decoration-color: currentColor; }
.bar a:focus-visible, .list-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.list-link { display: inline-flex; align-items: center; gap: 10px; }
.list-count {
  display: inline-grid; place-items: center;
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: var(--gold); color: var(--night);
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: transform .3s var(--ease);
}
.list-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }
.list-link:active { transform: translateY(1px); }

/* Hero */
.hero {
  position: relative;
  min-height: max(100svh, 680px);
  display: flex; align-items: center;
  padding: calc(var(--bar-h) + 40px) var(--gutter) 64px;
  overflow: hidden;
  isolation: isolate;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-copy { position: relative; max-width: 46vw; }
.hero h1 {
  font-size: var(--t-display);
  line-height: .96;
  letter-spacing: -.025em;
  font-weight: 470;
  max-width: 7.2em;
}
.hero .statement { margin-top: 28px; max-width: 19.5em; }
.hero-actions { margin-top: 40px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-note { font-size: var(--t-small); }
.hero-planet {
  position: absolute; margin: 0;
  right: 4vw; top: 50%;
  width: min(49vw, calc(100svh - 140px));
  transform: translateY(-46%);
  z-index: -1;
}
.hp-float { animation: float 11s ease-in-out infinite; }
.hp-tilt {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0px), var(--ty, 0px), 0);
}
.hp-planet {
  position: relative; display: block; width: 100%;
  padding: 0; border: 0; background: none; border-radius: 50%;
  cursor: grab; touch-action: pan-y; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hp-planet.is-dragging { cursor: grabbing; }
.hp-planet img { width: 100%; pointer-events: none; -webkit-user-drag: none; }
.hp-planet:focus-visible { outline: 3px solid var(--gold); outline-offset: -3%; }
.hp-orbit, .hp-life {
  position: absolute; left: -20%; top: -20%; width: 140%; height: 140%;
  overflow: visible; pointer-events: none;
}
.hp-orbit-back { transform: translateZ(-70px); }
.hp-life { transform: translateZ(1px); }
.hp-orbit-front { transform: translateZ(90px); }
.orbit-ring { fill: none; stroke: var(--gold); stroke-linecap: round; }
.hp-orbit-back .orbit-ring { stroke-width: 3; stroke-dasharray: 2 16; opacity: .6; }
.hp-orbit-front .orbit-ring { stroke-width: 3.5; opacity: .85; }
.moon { pointer-events: auto; cursor: default; }
.moon text {
  fill: var(--cream); font-family: var(--f-body); font-weight: 650;
  font-size: var(--mfs, 22px);
}
.hp-orbit-back .moon { opacity: .55; }
.moon-inner { transition: transform .35s var(--ease); transform-box: fill-box; transform-origin: 0 50%; }
.moon.is-hot .moon-inner { transform: scale(1.22); }
.hp-window { fill: #FFC164; mix-blend-mode: screen; opacity: .35; animation: lamp 3.8s ease-in-out infinite; }
@keyframes lamp { 0%, 100% { opacity: .22; } 45% { opacity: .62; } 60% { opacity: .48; } }
.hp-smoke circle {
  fill: #EDE3D0; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: smoke 5.2s ease-out infinite;
}
.hp-smoke circle:nth-child(2) { animation-delay: 1.3s; }
.hp-smoke circle:nth-child(3) { animation-delay: 2.6s; }
.hp-smoke circle:nth-child(4) { animation-delay: 3.9s; }
@keyframes smoke {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  12% { opacity: .5; }
  100% { opacity: 0; transform: translate(34px, -150px) scale(3.2); }
}
.hp-aurora {
  position: absolute; left: -45%; top: -40%; width: 190%; height: 110%;
  overflow: visible; pointer-events: none; transform: translateZ(-140px);
}
.aur { fill: none; stroke: #8FE3B8; stroke-linecap: round; }
.aur-gold { stroke: var(--gold); }
.flake { color: var(--cream); }
.flake-path { fill: none; stroke: #F6EDD9; stroke-width: 1.6; stroke-linecap: round; opacity: .75; }
.tow { fill: none; stroke: var(--cream); stroke-width: 2.2; opacity: .7; }
.banner { fill: var(--cream); }
.moon text.banner-text { fill: var(--night); }
.sat-cream { fill: #F6EDD9; }
.sat-gold { fill: var(--gold); }
.sat-berry { fill: #E0528A; }
.sat-cone { fill: #C8914B; }
.sat-hatch { fill: none; stroke: #8E5D25; stroke-width: 1.6; }
.shock { fill: none; stroke: var(--cream); }
.hero-trail { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .35s ease; overflow: visible; }
.hero-trail.show { opacity: 1; }
.trail-line { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1 12; animation: march 1.1s linear infinite; }
.trail-star { fill: var(--gold); }
@keyframes march { to { stroke-dashoffset: -26; } }
.burst-bit { fill: var(--gold); }
.burst-bit.cream { fill: var(--cream); }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -16px, 0) rotate(-1.4deg); }
}

/* Paper */
.paper {
  background-color: var(--paper);
  background-image: url("assets/map_paper.webp");
  background-size: cover;
  background-position: center;
  color: var(--ink);
}

/* Atlas */
.atlas {
  position: relative;
  padding: calc(var(--bar-h) + 56px) var(--gutter) 96px;
  scroll-margin-top: 0;
  min-height: 100svh;
}
.atlas-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  gap: 48px; align-items: end;
}
.atlas-head h2 { font-size: var(--t-head); line-height: 1; letter-spacing: -.02em; }
.atlas-head h2:focus { outline: none; }
.atlas-head p { font-size: var(--t-body); }
.map { position: relative; margin-top: 40px; }
.route {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.route-line {
  fill: none; stroke: var(--ink); stroke-opacity: .42;
  stroke-width: 2; stroke-dasharray: 1 11; stroke-linecap: round;
}
.comet { opacity: 0; transition: opacity .5s ease; }
.comet.is-on { opacity: 1; }
.route-mask { fill: none; stroke: #fff; stroke-width: 40; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.route.is-drawn .route-mask { stroke-dashoffset: 0; transition: stroke-dashoffset 4.6s cubic-bezier(.4,.05,.35,1); }
.rocket-body { fill: var(--ink); }
.rocket-window { fill: var(--gold); }
.rocket-fin { fill: var(--ink); }
.rocket-flame { fill: #E5672F; }
.comet-t { fill: var(--ink); }
.planets {
  position: relative;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 40px);
  padding-bottom: 72px;
}
.planets li { transform: translateY(calc(var(--lift) * -64px + 64px)); }
.planet {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  width: 100%; padding: 0 0 12px; background: none; border: 0; cursor: pointer;
  color: var(--ink); border-radius: 18px;
  -webkit-tap-highlight-color: transparent;
}
.planet-orb { position: relative; display: block; width: 100%; aspect-ratio: 1; }
.planet-orb::before, .planet-orb::after {
  content: ""; position: absolute; inset: 5%; border-radius: 50%;
  border: 2px solid var(--ink); opacity: 0; pointer-events: none;
}
.planets li.ping .planet-orb::before { animation: ping 2.4s cubic-bezier(.2,.6,.3,1); }
.planets li.ping .planet-orb::after { animation: ping 2.4s cubic-bezier(.2,.6,.3,1) .55s; }
@keyframes ping {
  0% { opacity: .6; transform: scale(.94); }
  100% { opacity: 0; transform: scale(1.3); }
}
.orb-ring {
  position: absolute; left: -5%; top: -5%; width: 110%; height: 110%;
  overflow: visible; pointer-events: none;
  transition: transform 2.4s var(--ease);
}
.orb-ring circle {
  fill: none; stroke: var(--ink); stroke-width: .7; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  transition: stroke-dashoffset 1.8s cubic-bezier(.35,.1,.25,1), opacity .3s ease;
}
.orb-ring .orb-ring-dots { stroke-width: .9; stroke-dasharray: .002 .03; stroke-dashoffset: 0; opacity: 0; transition: opacity .8s ease .8s; }
.planet:hover .orb-ring, .planet:focus-visible .orb-ring { transform: rotate(40deg); }
.planet:hover .orb-ring circle, .planet:focus-visible .orb-ring circle { stroke-dashoffset: 0; opacity: 1; }
.planet:hover .orb-ring .orb-ring-dots, .planet:focus-visible .orb-ring .orb-ring-dots { opacity: .7; }
.orb-sat-g { transform-box: view-box; transform-origin: 50px 50px; opacity: 0; transition: opacity .6s ease 1s; }
.orb-sat { fill: var(--ink); }
.planet:hover .orb-sat-g, .planet:focus-visible .orb-sat-g { opacity: 1; animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.orb-spark { position: absolute; right: 8%; top: 4%; width: 18%; height: 18%; overflow: visible; pointer-events: none; opacity: 0; }
.orb-spark path { fill: var(--gold-press); }
.planets li.ping .orb-spark { animation: spark 1.9s var(--ease); }
@keyframes spark {
  0% { opacity: 0; transform: scale(.2) rotate(0deg); }
  35% { opacity: 1; transform: scale(1.1) rotate(60deg); }
  100% { opacity: 0; transform: scale(.6) rotate(110deg); }
}
.orb-stamp {
  position: absolute; right: -2%; bottom: 4%;
  width: 92px; height: 92px; color: var(--ink);
  opacity: 0; transform: rotate(-18deg) scale(.6);
  transition: opacity .4s ease, transform .85s cubic-bezier(.25,.9,.35,1.15);
  pointer-events: none;
}
.orb-stamp svg { width: 100%; height: 100%; overflow: visible; }
.st-ring { fill: var(--fold-a); stroke: var(--ink); stroke-width: 3; }
.st-ring-in { fill: none; stroke: var(--ink); stroke-width: 2; }
.st-text { fill: var(--ink); font-family: var(--f-body); font-weight: 700; font-size: 14.5px; }
.st-spin { transform-box: view-box; transform-origin: 50px 50px; }
.planet:hover .orb-stamp, .planet:focus-visible .orb-stamp { opacity: 1; transform: none; }
.planet:hover .st-spin, .planet:focus-visible .st-spin { animation: spin 24s linear infinite; }
@media (hover: none) {
  .orb-stamp { opacity: 1; transform: none; width: 80px; height: 80px; }
}
.scribble { display: block; width: 100%; height: 14px; margin-top: 2px; overflow: visible; }
.scribble path {
  fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
  transition: stroke-dashoffset 1.1s cubic-bezier(.35,.1,.25,1), opacity .2s ease;
}
.planet:hover .scribble path, .planet:focus-visible .scribble path { stroke-dashoffset: 0; opacity: 1; }
.planet-orb img {
  width: 100%; height: 100%;
  animation: drift 9s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * -2.3s);
  transition: filter .8s ease, scale .9s var(--ease);
}
.planets li:nth-child(2) .planet-orb img { --d: 1; }
.planets li:nth-child(3) .planet-orb img { --d: 2; }
.planets li:nth-child(4) .planet-orb img { --d: 3; }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}
.planet:hover .planet-orb img, .planet:focus-visible .planet-orb img {
  animation: bob 3s ease-in-out infinite;
  filter: saturate(1.1);
  scale: 1.04;
}
@keyframes bob {
  0%, 100% { transform: translate3d(0, -6px, 0); }
  50% { transform: translate3d(0, -20px, 0); }
}
.planet:active .planet-orb img { scale: .97; }
.planet:focus-visible { outline: none; }
.planet-name {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: clamp(24px, 2vw, 30px); font-weight: 520; line-height: 1.15;
}
.planet-line { margin-top: 8px; font-size: 16px; line-height: 1.45; max-width: 17em; }

/* Claims section */
.claims { padding: 128px var(--gutter) 136px; background: var(--night); }
.claims h2 { font-size: var(--t-head); line-height: 1; letter-spacing: -.02em; }
.claims-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
  gap: 20px 64px; align-items: end;
}
.switch-bar {
  position: sticky; top: var(--bar-h); z-index: 6;
  margin: 44px calc(var(--gutter) * -1) 0; padding: 14px var(--gutter);
  background: var(--night);
}
.switch { display: flex; flex-wrap: wrap; gap: 10px; }
.switch button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 22px 0 16px; border: 0; border-radius: 999px;
  background: var(--night-band); color: var(--cream);
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.sw-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; transition: transform .3s var(--ease); }
.switch button:hover { background: #1D295C; }
.switch button:hover .sw-dot { transform: scale(1.25); }
.switch button[aria-pressed="true"] { background: var(--gold); color: var(--night); }
.switch button[aria-pressed="true"] .sw-dot { box-shadow: none; outline: 2px solid var(--night); outline-offset: 1px; }
.switch button:active { transform: translateY(1px) scale(.97); }
.switch button:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

.qa { margin-top: 56px; display: grid; gap: clamp(88px, 10vw, 144px); }
.q { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(40px, 6vw, 96px); align-items: center; }
.q-sugar { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.q-sugar .q-art { order: -1; }
.q-kcal { grid-template-columns: 1fr; gap: 28px; }
.q-kcal .q-text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 6vw, 96px); align-items: start; }
.q-kcal .q-text h3 { grid-row: 1 / span 3; }
.q-kcal .q-answer { margin-top: 0; }
.q h3 { font-size: clamp(34px, 3.4vw, 52px); line-height: 1.04; letter-spacing: -.015em; }
.q-answer {
  margin-top: 20px; max-width: 22em;
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: var(--t-statement); line-height: 1.3; font-weight: 380;
}
.q-note { margin-top: 16px; font-size: 16px; max-width: 30em; }
.stamps { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 26px; min-height: 52px; }
.stamp {
  --rot: -3deg;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 11px;
  border: 3px solid var(--gold); border-radius: 12px;
  color: var(--gold);
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: 19px; font-weight: 560; line-height: 1.1;
  transform: rotate(var(--rot));
}
.stamp svg { width: 22px; height: 22px; flex: none; }
.stamp.is-no { border-style: dashed; border-color: rgba(246, 237, 217, .6); color: var(--cream); font-weight: 420; }
.stamp.is-in { animation: stampIn .55s cubic-bezier(.2,.9,.3,1.25) both; animation-delay: var(--d, 0s); }
@keyframes stampIn {
  0% { opacity: 0; transform: rotate(calc(var(--rot) - 8deg)) scale(1.8); }
  55% { opacity: 1; transform: rotate(var(--rot)) scale(.93); }
  100% { opacity: 1; transform: rotate(var(--rot)) scale(1); }
}
.q-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.q-art svg text { fill: var(--cream); font-family: var(--f-body); font-size: calc(15px * var(--k, 1)); font-weight: 550; }
.q-art svg .t-strong { font-weight: 700; }
.q-art svg .t-gold { fill: var(--gold); }
.q-art svg .t-ink { fill: var(--night); }
.q-art svg .t-big { font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 500; font-size: calc(26px * var(--k, 1)); }
.fade-el { transition: opacity .5s ease; }

/* pie */
.pie-cone { fill: #C8914B; }
.pie-hatch { stroke: #9A672C; stroke-width: 4; fill: none; }
.pie-protein { fill: var(--gold); }
.pie-fat { fill: var(--cream); }
.pie-rest { fill: #2B3874; }
.pie-edge { fill: none; stroke: var(--night); stroke-width: 4; }
.pie-dash { fill: none; stroke: var(--cream); stroke-width: 5; stroke-dasharray: 3 11; stroke-linecap: round; }
.pie-gold-dot { fill: var(--gold); stroke: var(--night); stroke-width: 4; }
.flag-pole { stroke: var(--cream); stroke-width: 3.5; stroke-linecap: round; }
.flag-cloth { fill: var(--gold); }
.spark { fill: var(--gold); }
.puff { fill: var(--cream); }
.r-togo { fill: none; stroke: var(--cream); stroke-width: 3; stroke-dasharray: 2 10; stroke-linecap: round; }
.q-art { position: relative; }
.replay {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 0 auto; min-height: 44px; padding: 0 14px 0 10px;
  border: 0; border-radius: 999px; background: none; color: var(--cream);
  font: 600 15px/1 var(--f-body); cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.q-art { display: flex; flex-direction: column; }
.replay svg { width: 20px; height: 20px; transition: transform .6s var(--ease); }
.replay:hover { background: var(--night-band); }
.replay:hover svg { transform: rotate(-200deg); }
.replay:active { transform: translateY(1px) scale(.97); }
.replay:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.pie-gold-arc { fill: none; stroke: var(--gold); stroke-width: 12; stroke-linecap: round; }
.pie-lead { stroke: var(--cream); stroke-width: 2; fill: none; }
.pie-lead-dot { fill: var(--cream); }

/* ruler */
.r-axis { stroke: var(--cream); stroke-width: 4; stroke-linecap: round; }
.r-tick { stroke: var(--cream); stroke-width: 2; opacity: .45; }
.r-mark { stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; }
.r-mark.pulse { animation: markPulse .9s ease; }
@keyframes markPulse { 30% { stroke-width: 9; } }
.r-bracket { stroke: var(--cream); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.scoop-ball-std { fill: var(--cream); }
.scoop-ball-ff { fill: var(--scoop, var(--gold)); transition: fill .4s ease; }
.scoop-cone { fill: #C8914B; }
.scoop-sprinkle { fill: var(--night); opacity: .55; }

/* cubes */
.slot { fill: var(--night-band); }
.cube-top { fill: #FFFDF7; }
.cube-front { fill: #EFE5D0; }
.cube-side { fill: #CDBFA4; }
.cube.over .cube-top { fill: #FFE2A8; }
.cube.over .cube-front { fill: var(--gold); }
.cube.over .cube-side { fill: #C98E36; }
.c-line { stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; }
.c-line.pulse { animation: markPulse .9s ease; }

.matrix-wrap { margin-top: 96px; }
.matrix-title { font-size: 28px; line-height: 1.15; margin-bottom: 20px; }
.matrix-note { margin-top: 16px; max-width: 56em; }
.matrix .mark-ok path { stroke-dasharray: 20; stroke-dashoffset: 0; }
.will-rise .matrix:not(.drawn) .mark-ok path { stroke-dashoffset: 20; }
.will-rise .matrix:not(.drawn) .mark { opacity: 0; transform: scale(1.8) rotate(-12deg); }
.will-rise .matrix .mark { transition: opacity .3s ease, transform .45s cubic-bezier(.2,.9,.3,1.3); transition-delay: calc(var(--r, 0) * 110ms + var(--c, 0) * 45ms); }
.will-rise .matrix .mark-ok path { transition: stroke-dashoffset .45s ease; transition-delay: calc(var(--r, 0) * 110ms + var(--c, 0) * 45ms + .3s); }
.matrix { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.matrix th, .matrix td { text-align: left; padding: 20px 14px; vertical-align: middle; }
.matrix td { white-space: nowrap; }
.matrix thead th { font-size: var(--t-small); font-weight: 650; padding-bottom: 14px; vertical-align: bottom; line-height: 1.3; }
.matrix tbody tr:nth-child(odd) { background: var(--night-band); }
.matrix tbody th {
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 500; font-size: 24px; line-height: 1.15; white-space: nowrap;
}
.matrix tbody th small { display: block; margin-top: 4px; font-family: var(--f-body); font-size: var(--t-small); font-weight: 450; }
.matrix td { text-align: center; }
.matrix thead th:not(:first-child) { text-align: center; }
.matrix-key { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: var(--t-small); }
.matrix-key span { display: inline-flex; align-items: center; gap: 10px; }
.matrix-key .mark { width: 22px; height: 22px; }
@media (min-width: 721px) {
  .cell-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.cell { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.cell-no { opacity: 1; }
.mark { width: 26px; height: 26px; flex: none; }
.mark-ok circle { fill: var(--gold); }
.mark-ok path { stroke: var(--night); }
.mark-no circle { fill: none; stroke: currentColor; stroke-width: 2; opacity: .55; }

/* Aisle */
.aisle {
  position: relative; isolation: isolate;
  padding: 136px var(--gutter) 0;
  overflow: hidden;
  text-align: center;
  background: var(--night);
}
.aisle-copy { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; }
.aisle h2 { font-size: var(--t-head); line-height: 1; letter-spacing: -.02em; }
.aisle .statement { margin: 28px auto 0; max-width: 26em; }
.list-box { margin-top: 36px; display: grid; justify-items: center; gap: 22px; }
.list-summary { max-width: 34em; }
.list-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 24px; }
.btn-text-light:focus-visible { outline-color: var(--gold); }
.aisle-art { margin: -15vw calc(var(--gutter) * -1) 0; position: relative; z-index: 1; }
.aisle-art img { width: 100%; }
.aisle-art img.is-fallback {
  width: 120vw; max-width: none; margin-left: -10vw;
  margin-bottom: -62vw; margin-top: 12vw;
}

/* Footer */
.foot { background: var(--night-deep); padding: 80px var(--gutter) 48px; }
.foot-top { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.foot-mark {
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(56px, 7vw, 104px); line-height: .9; font-weight: 520; letter-spacing: -.02em;
}
.foot-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.foot-nav a { font-weight: 550; text-underline-offset: 6px; border-radius: 6px; }
.foot-nav a:hover { text-decoration-thickness: 2px; }
.foot-nav a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.foot-bottom { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: var(--t-small); }
.foot-bottom p:last-child { margin-left: auto; }

/* Confirmation panel */
.confirm {
  margin: auto; width: min(480px, calc(100vw - 32px)); padding: 36px; border: 0; border-radius: 24px;
  background-color: var(--fold-a); background-image: url("assets/map_paper.webp"); background-size: cover;
  color: var(--ink); font-family: var(--f-body);
}
.confirm::backdrop { background: rgba(7, 12, 34, .72); }
.confirm h2 {
  font-family: var(--f-display); font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(32px, 4vw, 44px); line-height: 1; font-weight: 520; letter-spacing: -.02em; margin-bottom: 20px;
}
.confirm dl { margin: 0; }
.confirm dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; }
.confirm dt { font-weight: 550; }
.confirm dd { margin: 0; }
.confirm-total { margin: 12px 0 24px; font-weight: 650; }
.confirm .btn { width: 100%; justify-content: center; }
.confirm-note { margin-top: 20px; font-size: var(--t-small); }
@media (prefers-reduced-motion: no-preference) {
  .confirm[open] { animation: confirm-in .45s var(--ease); }
  @keyframes confirm-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
}

/* Chart dialog */
.chart {
  position: fixed; inset: 0; z-index: 60;
  overflow-y: auto; overscroll-behavior: contain;
  color: var(--ink);
}
.chart[hidden] { display: none; }
.chart-bg {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--paper);
  background-image: url("assets/map_paper.webp");
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .45s ease;
}
.chart.is-on .chart-bg { opacity: 1; }
.chart-bar, .chart-nav {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px var(--gutter);
  opacity: 0; transform: translateY(-8px);
  transition: opacity .4s ease .25s, transform .5s var(--ease) .25s;
}
.chart-nav { transform: translateY(8px); padding-bottom: 32px; }
.chart.is-on .chart-bar, .chart.is-on .chart-nav { opacity: 1; transform: none; }
.list-link-ink .list-count { background: var(--ink); color: var(--fold-a); }
.list-link-ink:focus-visible { outline-color: var(--ink); }
.chart-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
  padding: 8px var(--gutter) 24px;
}
.chart-planet-slot {
  position: sticky; top: 24px;
  height: calc(100svh - 190px); min-height: 380px;
  display: grid; place-items: center;
}
.chart-planet-float { width: min(100%, calc(100svh - 200px)); animation: float 12s ease-in-out infinite; }
.chart-planet { width: 100%; will-change: transform; }
.chart-panel { perspective: 1800px; }
.fold {
  position: relative;
  padding: 30px 34px 32px;
  transform-origin: 50% 0;
  transition: transform .75s var(--ease), opacity .45s ease;
  backface-visibility: hidden;
}
.fold::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: #2A1A05; opacity: 0;
  transition: opacity .75s ease;
}
.fold-1 { background: var(--fold-a); }
.fold-2 { background: var(--fold-b); }
.fold-3 { background: var(--fold-a); }
.chart-panel:not(.unfolded) .fold-1 { opacity: 0; transform: translateY(24px); }
.chart-panel:not(.unfolded) .fold-2,
.chart-panel:not(.unfolded) .fold-3 { opacity: 0; transform: rotateX(-96deg); }
.chart-panel:not(.unfolded) .fold::after { opacity: .28; }
.chart-panel.unfolded .fold-2 { transition-delay: .2s; }
.chart-panel.unfolded .fold-2::after { transition-delay: .2s; }
.chart-panel.unfolded .fold-3 { transition-delay: .4s; }
.chart-panel.unfolded .fold-3::after { transition-delay: .4s; }
.chart-panel.instant .fold, .chart-panel.instant .fold::after { transition-duration: 0s; transition-delay: 0s; }

.fold-1 h2 { font-size: var(--t-head); line-height: 1; letter-spacing: -.02em; }
.fold-1 .statement { margin-top: 16px; }
.buy { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.price { display: grid; gap: 2px; }
.price-main { font-family: var(--f-display); font-variation-settings: "SOFT" 100; font-size: 34px; line-height: 1; font-weight: 520; }
.price-alt, .price-size { font-size: var(--t-small); }
.fold-1 .small { margin-top: 20px; }
.fold h3 { font-size: 26px; font-weight: 520; line-height: 1.1; }

.nutri { width: 100%; margin-top: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; }
.nutri th, .nutri td { padding: 10px 12px; text-align: right; }
.nutri th:first-child, .nutri td:first-child { text-align: left; }
.nutri thead th { font-size: var(--t-small); font-weight: 650; padding-top: 4px; }
.nutri tbody tr:nth-child(odd) { background: rgba(23, 24, 58, .065); }
.nutri .sub td:first-child { padding-left: 28px; }
.nutri .lead td { font-weight: 650; }

.claim-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 22px; }
.claim { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; }
.claim .mark { width: 30px; height: 30px; grid-row: span 3; }
.claim .mark-ok circle { fill: var(--flavor); }
.claim .mark-ok path { stroke: var(--fold-a); }
.claim .mark-no circle { stroke: var(--ink); opacity: .5; }
.claim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.claim-head h4 { margin: 0; font-size: 17px; font-weight: 700; }
.verdict { font-size: var(--t-small); font-weight: 650; white-space: nowrap; }
.claim.is-no .verdict { font-weight: 450; }
.claim-rule { font-size: var(--t-small); }
.meter { position: relative; height: 8px; margin: 10px 0 8px; border-radius: 4px; background: rgba(23, 24, 58, .13); }
.meter-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 4px;
  width: calc(var(--v) * 100%); background: var(--flavor);
  transform-origin: 0 50%; transform: scaleX(0);
  transition: transform .9s var(--ease) .6s;
}
.claim.is-no .meter-fill { background: var(--ink); opacity: .55; }
.unfolded .meter-fill { transform: scaleX(1); }
.instant .meter-fill { transition: none; }
.meter-line {
  position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px;
  left: calc(var(--l) * 100%); background: var(--ink);
}
.claim-result { font-size: 16px; }

.chart-nav .btn-text:focus-visible, .chart-bar .btn-text:focus-visible { outline-color: var(--ink); }

/* Transition overlay */
.iris {
  position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background-color: var(--paper);
  background-image: url("assets/map_paper.webp");
  background-size: cover; background-position: center;
}
.iris[hidden] { display: none; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px);
  padding: 16px 24px; border-radius: 16px;
  background: var(--ink); color: var(--fold-a);
  font-size: 16px; font-weight: 550; text-align: center;
  transition: opacity .3s ease, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Entrance stagger: only hides content once JS has confirmed motion is welcome */
.will-rise [data-section] [data-rise] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s ease, transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.will-rise .hero-planet[data-rise] { transform: translateY(-42%) scale(.97); }
.will-rise [data-section].in [data-rise] { opacity: 1; transform: none; }
.will-rise .hero.in .hero-planet[data-rise] { transform: translateY(-46%); }
.planets li[data-rise] { --i: calc(var(--n, 0) + 2); }
.will-rise .atlas.in .planets li[data-rise] { transform: translateY(calc(var(--lift) * -64px + 64px)); }
.will-rise .atlas .planets li[data-rise] { transform: translateY(calc(var(--lift) * -64px + 96px)); }
.planets li:nth-child(1) { --n: 0; }
.planets li:nth-child(2) { --n: 1; }
.planets li:nth-child(3) { --n: 2; }
.planets li:nth-child(4) { --n: 3; }

/* Tablet */
@media (max-width: 1080px) {
  .hero-copy { max-width: 54vw; }
  .hero-planet { width: min(58vw, 640px); right: -10vw; }
  .atlas-head { grid-template-columns: 1fr; gap: 16px; }
  .atlas-head p { max-width: 34em; }
  .planets { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; padding: 0 4vw 48px; }
  .planets li { transform: none; }
  .planets li:nth-child(even) { transform: translateY(96px); }
  .will-rise .atlas.in .planets li[data-rise] { transform: none; }
  .will-rise .atlas.in .planets li:nth-child(even)[data-rise] { transform: translateY(96px); }
  .will-rise .atlas .planets li[data-rise] { transform: translateY(32px); }
  .planets { padding-bottom: 140px; }
  .claims-head { grid-template-columns: 1fr; }
  .q, .q-sugar { grid-template-columns: 1fr; }
  .q-kcal .q-text { grid-template-columns: 1fr; }
  .q-kcal .q-text h3 { grid-row: auto; }
  .q-kcal .q-answer { margin-top: 20px; }
  .q .q-text { display: contents; }
  .q h3 { order: 1; }
  .q .q-art { order: 2; }
  .q .q-answer { order: 3; margin-top: 0; }
  .q .stamps { order: 4; margin-top: 0; }
  .q .q-note { order: 5; margin-top: -8px; }
  .q { gap: 22px; }
  .q-protein .q-art { max-width: 620px; }
  .chart-stage { grid-template-columns: 1fr; justify-items: center; }
  .chart-planet-slot { position: relative; top: 0; height: auto; min-height: 0; width: min(64vw, 460px); }
  .chart-planet-float { width: 100%; }
  .chart-panel { width: 100%; max-width: 640px; }
}

/* Phone */
@media (max-width: 720px) {
  :root { --t-body: 17px; --bar-h: 60px; --gutter: 20px; }
  .bar { gap: 16px; }
  .bar-nav { display: none; }
  .wordmark { font-size: 25px; }
  .list-link { font-size: 15px; }
  .hero {
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding-top: calc(var(--bar-h) + 4px); padding-bottom: 48px;
    min-height: 100svh;
  }
  .hero-planet {
    position: relative; top: auto; right: auto; transform: none;
    width: 86vw; margin: 6px auto 0;
    align-self: center;
  }
  .will-rise .hero-planet[data-rise] { transform: translateY(16px) scale(.97); }
  .will-rise .hero.in .hero-planet[data-rise] { transform: none; }
  .hero-copy { max-width: none; margin-top: -6vw; }
  .hero h1 { font-size: clamp(44px, 12.4vw, 64px); max-width: 7em; }
  .hero .statement { margin-top: 18px; font-size: 21px; }
  .hero-actions { margin-top: 28px; gap: 14px 20px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .atlas { padding-top: calc(var(--bar-h) + 40px); background-size: auto 100%; }
  .map { margin-top: 32px; }
  .planets { grid-template-columns: 1fr; row-gap: 40px; padding: 0 0 24px; }
  .planets li, .planets li:nth-child(even) { transform: none; width: 76vw; }
  .planets li:nth-child(even) { justify-self: end; }
  .will-rise .atlas.in .planets li[data-rise],
  .will-rise .atlas.in .planets li:nth-child(even)[data-rise] { transform: none; }
  .will-rise .atlas .planets li[data-rise] { transform: translateY(28px); }
  .planet-line { font-size: 16px; }

  .claims { padding: 96px var(--gutter) 104px; }
  .switch-bar { margin-top: 32px; padding: 10px var(--gutter); }
  .switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .switch button { padding: 0 10px; min-height: 44px; font-size: 15px; }
  .qa { margin-top: 40px; }
  .q h3 { font-size: 32px; }
  .stamp { font-size: 17px; }
  .matrix-wrap { margin-top: 72px; }
  .matrix thead { display: none; }
  .matrix, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: 100%; }
  .matrix tbody tr { padding: 20px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .matrix tbody th { grid-column: 1 / -1; padding: 0; font-size: 26px; }
  .matrix tbody td, .matrix tbody th { padding: 0; white-space: normal; }
  .matrix td[data-label]::before { content: attr(data-label); display: block; font-size: var(--t-small); font-weight: 650; margin-bottom: 4px; }
  .matrix td { text-align: left; }
  .matrix-key { display: none; }

  .aisle { padding-top: 104px; }
  .aisle-art { margin-top: 8px; overflow: hidden; }
  .aisle-art img { width: 190vw; max-width: none; margin-left: -45vw; }
  .aisle-art img.is-fallback { width: 170vw; margin-left: -35vw; margin-bottom: -88vw; }
  .list-actions .btn { width: 100%; justify-content: center; }

  .foot-bottom p:last-child { margin-left: 0; }

  .chart-bar, .chart-nav { padding-left: 12px; padding-right: 12px; }
  .chart-stage { padding: 0 0 16px; }
  .chart-planet-slot { width: 74vw; }
  .fold { padding: 24px 20px 26px; }
  .fold-1 h2 { font-size: 40px; }
  .buy .btn { width: 100%; justify-content: center; }
  .nutri th, .nutri td { padding: 9px 8px; }
  .nutri .sub td:first-child { padding-left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
