/* Carbo-AI marketing site. Colour rule from the app: cool manages status, warm manages action.
   Inter is loaded from <head> (<link rel="stylesheet"> after two preconnects) — an @import here would add a serial round trip. */

:root {
  /* carb-day scale lives in the app's carb-day-colors.ts, not tokens.json */
  --teal-chip-lo: #E3EEEE; --teal-chip-md: #C2DCDC; --teal-chip-hi: #94C2C2;
  --teal-dot-lo: #639999;  --teal-dot-md: #3F7F7F;  --teal-dot-hi: #1F4E4E;
  --teal-ink: #1F4E4E;
  --teal-wash: color-mix(in srgb, #E3EEEE 45%, #FDFBF7);
  --orange: var(--c-brand-primary, #F59E0B);
  --on-orange: var(--c-brand-onPrimary, #4A1B0C);
  --orange-lip: var(--c-brand-secondary, #B45309);
  --ground: var(--c-surface-default, #FDFBF7);
  --card: var(--c-surface-card, #FFFFFF);
  --hero: var(--c-surface-hero, #FFF7ED);
  --muted: var(--c-surface-muted, #F5F5F4);
  --ink: var(--c-text-primary, #111827);
  --ink-2: var(--c-text-secondary, #4B5563);
  --ink-3: var(--c-icon-default, #6B7280); /* text-disabled (#9CA3AF) is 2.5:1 — fails AA for copy; icon-default clears 4.5:1 on ground/card/hero */
  --line: var(--c-border-default, #E5E7EB);
  --line-light: var(--c-border-light, #F3F4F6);
  --shadow-lg: 0 24px 48px -24px rgba(17, 24, 39, .25), 0 2px 6px rgba(17, 24, 39, .06);
  --font: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; /* anchors, Tab focus and scrollIntoView all clear the 71px sticky nav */ }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.012em; text-wrap: balance; margin: 0; }
h1 { font-size: 44px; font-weight: 800; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0; max-width: 60ch; }
a { color: #356B6B; } /* --teal-dot-md (#3F7F7F) is 4.46:1 on the ground; same hue, 5.5:1+ everywhere */
:focus-visible { outline: 3px solid var(--on-orange); outline-offset: 3px; } /* orange is 2:1 on the ground and 1:1 on .band */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--wash { background: var(--card); }
.section--teal { background: var(--teal-wash); }
.section__head { margin-bottom: 40px; max-width: 60ch; }
.section__head p { color: var(--ink-2); margin-top: 10px; font-size: 18px; }
.muted { color: var(--ink-2); }
/* A number and its unit, or "Carbo-AI", held on one line where the page's usual &nbsp; or U+2060 cannot go: FAQ answers
   (tools/jsonld.test.mjs reads them with &nbsp; undecoded) and <h2> (tools/cjk-joiner.mjs strips U+2060 from headings). */
.nowrap { white-space: nowrap; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav__in { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; white-space: nowrap; } /* "Carbo-AI" would otherwise break at its hyphen and double the bar's height at 320 */
.nav__brand img { width: 34px; height: 34px; border-radius: 8px; } /* the real app icon (orange square) since 2026-09-09 — rounded like the home screen */
.nav__links { display: flex; gap: 22px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 13px 0; white-space: nowrap; } /* 中文 wraps to 中/文 at 320 without this */
.nav__links a.is-lang { color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }

/* buttons — Duolingo's lip, our orange */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 14px; font: 700 15px/1 var(--font); letter-spacing: .02em; text-decoration: none; color: var(--on-orange); background: var(--orange); box-shadow: 0 4px 0 var(--orange-lip); user-select: none; white-space: nowrap; }
.btn:hover { filter: brightness(.96); }
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn--ghost { color: var(--ink); background: var(--card); border: 2px solid var(--line); box-shadow: 0 2px 0 var(--line); }
.btn--ghost:active { transform: translateY(2px); }

/* Pre-launch: a text pill (Apple's badge may not be altered or shown unlinked). Launch day swaps in .badge. */
.soon-pill { display: inline-flex; align-items: center; height: 50px; padding: 0 22px; border-radius: 14px; background: var(--ink); color: #fff; font: 700 15px/1 var(--font); letter-spacing: .02em; white-space: nowrap; }
.soon-pill--onorange { background: var(--on-orange); color: #fff; }
.badge { display: inline-block; line-height: 0; }
.badge img { height: 52px; width: auto; }

/* hero */
.hero { background: linear-gradient(180deg, var(--hero) 0%, var(--ground) 100%); padding: 72px 0 96px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero__copy p.lede { font-size: 19px; color: var(--ink-2); margin: 18px 0 28px; }
.hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Carbo stage */
.stage { position: relative; border-radius: 24px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-lg); max-width: 520px; justify-self: end; width: 100%; }
/* Square, as with the hand-drawn Carbo. At ≤480px the bubble takes two lines, and on screens under ~420px a square no
   longer leaves room for them above his ears: there the stage is as tall as Carbo's slot (62.5% of its width × 476/416,
   the seated rig's bounds) plus 6.25em (106px) — the bubble's 20px inset, two lines, its 11px tail and ≥ 10px of air
   above his head through the wave; 13px taller than square at 375, 29px at 320. The spacer is a ::before because a
   percentage padding on .stage itself would follow the grid column, not the stage. */
.stage::before { content: ""; display: block; padding-top: 100%; }
.stage__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* 62.5%: at rest he is as tall as the hand-drawn Carbo he replaced, ears to feet 0.68 of the stage's width (the owner's
   choice, 2026-09-29: between the design mock's small Carbo and one filling the stage); his pose makes him 9% wider. */
.stage__carbo { position: absolute; left: 50%; bottom: 0; width: 62.5%; transform-origin: 50% 100%; translate: -50% 0; animation: breathe 4.3s ease-in-out infinite; }
.stage__carbo.is-performing { animation-play-state: paused; } /* the rig moves him while he waves; breathing resumes at rest */
/* The seated bounds (188…604) reach left for the waving paw; at rest he spans 254…590, centred on x = 422, 26 units
   right of their centre. Moving the slot 26/416 of its width left centres the pose visitors see most; the paw still
   clears the stage's left edge by 16% of its width. */
.stage__carbo.carbo--classic { translate: -56.25% 0; transform-origin: 56.25% 100%; }
.bubble { position: absolute; top: 20px; left: 20px; max-width: calc(100% - 40px); background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; font-size: 15px; font-weight: 500; line-height: 1.4; box-shadow: 0 2px 6px rgba(17,24,39,.06); }
.bubble::after { content: ""; position: absolute; right: 34px; bottom: -9px; /* tail on the right, pointing down at Carbo's head */ width: 16px; height: 16px; background: var(--card); border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); transform: rotate(45deg); }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 44% { transform: scale(1.004, 1.012); } }
/* ≤480px: two lines, narrow enough that the tail still points at his head */
@media (max-width: 480px) { .stage::before { padding-top: max(100%, calc(6.25em + 62.5% * 476 / 416)); } .bubble { max-width: 70%; } }

/* trust strip */
.trust { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 0 24px 8px; margin: 0 auto; list-style: none; }
.trust li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

/* cards + steps */
.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 24px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.step h3 { margin: 6px 0 6px; }
.step p { color: var(--ink-2); font-size: 15.5px; }
.step__art { margin-top: 18px; border-radius: 14px; overflow: hidden; background: var(--muted); aspect-ratio: 4 / 3; position: relative; max-width: 420px; }
.step__art img { width: 100%; height: 100%; object-fit: cover; }
/* step 2 holds a result card, not a photo: height from content, and 104px of bottom padding reserves room for the small Carbo */
.step__art--result { aspect-ratio: auto; padding: 22px 16px 104px; }
.step__art--result .result { position: static; }
/* Three columns (wider than 900px): the steps share the grid's rows — each card's four children, label, title, text and
   picture — so the three pictures start on one line however many lines each text takes. Stacked, they keep the flow. */
@media (min-width: 901px) {
  .steps { row-gap: 0; }
  .step { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
}
.scan { position: absolute; inset: 14%; border: 2px solid #fff; border-radius: 12px; -webkit-mask: linear-gradient(#000 0 0) top left / 28px 28px no-repeat, linear-gradient(#000 0 0) top right / 28px 28px no-repeat, linear-gradient(#000 0 0) bottom left / 28px 28px no-repeat, linear-gradient(#000 0 0) bottom right / 28px 28px no-repeat; mask: linear-gradient(#000 0 0) top left / 28px 28px no-repeat, linear-gradient(#000 0 0) top right / 28px 28px no-repeat, linear-gradient(#000 0 0) bottom left / 28px 28px no-repeat, linear-gradient(#000 0 0) bottom right / 28px 28px no-repeat; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }

/* result card (shared by step 2 and the demo) */
.result { background: var(--card); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-lg); }
.result__name { font-weight: 700; font-size: 17px; }
.result__meta { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; background: var(--muted); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip--carbs { background: color-mix(in srgb, var(--orange) 12%, var(--card)); color: var(--orange-lip); }
.chip--protein { background: var(--teal-chip-lo); color: var(--teal-ink); }
.step__art img.carbo-sm { position: absolute; right: 10px; bottom: 8px; width: 96px; height: auto; object-fit: contain; } /* must outrank .step__art img above; the card's padding-bottom keeps the chips clear of him */
/* The estimate card ("It's an estimate"): Carbo stands in its bottom-right corner, 16px in from the right edge and 6px
   below the bottom, 110px wide and 119px tall (288:312). That puts him over the content box's right 102px (16 + 110 −
   the card's 24px padding) and bottom 49px (119 − 6 − 64), which is where the chips' row ends when it is long enough.
   So the row stops 102px short of the right edge: a chip that would sit under him wraps to the next row instead (on
   phones, and on the narrowest two-column widths just above 900px). Where all three chips fit beside him, as at 1280,
   the row is exactly what it was. */
.estimate { --carbo-w: 110px; --carbo-right: 16px; position: relative; padding-bottom: 64px; }
.estimate__carbo { position: absolute; right: var(--carbo-right); bottom: -6px; width: var(--carbo-w); }
.estimate .chips { margin-right: calc(var(--carbo-right) + var(--carbo-w) - 24px); } /* 24px: .card's padding */

/* carb-day chip + week */
.daychip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; background: var(--teal-chip-lo); color: var(--teal-ink); }
.daychip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-dot-lo); }
.daychip--md { background: var(--teal-chip-md); } .daychip--md::before { background: var(--teal-dot-md); }
.daychip--hi { background: var(--teal-chip-hi); color: #123A3A; } .daychip--hi::before { background: var(--teal-dot-hi); }
.week { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.week__strip { display: flex; gap: 14px; align-items: flex-end; }
.week__day { display: grid; gap: 8px; justify-items: center; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.week__dot { width: 34px; height: 34px; border-radius: 50%; background: var(--teal-dot-lo); }
.week__dot--md { background: var(--teal-dot-md); } .week__dot--hi { background: var(--teal-dot-hi); }
.week__dot--today { box-shadow: 0 0 0 3px var(--teal-wash), 0 0 0 5px var(--teal-dot-hi); }
.legend { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* two-column feature rows */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.row--flip > :first-child { order: 2; }
.row p { color: var(--ink-2); font-size: 17px; margin-top: 12px; }

/* Apple Health card = Home's status-card ledger rows (app/(tabs)/index.tsx): icon + label left, value right, hairlines.
   Rows wrap: at large text a value that no longer fits beside its label drops under it and sits at the left, as in the
   app's stacked rows (statRowStacked, alignItems: flex-start); beside its label, space-between keeps it on the right. */
.ledger { padding: 6px 24px 18px; }
.ledger__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding: 16px 0; }
.ledger__row + .ledger__row { border-top: 1px solid var(--line-light); }
.ledger__label { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 500; }
.ledger__label svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ledger__row b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The EN note is two inline-blocks: each half stays whole on its line, so at normal sizes the only break is the space
   after the dot ("Apple Health ·" is held together by &nbsp;s). A half wider than the card shrinks to it and wraps at
   its own spaces, never inside a word. No text-wrap: balance (it moves the break to before "Apple") and no overflow-wrap
   (it splits words). */
.ledger .ledger__note { color: var(--ink-3); font-size: 13px; margin-top: 6px; } /* two classes: `.row p` (0,1,1) would otherwise win and set the note at 17px */
.ledger .ledger__note > span { display: inline-block; }

/* pro */
.pro__list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.pro__list > li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.pro__list b { display: block; font-weight: 600; }
.pro__list b + span { color: var(--ink-2); font-size: 15px; }
.pro__carbo { display: block; width: 260px; height: auto; margin: 0 auto; }
.tick { width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--orange) 12%, var(--card)); color: var(--orange-lip); display: grid; place-items: center; font-size: 13px; font-weight: 800; }

/* faq */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; color: var(--ink-3); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; content: "–" / ""; }
.faq summary h2 { font: inherit; letter-spacing: inherit; text-wrap: inherit; margin: 0; }
.faq details p { color: var(--ink-2); padding: 0 0 16px; max-width: 68ch; }

/* emotion strip (Carbo reacts) — tiles are .card.emotion: Counting's frames are swapped by site.js, the other tiles are
   Rive slots (.carbo, at the end of this file); no animation CSS here */
.emotions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.emotion { padding: 18px 16px 14px; text-align: center; }
/* The Counting tile's frames sit in a box the size of the Rive tiles' slots (140px, .carbo--standing's 728 / 752), feet
   on its bottom edge, so all four captions line up at every width */
.emotion > img { width: 140px; max-width: 100%; aspect-ratio: 728 / 752; object-fit: contain; object-position: 50% 100%; margin: 0 auto 8px; }
.emotion h3 { font-size: 17px; margin-bottom: 2px; }
.emotion span { color: var(--ink-2); font-size: 14px; }

/* kinetic type band — the scrolling itself lives in motion.css */
.marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.marquee__track { display: flex; width: max-content; font-weight: 800; font-size: 40px; letter-spacing: -.01em; white-space: nowrap; color: var(--ink); }
.marquee__track--reverse { color: var(--teal-dot-md); }
.marquee__track span { padding-right: 48px; }

/* final band */
.band { background: var(--orange); color: var(--on-orange); padding: 72px 0; }
.band__in { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.band h2 { font-size: 40px; color: var(--on-orange); }
.band__carbo { width: 182px; }

/* footer */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer a { color: var(--ink-2); white-space: nowrap; } /* 服务条款 breaks as 服务条/款 at 320; the links wrap between themselves, never inside one */
/* The email and the language link travel as one run: with five separate links the row breaks after the
   last separator that fits, which at 375 left 中文 / English alone on a second line. */
.footer__tail { white-space: nowrap; }

/* reveal on scroll (only when JS is on) */
/* reveal uses the independent `translate` property so `transform` stays free for the card hover lift; .card.reveal merges the
   hover transitions into its list because this rule outranks .card's own transition */
html.js .reveal { opacity: 0; translate: 0 12px; transition: opacity .5s ease, translate .5s ease; }
html.js .card.reveal { transition: opacity .5s ease, translate .5s ease, transform .22s ease, box-shadow .22s ease; } /* only cards lift on hover */
html.js .reveal.is-visible { opacity: 1; translate: 0 0; }

@media (max-width: 640px) {
  /* five links do not fit beside the brand on a phone; the three in-page anchors are one scroll away anyway.
     [href*="#"], not [href^="#"]: on a subpage the same three links are index.html#how and friends. */
  .nav__links a[href*="#"] { display: none; }
  .nav__brand { font-size: 17px; }
}
@media (max-width: 380px) {
  /* 7 × 34px dots + 6 × 14px gaps = 322px does not fit a 272px column at 320 (WCAG reflow width) */
  .week__dot { width: 28px; height: 28px; }
  .week__strip { gap: 8px; }
  /* "Active calories" + gap + "351 kcal" is 250px; a 272px column leaves 224 inside the card's 24px padding.
     16px padding, a 12px gap and an 18px value make it 238 of 240, so the value stays beside the label. */
  .ledger { padding-inline: 16px; }
  .ledger__row { column-gap: 12px; }
  .ledger__row b { font-size: 18px; }
  /* Type step for the narrowest phones. It is not what balances the link row — .footer__tail is,
     by binding the email to the language link; 375 sits inside this query and still orphaned
     中文 / English before that class existed. At 320 both footer rows wrap in two at either size
     (the copyright line alone fills the 272px column), so 13px is a density choice here, and the
     smallest type on the site. */
  .footer { font-size: 13px; }
}
@media (max-width: 900px) {
  h1 { font-size: 36px; } h2 { font-size: 28px; }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 64px; }
  .hero__grid, .week, .row, .band__in { grid-template-columns: 1fr; }
  .row--flip > :first-child { order: 0; }
  .stage { max-width: 420px; justify-self: center; }
  .steps { grid-template-columns: 1fr; }
  .emotions { grid-template-columns: repeat(2, 1fr); }
  .marquee__track { font-size: 28px; }
  /* the 40px .band h2 rule outranks the generic phone h2 above, so the band needs its own phone size */
  .band h2 { font-size: 32px; }
  .band__carbo { justify-self: center; }
  .nav__links { gap: 14px; } .nav__links a { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage__carbo { animation: none; }
  html.js .reveal { opacity: 1; translate: 0 0; transition: none; }
}

/* interactive demo */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.demo__frame { position: relative; border-radius: 36px; border: 8px solid color-mix(in srgb, var(--teal-dot-md) 55%, var(--card)); background: var(--muted); aspect-ratio: 9 / 16; max-width: 320px; margin: 0 auto; overflow: hidden; }
.demo__photo { width: 100%; height: 100%; object-fit: cover; }
.demo__frame .scan { opacity: 0; transition: opacity .2s; }
.demo__frame.is-scanning .scan { opacity: 1; }
.demo__frame.is-scanning::after { content: ""; position: absolute; left: 14%; right: 14%; top: 14%; height: 2px; background: #fff; box-shadow: 0 0 12px #fff; animation: demo-sweep 2s linear 1 forwards; }
/* Not "sweep": motion.css declares its own @keyframes sweep (for the step-1 art) and loads after
   this file, so the two collide and motion.css's wins — the demo line silently runs the other
   section's keyframes, and any future edit over there would change it again. */
@keyframes demo-sweep { from { top: 14%; } to { top: 86%; opacity: 0; } }
.demo__thumbs { display: flex; gap: 10px; margin-bottom: 18px; }
.demo__thumb { padding: 0; border: 3px solid transparent; border-radius: 14px; overflow: hidden; background: none; cursor: pointer; line-height: 0; }
.demo__thumb img { width: 84px; height: 84px; object-fit: cover; }
.demo__thumb[aria-pressed="true"] { border-color: var(--orange); }
.demo__side { position: relative; padding-bottom: 130px; } /* Carbo is 120px wide and 576:624, so he renders 130px tall; reserve exactly that, as .step__art does for the 96px one */
.demo__carbo { position: absolute; left: 0; bottom: 0; width: 120px; }
.demo__bubble { position: absolute; left: 130px; bottom: 34px; max-width: 60%; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; font-size: 15px; font-weight: 500; }
.demo__bubble::after { content: ""; position: absolute; left: -9px; bottom: 16px; width: 14px; height: 14px; background: var(--card); border-left: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); transform: rotate(45deg); }
.demo__note { font-size: 13px; color: var(--ink-3); margin-top: 12px; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } }
/* animation: none would still paint the line, parked at top: 14% across the whole scan. */
@media (prefers-reduced-motion: reduce) { .demo__frame.is-scanning::after { display: none; } .demo__frame .scan { transition: none; } }

/* reminder banners (Carbo nudges) — real iOS banners pushed to the simulator with simctl and cropped,
   not drawn in CSS. Each crop keeps ~12 source px of the screen behind the card so the banner's own
   rounded corners and drop shadow survive; .nudge's 20px radius trims that margin's corners without
   biting into the card (the card's radius is ~28 CSS px in the 440px slot and it sits ~4px inside the
   crop, so its nearest point on the diagonal is twice as far out as the 20px round reaches). */
.nudges .section__head { max-width: 46ch; margin-inline: auto; text-align: center; }
/* pretty, not balance: balance splits 一餐 in the Chinese lead (一/餐 at 1280), while the default greedy
   wrap leaves a stub on the last line (天。 at 375; "quiet." in English); pretty only pulls it back up. */
.nudges .section__head p { text-wrap: pretty; }
.nudges__stack { display: grid; gap: 14px; max-width: 440px; margin: 0 auto; padding: 0; list-style: none; }
.nudge { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 26px -14px rgba(17, 24, 39, .42); }
.nudge img { width: 100%; }
/* A cascade, not a ladder: each banner sits a little further in than the one above, the way a stack of
   notifications recedes. margin, not translate — .reveal owns `translate` for its rise-in, and an
   offset that moved the box would push the third banner out of a 272px column at 320. */
.nudge:nth-child(2) { margin-left: 22px; }
.nudge:nth-child(3) { margin-left: 44px; }
.nudges__trust { max-width: 440px; margin: 22px auto 0; text-align: center; color: var(--ink-3); font-size: 14px; }
@media (max-width: 480px) { .nudge:nth-child(2) { margin-left: 14px; } .nudge:nth-child(3) { margin-left: 28px; } }

/* Carbo slots — a poster <img> rendered from the app's Rive file (tools/export-carbo-posters.mjs), with the live canvas
   layered over it by assets/carbo-rive.mjs. The canvas holds the whole artboard; the slot's overflow crops it to the rig
   bounds (its box comes from canvasBox() in assets/carbo-core.mjs), which is also exactly what the poster shows. The
   aspect ratios are those bounds: classic 416×476, standing 728×752 (tools/carbo-core.test.mjs holds them together). */
.carbo { overflow: hidden; aspect-ratio: var(--carbo-ar); }
.carbo--classic { --carbo-ar: 416 / 476; }
.carbo--standing { --carbo-ar: 728 / 752; }
.emotion .carbo, .band__carbo { position: relative; }
.emotion .carbo { width: 140px; max-width: 100%; margin: 0 auto 8px; }
.emotion { min-width: 0; } /* a grid item's min-content floor kept the 140px slot whole and pushed the tiles past the screen at 375 and 320; now the slot shrinks like the Counting frame (img max-width) */
.carbo__poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.carbo__canvas { position: absolute; opacity: 0; } /* left/top/width/height set inline from canvasBox() */
.carbo.is-live .carbo__canvas { opacity: 1; transition: opacity .18s ease; } /* a fade in only: going back to the poster (reduced motion switched on, WebGL lost) is at once, never two poses overlapping */
/* The canvas fades in over the poster, which leaves only once the canvas is opaque: two half-faded copies of Carbo let
   a quarter of the background show through him mid-swap. */
.carbo.is-live .carbo__poster { opacity: 0; transition: opacity 0s .18s; }
.carbo__poke { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 16px; background: none; cursor: pointer; }
.carbo > .carbo__poke:focus-visible { outline-offset: -3px; } /* the ring inside the hero's button: the slot's overflow clips the site's ring 3px outside it */
/* The high-five tile is one button (spec §3.4): carbo-rive.mjs lays its poke over the whole card, which clips nothing,
   so that ring stays the site's own, 3px outside the card's rounded corners. */
.emotion { position: relative; }
.emotion > .carbo__poke { border-radius: inherit; }
.emotion .emotion__hint { color: var(--orange-lip); font-weight: 600; }
/* "Tap him." shows once the high-five button is there; its room is kept from the start, so the tiles and the page below
   never move when it does. visibility: hidden also keeps it out of the accessibility tree until then. Not under reduced
   motion or without JS: there it never shows. */
@media (prefers-reduced-motion: no-preference) { html.js .emotion__hint[hidden] { display: inline; visibility: hidden; } }
