/*
  Basket+ website: Basket's own colours (linen ground, white cards, forest as the one strong colour), Apple's
  system font, and the app's screens redrawn in HTML. Each scene plays once and rests on its message; the only
  thing tied to scrolling is the hero's three iPhones opening out. Light only.
*/

:root {
  color-scheme: light;
  --ground: #F7F6F2;
  --card: #FFFFFF;
  --well: #EFEDE6;
  --ink: #1C1C1E;
  --muted: #66666B;
  --hairline: rgba(0, 0, 0, 0.08);
  --forest: #1F5A43;
  --forest-deep: #10372A;
  --cream: #EFDDAE;
  --plate-produce: #DDEFD3;
  --plate-dairy: #DCE8F5;
  --plate-pantry: #F7E8C4;
  --plate-spices: #F8DCCF;
  --plate-drinks: #E9E0F4;
  /* The Diary's week: Home's green, and the rings for things bought and things repeats will still add */
  --glow: #16A36F;
  --ring-things: #D98A6A;
  --ring-coming: #3B6FD8;
  /* The thin line round a card, in place of any shadow. Drawn as a ring so it takes no room and follows the corners */
  --card-edge: 0 0 0 1px rgba(28, 28, 30, 0.1);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  /* Close to SwiftUI's .snappy: a quick settle with a hint of overshoot */
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.04);
  --nav-height: 52px;
  /* The one space between sections, everywhere */
  --gap: clamp(56px, 8vw, 88px);
  /* The page's two spaces. Between one section and the next, the same everywhere; between a section's heading and
     what it shows, always clearly smaller, so what belongs together reads together */
  --section: clamp(48px, 5vw, 72px);
  --inner: clamp(20px, 2.4vw, 36px);
  --tight: 16px;
  --page-width: 1180px;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%,
      0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.6%, 1);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #F1EEE4;
  color: var(--ink);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Garden: soft sage, sky and warm washes across linen, like the app's Fresh background. Drawn on a layer pinned
   to the window (iPhone Safari ignores fixed page backgrounds), so the colour stays put as the page scrolls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Its own layer, so cards growing or the page moving don't make the phone paint these washes again every frame */
  transform: translateZ(0);
  will-change: transform;
  background:
    radial-gradient(48vmax 48vmax at 8% 6%, rgba(156, 203, 134, 0.75), transparent 68%),
    radial-gradient(42vmax 42vmax at 92% 18%, rgba(141, 182, 224, 0.55), transparent 68%),
    radial-gradient(50vmax 50vmax at 85% 72%, rgba(233, 196, 106, 0.5), transparent 68%),
    radial-gradient(46vmax 46vmax at 10% 80%, rgba(156, 203, 134, 0.55), transparent 68%);
}

img { display: block; max-width: 100%; }
/* Hidden means hidden, even for things whose own style sets how they display */
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.page { width: min(var(--page-width), 100% - 40px); margin: 0 auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 8px; }
.on-forest :focus-visible { outline-color: var(--cream); }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

section[id] { scroll-margin-top: var(--nav-height); }

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 246, 242, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav .page { display: flex; align-items: center; height: var(--nav-height); gap: 28px; }
.nav .brand { margin-right: auto; display: flex; align-items: center; }
.nav .brand img { height: 22px; width: auto; }
.nav a.link { font-size: 14px; text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.nav a.link:hover, .nav a.link[aria-current="page"] { opacity: 1; }
@media (max-width: 640px) {
  .nav .page { gap: 18px; }
  .nav a.link.optional { display: none; }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--spring), background 0.2s;
}
.button:hover { background: var(--forest-deep); }
.button:active { transform: scale(0.96); }

