/* Grain landing.
   Satoshi for every word, Doto for numbers on a readout, and the app's own
   colours. Frosted glass only works with colour behind it, so the page is
   built over glowing orange orbs: crisp where they sit in the open, softened
   wherever a glass panel passes over them. */

:root {
  --pearl: #fcfaf6;
  --bone: #edeae4;
  --ink: #191715;
  --ink-soft: rgba(25, 23, 21, 0.62);
  --ink-tone: rgba(25, 23, 21, 0.36);
  --ink-faint: rgba(25, 23, 21, 0.4);
  --hairline: rgba(25, 23, 21, 0.1);
  --accent: #f4511e;
  --oil: #f2b24c;

  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-edge: rgba(255, 255, 255, 0.6);

  --gutter: 16px;
  --max: 1140px;
  --sans:
    'Satoshi', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    sans-serif;
  --app: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --readout: 'Doto', 'Inter', ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* Orbs deliberately run off the edges. Clip them at the page edge so they
   can never widen it into a sideways wobble on phones. */
main {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  background-color: var(--pearl);
  background-image:
    radial-gradient(
      55% 45% at 85% 8%,
      rgba(255, 217, 194, 0.85) 0%,
      rgba(255, 217, 194, 0) 70%
    ),
    radial-gradient(45% 40% at 5% 35%, #fff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fffdf9 0%, var(--pearl) 45%, #f6f0e7 100%);
  background-attachment: fixed;
}

/* A slow band of light across the page: the lustre. */
.sheen {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.5) 48%,
    rgba(255, 240, 228, 0.3) 52%,
    rgba(255, 255, 255, 0) 62%
  );
  animation: sheen 22s ease-in-out infinite alternate;
}

@keyframes sheen {
  from {
    transform: translateX(-18%);
  }
  to {
    transform: translateX(18%);
  }
}

.wrap {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 12px;
}

.tone {
  color: var(--ink-tone);
}

/* ---------- Orbs: the colour the glass needs ---------- */

.orb {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  /* Not a shape: a faint, shapeless haze of warm light, blurred until no
     edge survives, so the page reads as shiny white with colour drifting
     through it. */
  border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%;
  background: radial-gradient(
    closest-side,
    rgba(255, 166, 112, 0.55) 0%,
    rgba(255, 196, 150, 0.35) 45%,
    rgba(255, 226, 200, 0) 100%
  );
  filter: blur(70px);
  opacity: 0.55;
}

/* ---------- Glass ---------- */

.glass {
  position: relative;
  z-index: 1;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    0 30px 70px -34px rgba(120, 50, 15, 0.38);
  border-radius: 32px;
}

/* Fine grain on the frost, so it reads as a material, not a white box. */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .glass {
    background: rgba(255, 255, 255, 0.85);
  }
}

/* ---------- Buttons: a dark pill and its round arrow ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
}

.cta-label,
.cta-arrow {
  height: 56px;
  background: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 30px -14px rgba(25, 23, 21, 0.6);
}

.cta-label {
  display: inline-flex;
  align-items: center;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.005em;
}

.cta-arrow {
  display: grid;
  place-items: center;
  width: 56px;
  margin-left: -4px;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cta-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta:hover .cta-arrow {
  transform: translateX(4px);
}

.cta-small .cta-label,
.cta-small .cta-arrow {
  height: 42px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.cta-small .cta-label {
  padding: 0 18px;
  font-size: 14px;
}

.cta-small .cta-arrow {
  width: 42px;
}

.cta-small .cta-arrow svg {
  width: 16px;
  height: 16px;
}

.cta-light {
  color: var(--ink);
}

.cta-light .cta-label,
.cta-light .cta-arrow {
  background: #fff;
  box-shadow: none;
}

/* ---------- Top bar ---------- */

.bar {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 18px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* A single grain: the smallest unit, and the brand's one mark. */
.mark-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(244, 81, 30, 0.14);
}

