/* Fonts are self-hosted (SIL Open Font License, see ../fonts/). */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/figtree-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/figtree-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/figtree-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/figtree-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/figtree-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/figtree-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Layout: full-width bands (green, light, white), text beside an app mockup.
   The checked o of the logo drops into a note that sorts itself into aisles; the empty o completes at the end. */
:root {
  --green: #1E5B3A;
  --green-dark: #154529;
  --green-soft: #2F6B47;
  --apricot: #FFC978;
  --background: #F2F6F0;
  --surface: #FFFFFF;
  --tint: #E6F0E6;
  --ink: #18261D;
  --ink-muted: #55655A;
  --border: #D3E0D4;
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Green bands: two soft halos, lighter top-left and deeper bottom-right, over the brand green. */
  --green-halo: radial-gradient(900px 520px at 18% 10%, rgba(255, 255, 255, 0.10), transparent 60%), radial-gradient(900px 600px at 85% 95%, rgba(21, 69, 41, 0.85), transparent 60%);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: var(--font-text); font-size: 17px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--green); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 3px; border-radius: 8px; }

.band { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.container { max-width: 1120px; margin: 0 auto; }

/* ---------- Logotype */
.logo { display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.logo .o-filled { position: relative; display: inline-block; width: 0.56em; height: 0.56em; margin: 0 0.035em -0.02em 0.04em; border-radius: 50%; background: var(--apricot); }
.logo .o-filled svg { position: absolute; top: 19%; left: 19%; width: 62%; height: 62%; fill: none; stroke: var(--green-dark); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.logo .o-ring { position: relative; display: inline-block; width: 0.56em; height: 0.56em; margin: 0 0 -0.02em 0.035em; border: 0.14em solid currentColor; border-radius: 50%; transition: background 0.4s; }
.logo .o-ring svg { position: absolute; top: 12%; left: 12%; width: 76%; height: 76%; fill: none; stroke: var(--green); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.logo .o-ring.complete { background: #FFFFFF; }
.logo .o-ring.complete svg { stroke-dashoffset: 0; }
.animated .logo .o-ring.complete svg { animation: draw-check 0.4s 0.15s ease-out both; }
html:not(.animated) .logo .o-ring svg { display: none; }

/* ---------- Google Play button, not active yet */
.play { position: relative; display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 6px 22px 6px 20px; border-radius: 16px; border: 1.5px solid currentColor; text-decoration: none; cursor: default; }
.play small { font-size: 13px; font-weight: 600; line-height: 1.2; opacity: 0.85; }
.play strong { font-size: 19px; font-weight: 700; line-height: 1.2; }
.play .chip { position: absolute; top: -11px; right: -12px; padding: 2px 9px; border-radius: 999px; background: var(--apricot); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.4; }
.play.play-dark { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.play.light { color: #FFFFFF; }

/* ---------- Hero */
.hero { display: flex; flex-direction: column; min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); min-height: calc(100svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); background: var(--green-halo), var(--green); color: #FFFFFF; padding-block: 28px 40px; }
.hero > .container { flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; }
.hero .stage { flex: 1 1 auto; justify-content: center; }
.hero .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero .eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-block: 88px 64px; text-align: center; }
.stage .logo { font-size: clamp(72px, 15vw, 176px); letter-spacing: -0.02em; }
.stage .tagline { font-family: var(--font-display); font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.stage .lede { max-width: 34em; font-size: 19px; font-weight: 500; opacity: 0.88; }
.hint { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.hint .scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.hint .scroll-cue span { width: 16px; height: 16px; border-radius: 50%; background: var(--apricot); }

/* Logotype intro, played once on load */
.animated .stage .word { animation: slide-in 0.9s cubic-bezier(.2,.8,.2,1) both; }
.animated .stage .o-filled { animation: fill-in 0.5s 0.35s ease-out both; }
.animated .stage .o-filled path { stroke-dasharray: 24; animation: draw-check 0.45s 0.75s ease-out both; }
.animated .stage .tagline { animation: rise 0.7s 0.9s ease-out both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-0.3em); } }
@keyframes fill-in { from { background: transparent; box-shadow: inset 0 0 0 0.14em #FFFFFF; } }
@keyframes draw-check { from { stroke-dashoffset: 24; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stage .o-filled.detached { animation: none; background: transparent; box-shadow: inset 0 0 0 0.14em #FFFFFF; }
.stage .o-filled.detached svg { visibility: hidden; }
.animated .hint .scroll-cue span { animation: bounce 1.6s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(6px); } }

/* ---------- The checked o drops from the logo into the note (one trip, scroll-driven) */
#traveler { position: fixed; left: 0; top: 0; z-index: 5; width: 28px; height: 28px; border-radius: 50%; background: var(--apricot); pointer-events: none; opacity: 0; will-change: transform; box-shadow: 0 10px 24px rgba(21, 69, 41, 0.28); transition: background 0.35s, box-shadow 0.35s; }
#traveler svg { position: absolute; top: 19%; left: 19%; width: 62%; height: 62%; fill: none; stroke: var(--green-dark); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.35s; }
#traveler.landed { background: var(--green); box-shadow: none; }
#traveler.landed svg { stroke: #FFFFFF; }

/* Sorting card: the resting state is the sorted, checked list. Motion only plays when allowed,
   and waits (paused on its first frame) until the card scrolls into view. */
.sort-card.is-waiting, .sort-card.is-waiting * { animation-play-state: paused !important; }
.sort-card { position: relative; margin: 0; width: 100%; max-width: 420px; height: calc(var(--card-height) + 72px); justify-self: center; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35); }
.sort-title { position: absolute; left: 20px; right: 20px; top: 22px; height: 44px; }
.sort-title > span { position: absolute; inset: 0; display: flex; flex-direction: column; }
.sort-title strong { font-family: var(--font-display); font-size: 22px; line-height: 1.2; }
.sort-title small { font-size: 13px; color: var(--ink-muted); }
.sort-title-before { opacity: 0; }
.sort-list { position: absolute; inset: 0 0 72px; margin: 0; padding: 0; list-style: none; }
.sort-aisle { position: absolute; left: 20px; color: var(--green-soft); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sort-item { position: absolute; left: 20px; display: flex; align-items: center; gap: 12px; }
.sort-dot { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--green); border-radius: 50%; background: var(--green); }
.sort-dot svg { width: 16px; height: 16px; fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; }
.sort-name { font-size: 20px; font-weight: 600; color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--ink-muted); }
.sort-done { position: absolute; left: 20px; right: 132px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.sort-progress { display: block; height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.sort-progress span { display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--apricot); }
.sort-done-text { font-size: 14px; font-weight: 700; color: var(--green); }
.replay { position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 8px; border: 0; border-radius: 999px; background: var(--tint); color: var(--green); font: 700 14px var(--font-text); cursor: pointer; }
.replay:hover { background: var(--border); }
.replay-icon { position: relative; display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--apricot); }
.replay-icon svg { position: absolute; top: 19%; left: 19%; width: 62%; height: 62%; fill: none; stroke: var(--green-dark); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.replay.spinning .replay-icon { animation: quarter-turn 0.5s cubic-bezier(.2,.8,.2,1); }
@keyframes quarter-turn { to { transform: rotate(90deg); } }

@media (prefers-reduced-motion: no-preference) {
  .sort-card.play-on .sort-title-before { animation: note-out 1.3s both; }
  .sort-card.play-on .sort-title-after { animation: fade-in 0.4s 1.1s both; }
  .sort-card.play-on .sort-aisle { animation: fade-in 0.4s var(--delay) both; }
  .sort-card.play-on .sort-item { animation: sort-move 0.8s var(--move) cubic-bezier(.5, 0, .2, 1) both; }
  .sort-card.play-on .sort-dot { animation: fade-in 0.3s var(--show) both, dot-check 0.25s var(--check) both; }
  .sort-card.play-on .sort-dot svg { animation: draw-check 0.3s var(--check) both; }
  .sort-card.play-on .sort-name { animation: name-check 0.3s var(--check) both; }
  .sort-card.play-on .sort-progress span { animation: sort-progress 5.3s linear both; }
  .sort-card.play-on .sort-done-text { animation: fade-in 0.4s 4.9s both; }
  .sort-card.play-on { animation: card-settle 0.6s 4.85s ease-out both; }
}
@keyframes sort-progress { 0%, 33.9% { width: 0; } 34.0%, 51.8% { width: 14.3%; } 51.9%, 58.4% { width: 28.6%; } 58.5%, 65.0% { width: 42.9%; } 65.1%, 71.6% { width: 57.1%; } 71.7%, 78.2% { width: 71.4%; } 78.3%, 84.8% { width: 85.7%; } 84.9% { width: 100.0%; } } 45.3%, 51.8% { width: 14.3%; } 51.9%, 58.4% { width: 28.6%; } 58.5%, 65.0% { width: 42.9%; } 65.1%, 71.6% { width: 57.1%; } 71.7%, 78.2% { width: 71.4%; } 78.3%, 84.8% { width: 85.7%; } 84.9% { width: 100.0%; } }
@keyframes card-settle { 35% { transform: scale(0.985); } }
@keyframes note-out { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sort-move { from { transform: translate(calc(var(--dx) * var(--spread, 1)), var(--dy)) rotate(var(--r)); } }
@keyframes dot-check { from { background: var(--surface); } }
@keyframes name-check { from { color: var(--ink); text-decoration-color: transparent; } }

/* ---------- Entrances: text lines and mockups rise into place once, when they scroll into view */
.animated .reveal-group > * { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.animated .reveal-group.in-view > * { opacity: 1; transform: none; }
.animated .reveal-group > :nth-child(2) { transition-delay: 0.08s; }
.animated .reveal-group > :nth-child(3) { transition-delay: 0.16s; }
.animated .reveal-group > :nth-child(4) { transition-delay: 0.24s; }
.animated .reveal-block { opacity: 0; transform: translateY(18px); transition: opacity 0.6s 0.2s ease, transform 0.6s 0.2s ease; }
.animated .reveal-block.in-view { opacity: 1; transform: none; }
.animated .sort-card.reveal-block.in-view { transition: none; }

/* ---------- Steps */
.step { padding-block: 104px; }
.step.light { background: var(--background); }
.step.white { background: var(--surface); }
.step.tint { background: var(--tint); }
.step .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 72px; }
.step.reverse .story { order: 2; }
.story { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.story .kicker { color: var(--green-soft); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.story h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; }
.story p { max-width: 30em; color: var(--ink-muted); font-size: 19px; font-weight: 500; }
.story ul { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.story li { display: flex; align-items: baseline; gap: 12px; font-size: 17px; font-weight: 600; }
.story li::before { content: ""; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--apricot); box-shadow: 0 0 0 2px var(--green); transform: translateY(-1px); }

/* ---------- App screen excerpts */
.screen { justify-self: center; width: 100%; max-width: 400px; border-radius: 28px; background: var(--background); box-shadow: 0 30px 60px -20px rgba(24, 38, 29, 0.28), 0 0 0 1px var(--border); overflow: hidden; }
.step.light .screen { background: var(--surface); }
.screen .screen-head { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px 14px; }
.screen .screen-head h3 { font-size: 24px; letter-spacing: -0.01em; }
.screen .screen-head p { color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.card { margin: 0 12px 14px; padding: 4px 0; border-radius: 20px; background: var(--surface); }
.step.light .card { background: var(--background); }
.card.shopping-card { position: relative; margin-top: 14px; height: 318px; overflow: hidden; }
.shopping-list { transition: transform 0.8s cubic-bezier(.4, 0, .2, 1); }
.card .aisle { padding: 12px 16px 2px; color: var(--green-soft); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; }
.row .name { flex: 1 1 0; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.25; transition: color 0.3s; }
.row .meta { flex-shrink: 0; font-size: 14px; font-weight: 500; color: var(--ink-muted); }
.dot { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 2px solid var(--green); border-radius: 50%; color: var(--green); transition: background 0.3s, border-color 0.3s; }
.dot svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dot .minus, .dot .check { display: none; }

/* Favorite: to add / in the list */
.favorite.done .dot { background: var(--tint); border-color: var(--tint); }
.favorite.done .dot .plus { display: none; }
.favorite.done .dot .minus { display: block; }
.favorite.done .name { color: var(--ink-muted); }
.favorite .meta-in-list { display: none; color: var(--green); font-weight: 700; }
.favorite.done .meta-aisle { display: none; }
.favorite.done .meta-in-list { display: inline; }

/* Shopping mode: to pick up / picked up */
.item.done .dot { background: var(--green); color: #FFFFFF; }
.item.done .dot .check { display: block; stroke-width: 3; }
.item.done .name { color: var(--ink-muted); text-decoration: line-through; }
.shopping-head { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 18px; border-radius: 0 0 22px 22px; background: var(--green); color: #FFFFFF; }
.shopping-head .shopping-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shopping-head .badge { padding: 3px 10px; border-radius: 999px; background: var(--apricot); color: var(--ink); font-size: 13px; font-weight: 700; }
.shopping-head .remaining { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--progress, 71%); border-radius: 3px; background: var(--apricot); transition: width 0.5s ease; }
.shopping-head .count { align-self: flex-end; font-size: 13px; font-weight: 600; opacity: 0.85; font-variant-numeric: tabular-nums; }

/* Share */
.share { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.share .shared-list { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--surface); }
.share .shared-list strong { font-size: 18px; }
.share .shared-list span { color: var(--ink-muted); font-size: 15px; font-weight: 500; }
.share-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: 16px; background: var(--green); color: #FFFFFF; font-size: 17px; font-weight: 700; }
.share-button .share-dot { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--apricot); }
.bubble { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px 18px 18px 6px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); transition: opacity 0.4s, transform 0.4s; }
.bubble .bubble-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; }
.bubble .bubble-icon svg { width: 16px; height: 16px; fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bubble p { font-size: 15px; font-weight: 500; color: var(--ink-muted); }
.bubble p b { display: block; color: var(--ink); font-weight: 700; }
.animated .share:not(.done) .bubble { opacity: 0; transform: translateY(10px); }

/* ---------- Closing */
.closing { display: flex; flex-direction: column; min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); min-height: calc(100svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); background: var(--green-halo), var(--green); color: #FFFFFF; padding-block: 40px 28px; }
.closing .container { flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; }
.closing h2 { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; }
.closing .logo { font-size: 64px; margin-top: auto; }
.closing p { max-width: 32em; font-size: 19px; font-weight: 500; opacity: 0.88; }
.footer-bar { margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.2); width: 100%; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 500; opacity: 0.8; }
/* The pages written in the admin, served by the API under /pages/, and the home page in
   each language. */
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links [aria-current] { font-weight: 700; }


/* Very narrow screens: the messy note spreads a little less so it stays inside the card. */
@media (max-width: 380px) {
  .sort-card { --spread: 0.7; overflow: hidden; }
}

/* Narrow screens: the eyebrow goes on two lines so the Google Play button stays beside it. */
@media (max-width: 520px) {
  .hero .topbar { flex-wrap: nowrap; align-items: center; }
  .hero .eyebrow { display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.3; }
  .hero .eyebrow-sep { display: none; }
  .hero .play { min-height: 48px; padding: 4px 16px 4px 14px; }
  .hero .play small { font-size: 11px; }
  .hero .play strong { font-size: 16px; }
  .hero .play .chip { right: -8px; font-size: 12px; }
}
@media (max-width: 820px) {
  .sort-done { right: 20px; bottom: 64px; }
  .replay { bottom: 14px; }
  .sort-card { height: calc(var(--card-height) + 116px); }
  .sort-list { inset: 0 0 116px; }
  .step { padding-block: 72px; }
  .step .container { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .step.reverse .story { order: 0; }
  .stage { padding-block: 64px 48px; }
  .stage .lede, .story p, .closing p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  #traveler { display: none; }
  * { animation: none !important; transition: none !important; }
}