/* Type */

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.hero-title { font-size: clamp(42px, 6.2vw, 76px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
.headline { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.title { font-size: clamp(26px, 3vw, 34px); line-height: 1.12; }
.lead { font-size: clamp(19px, 2vw, 22px); line-height: 1.45; color: var(--muted); margin: 18px 0 0; max-width: 32em; }
.label { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; color: var(--forest); margin: 0 0 10px; }
.center { text-align: center; }
.center .lead, .closing .lead { margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { br.wide { display: none; } }

/* Each section only has space below it, so two gaps never add up */
section { padding: 0 0 var(--section); }
/* The closing headline follows Premium closely: no second gap on top of the one before it */

.store-badge { display: inline-block; margin-top: 36px; transition: transform 0.25s var(--spring); }
.store-badge img { height: 56px; width: auto; }
.store-badge:active { transform: scale(0.97); }

/* Blocks rise in once as they're reached. Hidden only when the script is there to show them */

.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="later"] { transition-delay: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* An iPhone, drawn: frame, Dynamic Island, and the app's own linen page with its leaves */

.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  aspect-ratio: 9 / 19.5;
  border-radius: calc(var(--w) * 0.17);
  padding: calc(var(--w) * 0.035);
  background: #1C1C1E;
  box-shadow: 0 0 0 1.5px #3A3A3C inset;
  flex: none;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: calc(var(--w) * 0.14);
  overflow: hidden;
  background: var(--ground);
  color: var(--ink);
  text-align: left;
  font-size: calc(var(--w) * 0.044);
  isolation: isolate;
  /* Its own layer, so Safari keeps clipping animated tiles to the rounded screen instead of dropping the screen */
  transform: translateZ(0);
}
.layer { position: absolute; inset: 0; isolation: isolate; }
.layer::before, .screen.leafy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 402 / 380;
  background: url(/assets/leaves.svg) top right / 100% auto no-repeat;
  z-index: -1;
}
.stack .layer { opacity: 0; transform: translateY(8px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.stack .layer.active { opacity: 1; transform: none; }
.island {
  position: absolute;
  top: 3%;
  left: 50%;
  width: 32%;
  height: 4.4%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  z-index: 8;
}
.status { display: flex; justify-content: space-between; padding: 7.5% 9% 0; font-size: 0.92em; font-weight: 600; }
.status .icons { width: 4.4em; height: 0.85em; background: url(/assets/status.svg) right center / contain no-repeat; align-self: center; }

.app-bar { display: flex; align-items: center; justify-content: space-between; padding: 6% 5% 4% 6%; }
.app-title { font-size: 1.6em; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.25em; }
.app-title svg { width: 0.5em; height: 0.5em; margin-top: 0.15em; opacity: 0.6; }
.round-button {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--card-edge);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--spring);
}
.round-button svg { width: 50%; height: 50%; }

/* Item tiles, as on the Lists tab */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.5%;
  padding: 0 5%;
  transition: opacity 0.35s var(--ease);
}
.tile {
  position: relative;
  background: var(--card);
  border-radius: 0.7em;
  box-shadow: var(--card-edge);
  padding: 0.75em 0.3em 0.65em;
  text-align: center;
  aspect-ratio: 1 / 1.02;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s var(--spring);
}
.tile > :not(.tick) { transition: opacity 0.4s var(--ease); }
.plate { border-radius: 50%; display: grid; place-items: center; }
.tile .plate { width: 2.7em; height: 2.7em; margin-bottom: 0.45em; }
.plate img { width: 68%; height: 68%; object-fit: contain; }
.plate .emoji { font-size: 1.55em; line-height: 1; }
.tile .name { font-weight: 600; font-size: 0.8em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile .qty { color: var(--muted); font-size: 0.7em; margin-top: 0.15em; }
/* A priority's mark, as the app draws it: a small frosted square in the corner, the tick takes its place when bought */
.tile .priority {
  position: absolute;
  top: 0.45em;
  right: 0.45em;
  width: 1.3em;
  height: 1.3em;
  border-radius: 0.35em;
  background: rgba(60, 60, 67, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
}
.tile .priority svg { width: 0.75em; height: 0.75em; }
.tile.done .priority { opacity: 0; }
.tile .tick {
  position: absolute;
  top: 0.45em;
  right: 0.45em;
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72em;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s var(--ease), transform 0.5s var(--spring);
}
.tile.done { transform: scale(0.95); }
.tile.done > :not(.tick) { opacity: 0.4; }
.tile.done .tick { opacity: 1; transform: none; }
.tile.enter { animation: tile-enter 0.55s var(--spring) both; }
.tile.leave { animation: tile-leave 0.35s var(--ease) both; }
@keyframes tile-leave { to { opacity: 0; transform: scale(0.8); } }
@keyframes tile-enter { from { opacity: 0; transform: scale(0.7); } }
/* Arriving from someone else: a ring that only fades and grows, so nothing repaints */
.tile.arrive::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  box-shadow: 0 0 0 2px var(--forest);
  animation: ring 1s var(--ease) 0.2s both;
}
@keyframes ring { from { opacity: 0.9; transform: scale(0.96); } to { opacity: 0; transform: scale(1.06); } }

/* The floating tab bar and the round + beside it */

.dock { position: absolute; left: 4%; right: 4%; bottom: 3.5%; display: flex; align-items: center; gap: 3%; z-index: 4; }
.tabbar {
  flex: 1;
  height: 3.3em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--card-edge);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.6em;
}
.tabbar span { display: flex; flex-direction: column; align-items: center; gap: 0.15em; font-size: 0.5em; font-weight: 600; color: #8E8E93; }
.tabbar span.on { color: var(--forest); }
.tabbar svg { width: 2.2em; height: 2.2em; }
.fab {
  width: 3.3em;
  height: 3.3em;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--forest), var(--forest-deep));
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--spring);
}
.fab svg { width: 42%; height: 42%; }
.pressed { transform: scale(0.9) !important; }

/* A number that rolls to its next value, as SwiftUI's numeric text does */

.roll { display: inline-grid; overflow: hidden; height: 1.2em; line-height: 1.2em; vertical-align: -0.25em; font-variant-numeric: tabular-nums; }
.roll > span { grid-area: 1 / 1; }
.roll .in { animation: roll-in 0.45s var(--spring) both; }
.roll .out { animation: roll-out 0.3s var(--ease) both; }
@keyframes roll-in { from { transform: translateY(-100%); opacity: 0; } }
@keyframes roll-out { to { transform: translateY(100%); opacity: 0; } }

/* Lola's dish sheet */