.mark-quiet {
  font-size: 16px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 56px;
  padding-top: 28px;
  padding-bottom: 88px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(42px, 9.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
  max-width: 14ch;
}

.lede {
  margin: 24px 0 32px;
  font-size: clamp(17px, 2.1vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 44ch;
}

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.orb-hero {
  width: clamp(240px, 64vw, 400px);
  aspect-ratio: 1;
  top: 6%;
  right: 50%;
  transform: translateX(78%);
}

.orb-hero-small {
  width: 120px;
  aspect-ratio: 1;
  bottom: 8%;
  left: 50%;
  transform: translateX(-210%);
}

@media (min-width: 960px) {
  .orb-hero-small {
    transform: translateX(-190%);
  }
}

.phone-stage .phone {
  position: relative;
  z-index: 2;
}

/* Floating glass readouts, tilted, half over the orb. */
.float {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 22px;
}

.float-num {
  font-family: var(--readout);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}

.float-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.float-a {
  top: 16%;
  right: max(0px, calc(50% - 250px));
  transform: rotate(6deg);
}

.float-b {
  bottom: 14%;
  left: max(0px, calc(50% - 250px));
  transform: rotate(-5deg);
}

@media (min-width: 960px) {
  :root {
    --gutter: 32px;
  }

  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 120px;
  }

  .float-a {
    right: -8px;
  }

  .float-b {
    left: -8px;
  }
}

/* ---------- Sections ---------- */

h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(32px, 5.4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.section-lede {
  position: relative;
  z-index: 1;
  margin: 14px 0 30px;
  max-width: 50ch;
  font-size: 17px;
  color: var(--ink-soft);
}

/* ---------- Why not scan ---------- */

.why {
  padding-bottom: 72px;
}

.orb-why {
  width: clamp(300px, 70vw, 560px);
  aspect-ratio: 1;
  top: 34%;
  left: 50%;
  transform: translateX(-30%);
}

.orb-why-small {
  width: 140px;
  aspect-ratio: 1;
  top: 22%;
  left: -40px;
  opacity: 0.9;
}

.tiles {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.tile {
  padding: 18px 22px 24px;
  overflow: hidden;
}

.tile p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.art {
  position: relative;
  height: 158px;
  margin: 0 -6px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.art svg {
  width: 100%;
  height: 100%;
}

@media (min-width: 800px) {
  .tiles {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* The middle tile floats a little higher, like cards laid on a table. */
  .tile:nth-child(2) {
    transform: translateY(-22px);
  }
}

/* Tile 1: a bowl seen from above. The scan sees rice; the rice slides away. */
.tile-hidden .bowl {
  fill: #fff;
  stroke: rgba(25, 23, 21, 0.12);
  stroke-width: 1.5;
}

.tile-hidden .meat rect {
  fill: #e6976a;
}

.tile-hidden .meat rect:nth-child(even) {
  fill: #d98256;
}

.tile-hidden .grains ellipse {
  fill: #ece2d2;
}

.tile-hidden .finder path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.tile-hidden .rice {
  transform-box: fill-box;
  transform-origin: center;
}

.art-tag {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.js .art-tag {
  opacity: 0;
  transform: translateY(6px);
}

.tile-hidden.is-playing .rice {
  animation: rice-away 1.1s 0.5s cubic-bezier(0.6, 0, 0.3, 1) forwards;
}

.tile-hidden.is-playing .finder {
  animation: finder 0.9s ease both;
}

.tile-hidden.is-playing .art-tag {
  animation: tag-in 0.45s 1.45s ease forwards;
}

@keyframes rice-away {
  to {
    transform: translateX(128px) rotate(18deg);
  }
}

@keyframes finder {
  0%,
  40% {
    opacity: 1;
  }
  20% {
    opacity: 0.25;
  }
  100% {
    opacity: 0.35;
  }
}

@keyframes tag-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Tile 2: a drop of oil falls into the pan, and the calories tick up. */
.tile-oil .pan,
.tile-oil .pan-handle {
  fill: #2a2522;
}

.tile-oil .pan-in {
  fill: #3a332e;
}

.tile-oil .oil {
  fill: var(--oil);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.3);
}

.tile-oil .drop {
  fill: var(--oil);
}

.tile-oil .ripple {
  fill: none;
  stroke: var(--oil);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.tile-oil.is-playing .drop {
  animation: drop 0.85s 0.3s cubic-bezier(0.55, 0, 0.9, 0.4) forwards;
}

.tile-oil.is-playing .oil {
  animation: spread 0.7s 1.1s ease-out forwards;
}

.tile-oil.is-playing .ripple {
  animation: ripple 0.9s 1.1s ease-out forwards;
}

@keyframes drop {
  85% {
    transform: translateY(92px);
    opacity: 1;
  }
  100% {
    transform: translateY(96px) scale(1.3, 0.4);
    opacity: 0;
  }
}

@keyframes spread {
  to {
    opacity: 0.95;
    transform: scale(1);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

.art-readout {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.big-num {
  font-family: var(--readout);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.big-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* Tile 3: two portions that look the same, on two scales that disagree. */
.art-scales {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 18px;
  padding: 18px 16px 16px;
}

.scale {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 44%;
}

.scale svg {
  width: 100%;
  height: auto;
}

.scale .mound {
  fill: #fffdf8;
  stroke: rgba(25, 23, 21, 0.1);
  stroke-width: 1;
}

.scale .plate {
  fill: #2a2522;
}

.display {
  width: 100%;
  padding: 7px 0 6px;
  border-radius: 12px;
  background: #1f1b18;
  text-align: center;
  font-family: var(--readout);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  color: #ff7a45;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.6);
}

.tile-weight.is-playing .mound {
  animation: settle 0.5s ease-out both;
}

.tile-weight.is-playing .scale:nth-child(2) .mound {
  animation-delay: 0.12s;
}

@keyframes settle {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
}

/* ---------- What Grain does ---------- */

.does {
  padding-bottom: 64px;
}

.orb-does {
  width: clamp(220px, 46vw, 360px);
  aspect-ratio: 1;
  top: -60px;
  right: 2%;
}

.does-card {
  padding: 30px 22px;
  max-width: 820px;
}

.does-card h2 {
  font-size: clamp(30px, 4.6vw, 42px);
}

.typed-line {
  position: relative;
  z-index: 1;
  margin: 20px 0 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 17px;
}

.pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.js .pill {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
}

.pill b {
  font-weight: 500;
}

.pill span {
  color: rgba(255, 255, 255, 0.6);
}

.pill i {
  font-style: normal;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
}

.does-card.is-playing .pill {
  animation: pill-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.does-card.is-playing .pill:nth-child(2) {
  animation-delay: 0.15s;
}

.does-card.is-playing .pill:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pill-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.does-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 56ch;
}

@media (min-width: 760px) {
  .does-card {
    padding: 44px;
  }
}

/* ---------- Who it's for ---------- */

.who {
  padding-bottom: 64px;
}

.who p {
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

/* ---------- Closing card: the one solid black object on the page ---------- */

.end {
  padding-bottom: 40px;
}

.end-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  padding: 36px 26px;
  border-radius: 32px;
  background: var(--ink);
  color: #fff;
}

.end-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 18ch;
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.tone-light {
  color: rgba(255, 255, 255, 0.42);
}

.end-card .cta {
  position: relative;
  z-index: 1;
}

.orb-end {
  width: 300px;
  aspect-ratio: 1;
  right: -90px;
  bottom: -150px;
  opacity: 0.5;
}

@media (min-width: 760px) {
  .end-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px 48px;
  }

  .orb-end {
    width: 380px;
    right: 18%;
    bottom: -260px;
  }
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- The phone demo: the app's Log screen, rebuilt ---------- */

.phone {
  --phone-scale: 1;
  width: 300px;
  height: 620px;
  padding: 11px;
  border-radius: 48px;
  background: #1d1b19;
  box-shadow:
    inset 0 0 0 1.5px #3a3632,
    0 50px 80px -40px rgba(80, 40, 15, 0.55),
    0 18px 36px -18px rgba(80, 40, 15, 0.35);
  transform: scale(var(--phone-scale));
  transform-origin: top center;
}

@media (max-width: 360px) {
  .phone {
    --phone-scale: 0.9;
    margin-bottom: -62px;
  }
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--bone);
  padding: 0 16px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 0 10px;
  font-weight: 600;
  font-size: 13px;
}

.status-icons {
  width: 46px;
  height: 11px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, var(--ink) 0 62%, transparent 62%) right / 22px 11px
      no-repeat,
    radial-gradient(circle, var(--ink) 55%, transparent 58%) left / 11px 11px
      no-repeat;
  opacity: 0.85;
}

.app-label {
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.app-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 10px;
}

.app-card {
  background: #f7f5f1;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 6px 16px -8px rgba(61, 56, 49, 0.18);
}

.summary-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

.readout {
  font-family: var(--readout);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  margin-top: 4px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.gauge {
  position: relative;
  width: 84px;
  height: 84px;
}

.gauge svg {
  transform: rotate(-90deg);
}

.gauge-track,
.gauge-fill {
  fill: none;
  stroke-width: 7;
}

.gauge-track {
  stroke: #e7e4dd;
}

.gauge-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 263.9;
  stroke-dashoffset: 211.1;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-text b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.gauge-text span {
  font-size: 9px;
  color: var(--ink-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7e4dd;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.describe {
  margin-top: 10px;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.describe-input {
  min-height: 52px;
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 500;
}

.caret {
  display: inline-block;
  width: 1.5px;
  height: 17px;
  margin-left: 1px;
  vertical-align: -3px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.describe-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.describe-hint {
  font-size: 10.5px;
  color: var(--ink-faint);
  line-height: 1.3;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.app-btn.is-pressed {
  transform: scale(0.94);
  filter: brightness(0.92);
}

.app-btn.is-busy {
  color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--accent) 0%,
    #ff8a5e 50%,
    var(--accent) 100%
  );
  background-size: 200% 100%;
  animation: busy 0.8s linear infinite;
}

@keyframes busy {
  to {
    background-position: -200% 0;
  }
}

.app-btn-wide {
  width: 100%;
  height: 38px;
  margin-top: 4px;
}

.rows {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s ease;
}

/* One child, so the 0fr -> 1fr row can collapse and open all of it. */
.rows-inner {
  min-height: 0;
  overflow: hidden;
}

.rows.is-open {
  grid-template-rows: 1fr;
}

.row,
.row-total,
.rows .app-btn-wide {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.row.is-in,
.row-total.is-in,
.rows .app-btn-wide.is-in {
  opacity: 1;
  transform: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.row:first-child {
  margin-top: 8px;
}

.row-main {
  flex: 1;
}

.row-name {
  font-weight: 600;
  font-size: 13.5px;
}

.row-name em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  margin-left: 5px;
  color: var(--ink);
}

.row-sub {
  font-size: 11px;
  color: var(--ink-faint);
}

.row-kcal {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.row-total {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  margin-top: 2px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-muted);
}

.row-total b {
  color: var(--ink);
}

.logged {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 268px;
  opacity: 0;
  transition: opacity 0.5s ease 0.2s;
}

.logged-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 2px;
  border-bottom: 1px solid var(--hairline);
  font-weight: 600;
  font-size: 13.5px;
}

.logged-row b {
  font-variant-numeric: tabular-nums;
}

.screen.is-logged .describe {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.screen.is-logged .logged {
  opacity: 1;
}

.screen.is-fading {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.screen {
  transition: opacity 0.5s ease;
}

/* The demo is the app's own screen, so it keeps the app's typeface. */
.screen {
  font-family: var(--app);
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .sheen,
  .caret {
    animation: none;
  }

  .sheen {
    transform: none;
  }

  /* Animations still run to their end state, just instantly, so every tile
     shows its finished frame rather than its starting one. */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