.sheet { position: relative; height: 100%; display: flex; flex-direction: column; padding: 0 5%; }
.sheet-bar { display: flex; justify-content: space-between; padding: 14% 0 4%; }
.sheet .photo { border-radius: 0.7em; overflow: hidden; aspect-ratio: 16 / 10; }
.sheet .photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet h4 { margin: 0.6em 0.2em 0; font-size: 1.2em; }
.sheet .count { margin: 0.05em 0.2em 0.6em; color: var(--muted); font-size: 0.75em; }
.recipe-pill {
  height: 2.4em;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--card-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-size: 0.8em;
  font-weight: 600;
}
.recipe-pill svg { width: 1.1em; height: 1.1em; }
.ingredients-head { display: flex; align-items: baseline; gap: 0.4em; margin: 0.9em 0.2em 0.4em; font-size: 0.78em; }
.ingredients-head strong { font-weight: 600; }
.ingredients-head .of { color: var(--muted); }
/* Its rolling count sits on the same line as the words: lowered as it is elsewhere, it dropped below them here */
.ingredients-head .roll { vertical-align: top; }
.ingredients-head .all { margin-left: auto; font-weight: 600; }
.ingredients { background: var(--card); border-radius: 0.7em; padding: 0.1em 0.9em; box-shadow: var(--card-edge); transition: opacity 0.35s; }
.ingredient { display: flex; align-items: center; gap: 0.7em; padding: 0.5em 0; border-bottom: 1px solid var(--hairline); font-size: 0.82em; }
.ingredient:last-child { border-bottom: 0; }
.ingredient .check {
  width: 1.35em;
  height: 1.35em;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #fff;
  font-size: 0.8em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.45s var(--spring);
}
.ingredient.off .check { background: transparent; color: transparent; box-shadow: inset 0 0 0 1.5px #A1A1A8; transform: scale(0.92); }
.ingredient .plate { width: 1.6em; height: 1.6em; flex: none; }
.ingredient .plate img { width: 72%; height: 72%; }
.ingredient span { transition: opacity 0.35s; }
.ingredient.off span { opacity: 0.45; }
.add-button {
  margin: auto 0 9%;
  height: 2.9em;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--forest), var(--forest-deep));
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28em;
  font-size: 0.9em;
  transition: transform 0.3s var(--spring);
}
.toast {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translate(-50%, 1em) scale(0.96);
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 0.6em 1.1em;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.5s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* The Diary tab */

.for-list { margin-top: 0.1em; font-size: 0.78em; font-weight: 500; color: var(--muted); }
/* The week sits on the list's own colour, dark glass as in the app, so it reads as the list it's for */
.week-strip {
  margin: 0 5%;
  padding: 0.8em 0.4em 0.65em;
  border-radius: 0.85em;
  background: linear-gradient(160deg, var(--forest), var(--forest-deep));
  color: #fff;
}
.week-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0.7em 0.5em; }
.week-head strong { display: block; font-size: 0.85em; }
.week-head small { display: block; font-size: 0.66em; color: rgba(255, 255, 255, 0.6); }
.week-head .arrows { display: flex; gap: 1em; }
.week-head .arrows svg { width: 0.7em; height: 0.7em; }
.week-head .arrows svg:first-child { transform: rotate(90deg); }
.week-head .arrows svg:last-child { transform: rotate(-90deg); }
.week-strip .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.week-strip .day small { display: block; font-size: 0.6em; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.week-strip .day b {
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  margin: 0.15em auto 0.25em;
  border-radius: 50%;
  font-size: 0.8em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.week-strip .day.chosen b { background: var(--glow); font-weight: 700; }
.week-strip .day.coming b { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.75); }
.week-strip .day i { display: block; width: 0.3em; height: 0.3em; margin: 0 auto; border-radius: 50%; background: var(--glow); opacity: 0; }
.week-strip .day.bought i { opacity: 1; }
.rings { display: flex; margin: 0.7em 5% 0; padding: 0.8em 0.3em 0.7em; background: var(--card); border-radius: 0.85em; box-shadow: var(--card-edge); }
.rings .ring { flex: 1; text-align: center; }
.rings .dial { position: relative; width: 3.4em; height: 3.4em; margin: 0 auto 0.35em; }
.rings svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke: var(--ring); stroke-width: 3.6; stroke-linecap: round; }
/* The track: the ring's own colour, faint */
.rings circle:first-child { opacity: 0.2; }
.rings .dial b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1em; font-variant-numeric: tabular-nums; }
.rings .ring small { font-size: 0.6em; font-weight: 600; color: var(--muted); }
.diary-day { padding: 0 5%; }
.day-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0.85em 0.2em 0.45em; }
.day-title strong { font-size: 0.92em; }
.day-title small { font-size: 0.7em; color: var(--muted); }
.shop { background: var(--card); border-radius: 0.85em; padding: 0.75em; box-shadow: var(--card-edge); }
.shop .buyer { display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.6em; font-size: 0.75em; font-weight: 600; }
.shop .face { width: 1.9em; height: 1.9em; border-radius: 50%; background: rgba(0, 0, 0, 0.06); display: grid; place-items: center; font-size: 1.05em; }
.shop .buyer small { margin-left: auto; font-weight: 400; font-size: 0.85em; color: var(--muted); }
.shop .pills { display: flex; flex-wrap: wrap; gap: 0.4em; }
.shop .pill { display: flex; align-items: center; gap: 0.35em; padding: 0.22em 0.75em 0.22em 0.25em; border-radius: 999px; }
.shop .picture { width: 1.7em; height: 1.7em; flex: none; border-radius: 50%; background: rgba(255, 255, 255, 0.35); display: grid; place-items: center; }
.shop .picture img { width: 70%; height: 70%; object-fit: contain; }
.shop .picture .emoji { font-size: 1em; line-height: 1; }
.shop .pill .what { font-size: 0.72em; font-weight: 600; line-height: 1.15; }
.shop .pill .what small { display: block; font-weight: 400; font-size: 0.85em; opacity: 0.7; }

/* Hero: the headline, then three iPhones that spread apart as the page scrolls */

.hero { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(40px, 6vw, 80px); overflow: clip; }
/* Below the hero, the room it always had, so it breathes before the highlights start */
/* The hero: the problem and the answer side by side; on a phone, the answer first and the conversation under it */
.hero .intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 88px); align-items: center; text-align: left; }
.hero .intro .lead { margin-left: 0; margin-right: 0; }
.intro-words { animation: settle 0.9s var(--ease) both; }
@media (max-width: 860px) {
  .hero .intro { grid-template-columns: 1fr; gap: 32px; text-align: center; }
}
/* On a phone the words take less room, so the conversation and the phones show sooner */
@media (max-width: 600px) {
  .hero { padding-top: 28px; }
  .hero .intro { gap: 22px; }
  .hero .hero-title { font-size: 32px; line-height: 1.1; }
  .hero .intro .lead { font-size: 16px; margin-top: 10px; }
  .bubble { font-size: 14px; padding: 8px 13px; }
  .chat-body { gap: 6px; }
  .try-hint { margin-top: 20px; font-size: 14px; }
}
@media (max-width: 860px) {
  .hero .intro .lead { margin-left: auto; margin-right: auto; }
  .chat { max-width: 380px; width: 100%; margin: 0 auto; }
}

/* The conversation: just the bubbles, arriving one after another */
.chat { text-align: left; }
.chat-body { display: flex; flex-direction: column; gap: 8px; }
.bubble { margin: 0; max-width: 80%; padding: 10px 15px; border-radius: 20px; font-size: 16px; line-height: 1.35; animation: bubble 0.45s var(--spring) both; }
.bubble.them { align-self: flex-start; background: var(--card); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: var(--card-edge); }
.bubble.me { align-self: flex-end; background: var(--forest); color: #fff; border-bottom-right-radius: 6px; }
.bubble:nth-child(1) { animation-delay: 0.7s; }
.bubble:nth-child(2) { animation-delay: 1.3s; }
.bubble:nth-child(3) { animation-delay: 1.9s; }
.bubble:nth-child(4) { animation-delay: 2.45s; }
@keyframes bubble { from { opacity: 0; transform: translateY(10px) scale(0.92); } }
@keyframes settle { from { opacity: 0; transform: translateY(18px); } }
.trio {
  --w: min(390px, 34vw);
  position: relative;
  height: calc(var(--w) * 1.7);
  margin-top: var(--inner);
  display: flex;
  justify-content: center;
  animation: settle 1.1s var(--ease) 0.2s both;
}
/* The phones fade out at the bottom of the hero rather than ending on a hard edge */
.trio { -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%); mask-image: linear-gradient(to bottom, #000 62%, transparent 96%); }
.trio .phone { --w: inherit; position: absolute; top: 0; will-change: transform; }
/* At rest (Reduce Motion, or a browser without scroll timelines) the side phones sit part open */
.trio .middle { z-index: 2; }
.trio .side { top: 9%; transform: translateX(calc(var(--shift) * 0.81)) translateY(0) scale(0.88); }
.trio .left { --shift: -78%; }
.trio .right { --shift: 78%; }
@media (max-width: 760px) {
  .trio { --w: min(300px, 62vw); }
  .trio .left { --shift: -62%; }
  .trio .right { --shift: 62%; }
}
/* As the page scrolls the side phones open out, stay open while they're on screen, and close back together as they
   leave the top; scrolling up plays it backwards. Tied to the phones' own place on screen (a view timeline), so it
   runs with the scroll itself, with no script, on any screen size: up to 20% covers where they sit as the page opens */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .trio { view-timeline: --phones block; }
    .trio .side, .trio .middle {
      animation-timeline: --phones;
      animation-range: cover 0% cover 100%;
      animation-fill-mode: both;
      animation-timing-function: ease-in-out;
    }
    .trio .side { animation-name: phones-open; }
    .trio .middle { animation-name: phone-lift; }
    @keyframes phones-open {
      0%, 20% { transform: translateX(calc(var(--shift) * 0.55)) translateY(0) scale(0.86); }
      46%, 60% { transform: translateX(calc(var(--shift) * 1.2)) translateY(-6%) scale(0.9); }
      92%, 100% { transform: translateX(calc(var(--shift) * 0.55)) translateY(0) scale(0.86); }
    }
    @keyframes phone-lift {
      0%, 20% { transform: translateY(0); }
      46%, 60% { transform: translateY(-8%); }
      92%, 100% { transform: translateY(0); }
    }
  }
}

/* Highlights: large cards in a row that moves on by itself */

.highlights-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: var(--inner) max(20px, calc((100vw - var(--page-width)) / 2)) 8px;
  scroll-padding: 0 max(20px, calc((100vw - var(--page-width)) / 2));
}
.rail::-webkit-scrollbar { display: none; }
.highlight {
  /* Every card the same landscape size: the words on the left, the picture on the right */
  flex: none;
  width: min(940px, 84vw);
  aspect-ratio: 16 / 9;
  scroll-snap-align: start;
  border-radius: 16px;
  padding: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: ". visual" "title visual" "words visual" ". visual";
  column-gap: clamp(24px, 4vw, 56px);
  overflow: hidden;
  position: relative;
  background: var(--card);
}
.highlight h3 { grid-area: title; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; }
.highlight p { grid-area: words; margin: 12px 0 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); }
.highlight .visual { grid-area: visual; align-self: center; justify-self: center; width: 100%; display: flex; flex-direction: column; align-items: center; }
.highlight.forest { background: linear-gradient(165deg, #1F5A43, #0D2D22); color: #fff; }
.highlight.forest p { color: rgba(255, 255, 255, 0.72); }

.rail-controls { display: flex; justify-content: center; margin-top: var(--tight); }
.dots { display: flex; gap: 10px; padding: 14px 18px; border-radius: 999px; background: rgba(0, 0, 0, 0.05); }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.22); cursor: pointer; transition: width 0.35s var(--ease), background 0.25s; }
.dots button.on { width: 28px; background: var(--ink); }

/* Highlight visuals */
.mini-tiles { display: flex; gap: 14px; flex-wrap: wrap; font-size: 15px; }
.mini-tiles .tile { width: 112px; aspect-ratio: 1 / 1.02; color: var(--ink); }
.who { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--ease), transform 0.5s var(--spring); }
.who.on { opacity: 1; transform: none; }


.dish-feature { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.dish-feature img { width: min(320px, 100%); height: auto; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 14px; box-shadow: var(--card-edge); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 360px; }
.chip { background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; box-shadow: var(--card-edge); opacity: 0; transform: translateY(8px) scale(0.96); transition: opacity 0.3s var(--ease), transform 0.5s var(--spring); }
.chip.on { opacity: 1; transform: none; }

.voice { display: flex; align-items: center; gap: 6px; height: 72px; }
.voice i {
  display: block;
  width: 6px;
  height: 100%;
  border-radius: 3px;
  background: var(--forest);
  transform: scaleY(0.16);
  transition: transform 0.5s var(--ease);
}
.voice.listening i { animation: voice 1.1s ease-in-out infinite; }
.voice i:nth-child(3n) { animation-delay: -0.3s; animation-duration: 0.9s; }
.voice i:nth-child(3n + 1) { animation-delay: -0.6s; animation-duration: 1.3s; }
.voice i:nth-child(4n) { animation-delay: -0.15s; }
.voice i:nth-child(5n) { animation-delay: -0.8s; animation-duration: 1.2s; }
@keyframes voice { 0%, 100% { transform: scaleY(0.18); } 50% { transform: scaleY(1); } }
.spoken { margin-top: 22px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; min-height: 1.4em; }
.spoken .words { transition: opacity 0.4s; }
.spoken.settled .words { opacity: 0.35; }
.spoken .word { opacity: 0; transition: opacity 0.3s; }
.spoken .word.on { opacity: 1; }
.spoken .chips { margin-top: 16px; }
.spoken .chip { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: none; }
.highlight.forest .voice i { background: var(--cream); }
.highlight.forest .offline { box-shadow: none; }
.highlight.forest .chip, .highlight.forest .offline { color: var(--ink); }
.highlight.forest .spoken .chip { color: #fff; }
.highlight.forest .offline small { color: var(--muted); }


.note {
  position: relative;
  background: #FFFDF4;
  color: #2B3A55;
  border-radius: 8px;
  padding: 22px 26px;
  transform: rotate(-2deg);
  box-shadow: var(--card-edge);
  font-family: "Noteworthy", "Bradley Hand", "Segoe Print", cursive;
  font-size: 23px;
  line-height: 1.6;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
}
.note .line { position: relative; display: block; width: max-content; }
.note .line::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.15em;
  height: 2px;
  border-radius: 1px;
  background: var(--forest);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.note .line.read::after { transform: scaleX(1); }
.note .bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(42, 112, 86, 0.25), transparent);
  transform: translateY(-44px);
  opacity: 0;
}
.note .bar.pass { opacity: 1; transform: translateY(var(--travel, 180px)); transition: transform 1.6s cubic-bezier(0.45, 0, 0.55, 1), opacity 0.2s; }

.plates { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; max-width: 560px; }
.plates .plate { aspect-ratio: 1; }
.plates .plate img { width: 64%; height: 64%; }

.offline { display: inline-flex; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; padding: 16px 20px; box-shadow: var(--card-edge); font-weight: 600; }
.offline svg { width: 24px; height: 24px; color: var(--forest); }
.offline small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

/* Try it: the hero's middle phone is a real little list */

.try-hint { margin: var(--inner) 0 0; font-size: 15px; color: var(--muted); }
#hero-screen .tile { cursor: pointer; -webkit-tap-highlight-color: transparent; }
#hero-screen .tile:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.trio { margin-top: var(--tight); }

/* What does it need: Lola's dishes, searched as you type */

.lola-search { position: relative; max-width: 640px; margin: var(--inner) auto 0; text-align: left; }
.search-box { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px; border-radius: 999px; background: var(--card); box-shadow: var(--card-edge); }
.search-box svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box:focus-within { box-shadow: 0 0 0 2px var(--forest); }
.dish-options { position: absolute; left: 0; right: 0; top: 64px; z-index: 5; list-style: none; margin: 0; padding: 6px; border-radius: 14px; background: var(--card); box-shadow: var(--card-edge); max-height: 300px; overflow-y: auto; }
.dish-options li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.dish-options li img { width: 36px; height: 36px; flex: none; border-radius: 10px; object-fit: cover; background: var(--well); }
.dish-options li small { color: var(--muted); margin-left: auto; font-size: 13px; }
.dish-options li[aria-selected="true"], .dish-options li:hover { background: var(--well); }
.dish-result { margin-top: 20px; }
.dish-card { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: start; padding: 20px; border-radius: 16px; background: var(--card); box-shadow: var(--card-edge); animation: settle 0.4s var(--ease) both; }
.dish-card img { width: 140px; height: 140px; border-radius: 14px; object-fit: cover; }
.dish-card h3 { font-size: 22px; font-weight: 600; }
.dish-card .count { margin: 2px 0 12px; color: var(--muted); font-size: 15px; }
.dish-card .needs { display: flex; flex-wrap: wrap; gap: 6px; }
.dish-card .needs span { padding: 6px 12px; border-radius: 999px; background: var(--well); font-size: 14px; font-weight: 600; }
.dish-empty { padding: 20px; color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .dish-card { grid-template-columns: 1fr; padding: 16px; }
  .dish-card img { width: 100%; height: 160px; }
}

/* Shared */


/* Premium: flat forest, the words on one side and the Diary it pays for on the other, cut off by the block's foot */

.premium {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 6vw, 64px) 0;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  background: var(--forest);
}
.premium-words { padding-bottom: clamp(40px, 7vw, 72px); }
.premium .headline { font-size: clamp(40px, 7vw, 64px); line-height: 1.04; font-weight: 700; }
.premium .lead { color: rgba(255, 255, 255, 0.82); }
.premium .phone { align-self: end; margin-bottom: -170px; }
.perks { list-style: none; padding: 0; margin: 36px 0 0; max-width: 30em; }
.perks li { display: grid; grid-template-columns: 28px 1fr; column-gap: 16px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.perks svg { grid-row: span 2; width: 26px; height: 26px; margin-top: 2px; color: var(--cream); }
.perks li strong { font-size: 17px; font-weight: 600; }
.perks li span { color: rgba(255, 255, 255, 0.82); font-size: 15px; margin-top: 4px; }
.premium-get {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 36px;
  margin-top: 32px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--forest-deep);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}
.premium-get:hover { background: #F6E9C8; }
.premium-notes { margin: 28px 0 0; max-width: 34em; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
@media (max-width: 760px) {
  .premium { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .premium-words { padding-bottom: 0; }
  .premium .phone { --w: min(280px, 70vw); justify-self: center; margin-bottom: -220px; }
}

/* Closing */

.closing { text-align: center; }

/* Footer: a linen band at the foot of every page */

.footer { background: var(--well); padding: clamp(48px, 6vw, 72px) 0 32px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 26px; width: auto; }
.footer-brand p { margin: 14px 0 0; max-width: 18em; }
.footer-badge { display: inline-block; margin-top: 20px; }
.footer-badge img { height: 40px; width: auto; }
.footer nav { display: flex; flex-direction: column; gap: 10px; }
.footer h2 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 4px; letter-spacing: 0; }
.footer a { text-decoration: none; transition: color 0.2s; }
.footer nav a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(40px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 13px; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* The app's own leaves, at the size of the page, in from the top right of the hero and the invite page */

.hero, .invite { position: relative; isolation: isolate; }
.hero::before, .invite::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(1100px, 92vw);
  aspect-ratio: 402 / 380;
  background: url(/assets/leaves.svg) top right / 100% auto no-repeat;
  opacity: 0.85;
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 760px) { .hero::before { width: 130vw; } }

/* Page not found */

.missing { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: clamp(96px, 14vw, 180px) 0; }
.missing .lead { margin-left: auto; margin-right: auto; }
.missing .actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 36px; }
.home-button { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 999px; background: var(--forest); color: #fff; font-weight: 600; text-decoration: none; transition: background 0.2s, transform 0.25s var(--spring); }
.home-button:hover { background: var(--forest-deep); }
.home-button:active { transform: scale(0.96); }

/* The invite page */

.invite { text-align: center; padding: clamp(64px, 10vw, 120px) 0 clamp(72px, 10vw, 120px); }
.invite .page { max-width: 560px; }
.invite-icon { width: 96px; height: 96px; border-radius: 22.5%; margin: 0 auto 28px; }
.invite .lead { margin-left: auto; margin-right: auto; }
.invite-steps { list-style: none; padding: 0; margin: 36px auto 0; display: grid; gap: 12px; text-align: left; max-width: 440px; }
.invite-steps li { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 12px; padding: 16px 18px; box-shadow: var(--card-edge); }
.invite-steps span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 600; font-size: 15px; display: grid; place-items: center; }
.invite .store-badge { margin-top: 32px; }

/* Text pages: support, terms, privacy */

.doc { max-width: 720px; padding: var(--gap) 0; }
.doc h1 { font-size: clamp(36px, 5vw, 48px); line-height: 1.1; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc .lead { margin-bottom: 24px; }
.doc .box { background: var(--card); border-radius: 14px; padding: 6px 24px 18px; margin: 20px 0; box-shadow: var(--card-edge); }
/* On a phone the box and list keep less to themselves, so a line holds 8 to 10 words, not 4 */
@media (max-width: 600px) {
  .doc .box { padding: 4px 16px 14px; }
  .doc ul, .doc ol { padding-left: 1.2em; }
}
.doc > :last-child { margin-bottom: 0; }

/* Pictures sized for the card's right half */
.highlight .dish-feature { flex-direction: column; align-items: stretch; width: 100%; }
.highlight .dish-feature img { width: 100%; }
.highlight .plates { width: 100%; grid-template-columns: repeat(4, 1fr); }
.highlight .mini-tiles { justify-content: center; }
/* A list for each thing: the lists as Your Lists stacks them, fanning out as the card comes into view */
.lists-stack { position: relative; width: min(320px, 100%); height: 222px; }
.list-card {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 10px;
  align-items: center;
  height: 66px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  transform: translateY(calc(var(--i) * 12px)) scale(calc(0.94 + var(--i) * 0.03));
  transition: transform 0.7s var(--spring);
}
.list-card:nth-child(1) { --i: 0; }
.list-card:nth-child(2) { --i: 1; }
.list-card:nth-child(3) { --i: 2; }
.lists-stack.fanned .list-card { transform: translateY(calc(var(--i) * 78px)); }
.lists-stack.fanned .list-card:nth-child(2) { transition-delay: 0.08s; }
.lists-stack.fanned .list-card:nth-child(3) { transition-delay: 0.16s; }
.list-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--glow); grid-row: span 2; }
.list-card b { font-size: 16px; font-weight: 600; line-height: 1.2; }
.list-card .count { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.2; }
.list-card .faces { grid-column: 3; grid-row: 1 / span 2; font-size: 18px; letter-spacing: -4px; }
/* No ads: the choice the app gives, an account or none */
.sign-in { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: min(300px, 100%); }
.sign-button { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 999px; font-size: 16px; font-weight: 600; }
.sign-button.apple { background: #000; color: #fff; }
.sign-button.google { background: var(--card); color: var(--ink); }
.sign-none { margin-top: 4px; text-align: center; font-size: 15px; color: rgba(255, 255, 255, 0.72); }
/* Apple Watch: its own section, the Watch app playing in the middle */
/* The Watch turns and tilts as it rises; none of that may widen the page on a small screen */
#apple-watch { overflow-x: clip; }
.watch-stage { display: flex; flex-direction: column; align-items: center; margin-top: var(--inner); perspective: 900px; }
/* A wrist being raised and lowered. Arm down, the Watch sits lower, its face tipped back and turned a little with the
   forearm; raised, it's up, flat and facing you. Lowering goes back the same way it came up, as one arm does, only it
   drops less, as the page is carrying it up at the same time */
.watch-turn { position: relative; transform-origin: 50% 50%; will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* Tied to the Watch's holder, which doesn't move: 37–63% is the wrist raised, its middle near the screen's */
    .watch-stage { view-timeline: --wrist block; }
    .watch-turn, .watch-side {
      animation-timeline: --wrist;
      animation-range: cover 0% cover 100%;
      animation-fill-mode: both;
      animation-timing-function: ease-in-out;
    }
    .watch-turn { animation-name: wrist; }
    .watch-side { animation-name: wrist-steel; }
    @keyframes wrist {
      0%, 5% { transform: translateY(90px) rotateZ(-8deg) rotateX(50deg); }
      37%, 63% { transform: translateY(0) rotateZ(0deg) rotateX(0deg); }
      95%, 100% { transform: translateY(40px) rotateZ(-8deg) rotateX(50deg); }
    }
    @keyframes wrist-steel {
      0%, 5% { transform: translateY(12px); }
      37%, 63% { transform: translateY(0); }
      95%, 100% { transform: translateY(12px); }
    }
  }
}
/* The case's steel edge: the same shape behind the front, showing at the bottom edge as the face tips back */
.watch-side {
  position: absolute;
  inset: 0;
  border-radius: 64px;
  background: linear-gradient(180deg, #3A3A3D, #1E1E20);
}
/* As on a real Watch, the screen sleeps until the wrist is all the way up, then wakes at once, and sleeps again as
   soon as the wrist starts down. site.js says when (awake) */
.watch-turn .watch-screen { filter: brightness(0.28) saturate(0.6); transition: filter 0.4s ease; }
.watch-turn.awake .watch-screen { filter: none; }
.watch-small { margin: 12px 0 0; color: var(--muted); font-size: 15px; }

/* The Watch app drawn in a case: black, a thin rim in place of a shadow, and the Digital Crown. The screen is sized
   by its own width (cqw), so it reads the same on a phone and a computer */
.watch {
  position: relative;
  width: clamp(190px, 24vw, 280px);
  aspect-ratio: 416 / 496;
  box-sizing: content-box;
  padding: 16px;
  border-radius: 64px;
  background: #0B0B0C;
}
.watch::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 26%;
  width: 9px;
  height: 18%;
  border-radius: 0 4px 4px 0;
  background: #2C2C2E;
}
.watch-screen {
  container-type: inline-size;
  height: 100%;
  overflow: hidden;
  border-radius: 48px;
  background: #000;
  color: #fff;
  padding: 0 1.5cqw;
  text-align: left;
}
.watch-head { display: flex; align-items: center; justify-content: space-between; padding: 7cqw 3cqw 3cqw; }
.watch-lists { display: grid; place-items: center; width: 16cqw; height: 16cqw; border-radius: 50%; background: #262628; }
.watch-lists svg { width: 8cqw; height: 8cqw; }
.watch-title { text-align: right; line-height: 1.1; }
.watch-title b { display: block; font-size: 8.5cqw; font-weight: 600; }
.watch-title span { font-size: 7.5cqw; color: #8CCBA6; }
.watch-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4cqw;
  max-height: 36cqw;
  margin-bottom: 2.8cqw;
  padding: 7.5cqw 5.5cqw;
  border-radius: 9.5cqw;
  overflow: hidden;
  background: var(--card-colour);
  transition: max-height 0.4s var(--ease), margin 0.4s var(--ease), padding 0.4s var(--ease), opacity 0.3s;
}
/* The time to undo: the app's leaf green sweeps across the card */
.watch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(140, 203, 166, 0.5);
  transform: scaleX(0);
  transform-origin: left;
}
.watch-card.ticked::before { transform: scaleX(1); transition: transform 3s linear; }
/* Where the finger landed */
.watch-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30cqw;
  height: 30cqw;
  margin: -15cqw 0 0 -15cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  opacity: 0;
}
.watch-card.tapped::after { animation: watch-tap 0.55s ease-out; }
@keyframes watch-tap { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(1.3); } }
.watch-card.gone { max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
.watch-picture {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 17cqw;
  height: 17cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 9.5cqw;
}
.watch-picture img { width: 11.5cqw; height: 11.5cqw; }
.watch-check { display: none; font-size: 9cqw; font-weight: 700; }
.watch-card.ticked .watch-check { display: block; }
.watch-card.ticked .watch-picture > :not(.watch-check) { display: none; }
.watch-words { position: relative; min-width: 0; line-height: 1.15; font-size: 6.4cqw; }
.watch-words b { display: block; font-size: 8.7cqw; font-weight: 600; white-space: nowrap; }
.watch-words span { color: rgba(255, 255, 255, 0.7); }
.watch-card.ticked b { text-decoration: line-through; }

/* On a phone the card stays landscape: the words on top, the picture under them, both made to fit */
@media (max-width: 700px) {
  .highlight {
    width: 88vw;
    aspect-ratio: 4 / 3;
    padding: 22px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "title" "words" "visual";
  }
  .highlight h3 { font-size: 20px; }
  .highlight p { font-size: 14px; line-height: 1.4; margin-top: 6px; }
  .highlight .visual { min-height: 0; }
  .mini-tiles { gap: 8px; font-size: 11px; flex-wrap: nowrap; }
  /* Small enough to sit four in a row, with their contents scaled so they stay square */
  .mini-tiles .tile { width: 64px; height: 64px; aspect-ratio: auto; padding: 6px 2px; overflow: hidden; }
  .mini-tiles .tile .plate { width: 2.3em; height: 2.3em; margin-bottom: 0.3em; }
  .who { margin-top: 10px; padding: 5px 10px; font-size: 12px; }
  .lists-stack { width: min(250px, 100%); height: 128px; }
  .list-card { height: 38px; padding: 0 12px; border-radius: 10px; }
  .lists-stack.fanned .list-card { transform: translateY(calc(var(--i) * 45px)); }
  .list-card b { font-size: 13px; }
  .list-card .count { font-size: 11px; }
  .list-card .faces { font-size: 14px; }
  .sign-in { gap: 8px; width: min(240px, 100%); }
  .sign-button { height: 36px; font-size: 13px; }
  .sign-none { font-size: 12px; margin-top: 0; }
  .highlight .dish-feature img { height: 110px; aspect-ratio: auto; border-radius: 10px; }
/* The smallest iPhones: the stack shrinks again so the card's words stay clear of it */
@media (max-width: 360px) {
  /* The cards grow to fit their words and picture, all to the tallest one's height */
  .highlight { aspect-ratio: auto; min-height: 75vw; }
  .mini-tiles { gap: 6px; }
  .mini-tiles .tile { width: 52px; height: 52px; font-size: 9px; }
  .lists-stack { height: 104px; }
  .list-card { height: 30px; }
  .lists-stack.fanned .list-card { transform: translateY(calc(var(--i) * 37px)); }
  .list-card b { font-size: 12px; }
  .list-card .count { display: none; }
}
  .dish-feature .chips, .spoken .chips { display: none; }
  .voice { height: 40px; }
  .spoken { margin-top: 12px; font-size: 15px; text-align: center; }
  .note { font-size: 14px; line-height: 1.45; padding: 10px 16px; }
  .highlight .plates { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .offline { padding: 12px 16px; font-size: 14px; }
}


/* Help: a search, the topics as chips, and each article a card that opens in place */
.help .help-search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; margin: 28px 0 0; border-radius: 999px; background: var(--card); box-shadow: var(--card-edge); }
.help .help-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.help .help-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.help .help-search:focus-within { box-shadow: 0 0 0 2px var(--forest); }
.help .help-none { margin: 20px 4px 0; color: var(--muted); }
.help-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.help-topics a { padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--card-edge); font-size: 15px; font-weight: 600; text-decoration: none; }
.help-topics a:hover { color: var(--forest); }
.help-topic { padding: 0; scroll-margin-top: calc(var(--nav-height) + 16px); }
.help-topic h2 { margin: 40px 4px 12px; }
.help .article { background: var(--card); border-radius: 12px; box-shadow: var(--card-edge); margin: 10px 0; scroll-margin-top: calc(var(--nav-height) + 16px); }
.help .article summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 600; font-size: 17px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.help .article { overflow: hidden; contain: layout paint; }
.help .article summary:active { opacity: 0.6; }
.help .article summary::-webkit-details-marker { display: none; }
.help .article summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.25s var(--ease); opacity: 0.6; }
.help .article[open] summary::after { transform: rotate(45deg); }
.help .answer { padding: 0 20px 18px; color: var(--ink); line-height: 1.55; }
.help .answer p { margin: 0 0 12px; color: var(--muted); }
.help .steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.help .steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: baseline; }
.help .steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; background: var(--well); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.help .tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.help .tips li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.help .tips li::before { content: "💡"; font-size: 15px; text-align: center; filter: grayscale(1); opacity: 0.7; }
@media (prefers-reduced-motion: reduce) { .help .article summary::after { transition: none; } }
/* Help opened from the app: the help alone, without the website around it */
.in-app .nav, .in-app .footer { display: none; }
.in-app .help { padding-top: 28px; }
.in-app .help-topic, .in-app .help .article { scroll-margin-top: 16px; }
