/*
 * slimfio.com — follows CLAUDE-DESIGN.md (Slimfio design guide): Inter only, neutral UI chrome,
 * colour only where it means something (protein/carbs/fat, water, heart, streak green), real
 * food photos, cards fill-only, primary button solid --btn, glass only on the Pro card and the
 * phone's tab bar, no shadows in dark mode. Light is the primary look.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Inter-latin.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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Inter-latin-ext.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;
}

:root {
  color-scheme: light dark;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --bg: #f2f2f7;
  --card: #fff;
  --tx: #000;
  --copy: #3a3a3c; /* long-form text: stronger than --sub for readability */
  --sub: #6e6e73;
  --sep: rgba(60, 60, 67, 0.18);
  --glass: rgba(255, 255, 255, 0.55);
  --gb: rgba(255, 255, 255, 0.75);
  --gs: 0 8px 30px rgba(0, 0, 0, 0.1);
  --seg: rgba(118, 118, 128, 0.12);
  --search: rgba(118, 118, 128, 0.12);
  --pill: #fff;
  --track: rgba(60, 60, 67, 0.18);
  --btn: #000;
  --btn-fg: #fff;
  --quiet: rgba(118, 118, 128, 0.12);
  --lift: 0 1px 3px rgba(0, 0, 0, 0.06);
  --float: 0 24px 50px -24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.06);
  --frame: #1d1d1f;
  --phone-shadow: 0 60px 120px -40px rgba(20, 20, 30, 0.55), 0 30px 60px -30px rgba(20, 20, 30, 0.35);
  --protein: #e0645c;
  --carbs: #db9a2e;
  --fat: #8b74d4;
  --water: #3e8ad8;
  --heart: #e5484d;
  --green: #2fb35a;
  --green-fill: rgba(52, 199, 89, 0.14);
  --streak-bg: #fff1e0;
  --streak: #f57c12;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --card: #1c1c1e;
    --tx: #fff;
    --copy: #d1d1d6;
    --sub: #98989f;
    --sep: rgba(84, 84, 88, 0.5);
    --glass: rgba(40, 40, 44, 0.5);
    --gb: rgba(255, 255, 255, 0.14);
    --gs: none;
    --seg: rgba(118, 118, 128, 0.24);
    --search: rgba(118, 118, 128, 0.24);
    --pill: #636366;
    --track: rgba(84, 84, 88, 0.5);
    --btn: #fff;
    --btn-fg: #000;
    --quiet: rgba(118, 118, 128, 0.24);
    --lift: none;
    --float: 0 0 0 0.5px rgba(255, 255, 255, 0.12);
    --frame: #3a3a3c;
    --phone-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
    --protein: #ff7b71;
    --carbs: #f2b144;
    --fat: #a894f2;
    --water: #5aa7ff;
    --heart: #ff6b73;
    --green: #3dd06a;
    --green-fill: rgba(52, 199, 89, 0.2);
    --streak-bg: rgba(255, 159, 64, 0.16);
    --streak: #ff9a3d;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

/* Reduced motion: nothing plays by itself (bobbing, caret, scanner). Changes the visitor causes —
   scrolling, tapping — still cross-fade so the page doesn't jump. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 400 16px/1.4 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--tx);
  outline-offset: 2px;
}

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

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--btn);
  color: var(--btn-fg);
  font: 600 17px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 200ms var(--ease);
}

.btn:hover {
  opacity: 0.86;
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn[aria-busy="true"] {
  opacity: 0.7;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 99px;
  font-size: 15px;
}

.btn-quiet {
  background: var(--card);
  color: var(--tx);
  box-shadow: var(--lift);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--tx);
  font: 600 17px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 0.5px solid transparent;
  transition: border-color 200ms var(--ease);
}

.header.is-scrolled {
  border-bottom-color: var(--sep);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font: 700 24px/1.05 var(--font);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 1.15em;
  height: 0.28em;
  margin-top: 0.04em;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a,
.lang {
  color: var(--copy);
  font-size: 15px;
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.nav a:hover,
.lang:hover {
  color: var(--tx);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }
  .header .wrap {
    height: 56px;
  }
}

/* ---------- Type ---------- */
.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sub);
}

.h2 {
  margin-top: 12px;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

.copy {
  max-width: 470px;
  margin-top: 18px;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.45;
  color: var(--copy);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 28px;
}

.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-kicker {
  font-size: 17px;
  font-weight: 600;
  color: var(--sub);
}

.hero h1 {
  max-width: 11ch;
  margin: 10px auto 0;
  font-size: clamp(46px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.hero .lead {
  max-width: 600px;
  margin: 18px auto 0;
  text-wrap: balance;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.45;
  color: var(--copy);
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 18px;
  margin-top: 24px;
}

/* The stage: a tilted phone with food photos floating at different depths behind it. */
.stage {
  --p: 0;
  position: relative;
  height: clamp(480px, 58vw, 700px);
  margin-top: 4px;
  perspective: 1300px;
  perspective-origin: 50% 10%;
}

.phone {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 9 / 19.2;
  padding: 11px;
  border-radius: 56px;
  background: var(--frame);
  box-shadow: var(--phone-shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.16);
}

.hero-phone {
  position: absolute;
  left: 50%;
  top: 24px;
  z-index: 3;
  width: clamp(270px, 29vw, 360px);
  transform: translateX(-50%) rotateX(calc((1 - var(--p)) * 26deg + 4deg)) rotateY(calc((1 - var(--p)) * -26deg))
    rotateZ(calc((1 - var(--p)) * 8deg)) scale(calc(1 + var(--p) * 0.08));
  transform-origin: 50% 35%;
  will-change: transform;
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 50px 14px 0;
  border-radius: 46px;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.phone-screen::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 92px;
  height: 26px;
  margin-left: -46px;
  border-radius: 99px;
  background: #000;
}

/* Glass reflection on the screen — fades as the phone straightens. */
.phone-glare {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0) 46%);
  opacity: calc(0.9 - var(--p) * 0.6);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .phone-glare {
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 40%);
  }
}

.floor {
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 520px;
  height: 120px;
  margin-left: -260px;
  border-radius: 50%;
  background: rgba(20, 20, 30, 0.18);
  filter: blur(40px);
}

@media (prefers-color-scheme: dark) {
  .floor {
    display: none;
  }
}

.orbit {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: var(--s, 170px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 6px solid var(--card);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--float);
  rotate: var(--r);
  transform: translate(calc(var(--x) * (1 + var(--p) * 0.25)), calc(var(--y) - var(--p) * 90px));
  opacity: calc(1 - var(--p) * 0.5);
  animation: bob 7s ease-in-out infinite alternate;
}

.orbit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.o1 { --x: -470px; --y: 40px; --r: -11deg; --s: 190px; animation-delay: -1s; }
.o2 { --x: -400px; --y: 330px; --r: 7deg; --s: 150px; animation-delay: -3s; }
.o3 { --x: 240px; --y: 30px; --r: 9deg; --s: 180px; animation-delay: -2s; }
.o4 { --x: 300px; --y: 300px; --r: -6deg; --s: 160px; animation-delay: -4s; }
.o5 { --x: -660px; --y: 200px; --r: 5deg; --s: 120px; animation-delay: -5s; }
.o6 { --x: 520px; --y: 160px; --r: -9deg; --s: 130px; animation-delay: -6s; }

@keyframes bob {
  from {
    translate: 0 -8px;
  }
  to {
    translate: 0 10px;
  }
}

@media (max-width: 860px) {
  .o1 { --x: -260px; --y: 40px; --s: 140px; }
  .o2 { --x: -240px; --y: 260px; --s: 120px; }
  .o3 { --x: 130px; --y: 20px; --s: 130px; }
  .o4 { --x: 140px; --y: 250px; --s: 120px; }
  .o5,
  .o6 {
    display: none;
  }
  .stage {
    height: 520px;
    margin-top: 28px;
  }
}

/* ---------- Phone content: Today screen (design v6) ---------- */
.p-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 3px 11px;
}

.p-title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.p-date {
  margin-top: 3px;
  font-size: 12px;
  color: var(--sub);
}

.p-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 5px 9px 5px 7px;
  border-radius: 99px;
  background: var(--streak-bg);
  color: var(--streak);
  font-size: 11px;
  font-weight: 600;
}

.p-streak svg {
  width: 13px;
  height: 13px;
  fill: var(--streak);
  fill-opacity: 0.18;
  stroke: var(--streak);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.p-week {
  display: flex;
  justify-content: space-between;
  margin: 0 1px 12px;
}

.p-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 34px;
  font-size: 10px;
  font-weight: 500;
  color: var(--sub);
}

.p-day.on {
  color: var(--green);
  font-weight: 600;
}

.p-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 11px;
  font-weight: 500;
  color: var(--tx);
}

.p-circle svg {
  position: absolute;
  inset: 0;
  width: 28px;
  height: 28px;
  overflow: visible;
}

.p-circle span {
  position: relative;
}

.p-day.on .p-circle span {
  font-weight: 700;
}

.p-card {
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--lift);
}

.p-kcal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 14px 16px;
  margin-bottom: 8px;
}

.p-kcal-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sub);
}

.p-kcal-big {
  margin-top: 4px;
  font-size: min(38px, 11cqw);
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.p-kcal-goal {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sub);
}

.p-ring {
  position: relative;
  flex: none;
  width: min(84px, 25cqw);
  height: min(84px, 25cqw);
}

.p-ring .ring {
  width: 100%;
  height: 100%;
}

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

.p-ring-center b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.p-ring-center span {
  margin-top: 2px;
  font-size: 8.5px;
  font-weight: 500;
  color: var(--sub);
}

.p-macros {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}

.p-macro {
  padding: 10px 9px;
}

.p-macro-label {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.p-macro-value {
  margin-top: 5px;
  font-size: min(18px, 5.6cqw);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.p-macro-value small {
  margin-left: 1px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.p-macro-goal {
  margin-top: 3px;
  font-size: 10px;
  color: var(--sub);
}

.p-bar {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--track);
}

.p-bar i {
  display: block;
  height: 100%;
  width: calc(var(--w) * 100%);
  border-radius: 3px;
}

.p-meals {
  padding: 2px 0;
  margin-bottom: 8px;
}

.p-meal {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 10px;
}

.p-meal + .p-meal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 54px;
  right: 0;
  height: 0.5px;
  background: var(--sep);
}

.p-thumb {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.p-meal-text {
  flex: 1;
  min-width: 0;
}

.p-meal-type {
  font-size: 10px;
  font-weight: 500;
  color: var(--sub);
}

.p-meal-names {
  margin-top: 1px;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.p-meal-kcal {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.p-water {
  padding: 12px 14px 14px;
}

.p-water-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
}

.p-water-head span {
  font-size: 11px;
  color: var(--sub);
}

.p-water-head em {
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
  color: var(--water);
}

.p-water-track {
  position: relative;
  height: 7px;
  margin-top: 12px;
  border-radius: 4px;
  background: var(--track);
}

.p-water-track i {
  position: absolute;
  inset: 0 40% 0 0;
  border-radius: 4px;
  background: var(--water);
}

.p-water-track span {
  position: absolute;
  top: 50%;
  left: 60%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* The phone's tab bar is the second (and last) glass surface, as in the app. */
.p-tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 50px;
  border: 0.5px solid var(--gb);
  border-radius: 25px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  color: rgba(60, 60, 67, 0.6);
}

@media (prefers-color-scheme: dark) {
  .p-tabbar {
    color: rgba(235, 235, 245, 0.55);
  }
}

.p-tab svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.p-tab.on {
  color: var(--tx);
}

.p-tab.on svg {
  stroke-width: 2;
}

/* ---------- Ring segments draw in (hero + Today section) ---------- */
.ring .seg {
  stroke-dasharray: 0.001 var(--C);
  opacity: 0;
  transition:
    stroke-dasharray 1100ms var(--ease) var(--d),
    opacity 1ms linear var(--d);
}

.in .ring .seg {
  stroke-dasharray: var(--len) var(--C);
  opacity: 1;
}

/* ---------- Show, don't tell sections ---------- */
.show {
  padding: 104px 0;
}

.band {
  background: var(--card);
}

.show-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 72px;
}

.show-grid.flip .show-visual {
  order: 2;
}

@media (max-width: 860px) {
  .show {
    padding: 72px 0;
  }
  .show-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .show-grid .show-text {
    order: -1;
  }
  .show-grid.flip .show-visual {
    order: 0;
  }
}

/* Today: big ring + macro legend */
.big-ring {
  position: relative;
  width: min(340px, 78vw);
  margin: 0 auto;
}

.big-ring .ring {
  width: 100%;
  height: auto;
}

.big-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.big-ring-center b {
  font-size: clamp(44px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.big-ring-center span {
  margin-top: 6px;
  font-size: 17px;
  color: var(--sub);
}

.legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 440px;
  margin: 40px auto 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.legend li {
  display: flex;
  flex-direction: column;
}

.lg-label {
  overflow: hidden;
  color: var(--c);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lg-value {
  margin-top: 4px;
  font-size: 15px;
  color: var(--sub);
  white-space: nowrap;
}

.lg-value b {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--tx);
}

.lg-bar {
  display: block;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--track);
}

.lg-bar i {
  display: block;
  height: 100%;
  width: calc(var(--w) * 100%);
  border-radius: 4px;
  background: var(--c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1000ms var(--ease) 400ms;
}

.in .lg-bar i {
  transform: scaleX(1);
}

/* Water: interactive slider card (spec: viz-slider-spec.md) */
.wcard {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 26px 26px 22px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--float);
  font-variant-numeric: tabular-nums;
}

.w-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.w-title {
  font-size: 21px;
  font-weight: 600;
}

.w-now {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--water);
}

.w-goal {
  font-size: 17px;
  color: var(--sub);
}

.w-track {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  margin-top: 14px;
  cursor: grab;
  touch-action: none;
  outline-offset: 4px;
}

.dragging .w-track {
  cursor: grabbing;
}

.w-rail {
  position: relative;
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--track);
  transition: height 200ms var(--ease), border-radius 200ms var(--ease);
}

.dragging .w-rail {
  height: 16px;
  border-radius: 8px;
}

.w-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--water);
}

.w-thumb {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  transition: width 200ms var(--ease), height 200ms var(--ease), margin 200ms var(--ease);
}

.dragging .w-thumb {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
}

.w-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--tx);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  pointer-events: none;
}

.dragging .w-bubble {
  opacity: 1;
  transform: translate(-50%, 0);
}

.w-ticks {
  position: relative;
  height: 8px;
  margin-top: -10px;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.dragging .w-ticks {
  opacity: 1;
}

.w-ticks i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 3px;
  background: var(--sep);
}

.w-ticks i.mid {
  height: 5px;
  background: var(--sub);
  opacity: 0.5;
}

.w-ticks i.major {
  height: 8px;
  background: var(--sub);
}

.w-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.w-hint {
  margin-right: auto;
  font-size: 15px;
  color: var(--sub);
}

.confirmed .w-hint {
  color: var(--tx);
  font-weight: 600;
}

.w-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  background: var(--quiet);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 200ms var(--ease);
}

.w-minus {
  padding: 0;
}

.dragging .w-btn {
  opacity: 0.35;
}

.w-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* Favourites: stacked photo cards + heart */
.fav {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.fav-stack {
  position: relative;
  width: min(330px, 72vw);
  aspect-ratio: 1;
  margin-top: 10px;
}

.fav-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 7px solid var(--bg);
  border-radius: 34px;
  background: var(--bg);
  box-shadow: var(--float);
  transition: transform 460ms var(--ease), opacity 460ms var(--ease);
}

.fav-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fav-card[data-k="0"] { transform: rotate(-2deg); }
.fav-card[data-k="1"] { transform: translate(-44px, 10px) rotate(-11deg) scale(0.94); }
.fav-card[data-k="2"] { transform: translate(46px, 6px) rotate(10deg) scale(0.92); }
.fav-card[data-k="3"] { transform: translateY(-22px) rotate(4deg) scale(0.88); }

.fav-card.out {
  transform: translate(120%, -24%) rotate(22deg) scale(0.9) !important;
  opacity: 0 !important;
}

.fav-card.back {
  transition: none;
  opacity: 0 !important;
}

.fav-heart {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--float);
  cursor: pointer;
}

.fav-heart svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--tx);
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: transform 260ms var(--ease), fill 160ms linear, stroke 160ms linear;
}

.fav-heart.on svg {
  fill: var(--heart);
  stroke: var(--heart);
  transform: scale(1.18);
}

.fav-count {
  font-size: 15px;
  color: var(--sub);
}

.fav-count b {
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}

/* Search: typed query, results with photos, barcode row */
.scard {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 16px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--float);
}

.s-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--search);
  font-size: 17px;
}

.s-field svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--sub);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.s-caret {
  width: 2px;
  height: 20px;
  margin-left: -6px;
  border-radius: 1px;
  background: var(--water);
  animation: caret 1s steps(1) infinite;
}

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

.s-list {
  margin-top: 6px;
  padding: 0;
  list-style: none;
}

.s-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms var(--ease), transform 360ms var(--ease);
}

.s-list li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 64px;
  right: 0;
  height: 0.5px;
  background: var(--sep);
}

.typed .s-list li {
  opacity: 1;
  transform: none;
}

.typed .s-list li:nth-child(2) { transition-delay: 70ms; }
.typed .s-list li:nth-child(3) { transition-delay: 140ms; }
.typed .s-list li:nth-child(4) { transition-delay: 210ms; }

.s-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.s-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.s-text b {
  font-size: 16px;
  font-weight: 600;
}

.s-text span {
  font-size: 13px;
  color: var(--sub);
}

.s-kcal {
  font-size: 15px;
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.s-add {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 15px;
  background: var(--quiet);
}

.s-add svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--tx);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.s-barcode {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--search);
  font-size: 16px;
  font-weight: 600;
}

.s-barcode svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s-scan {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--heart);
  opacity: 0.8;
  animation: scan 2.2s var(--ease) infinite alternate;
}

@keyframes scan {
  to {
    top: 44px;
  }
}

/* ---------- Pro ---------- */
.pro-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.pro-list li {
  display: flex;
  gap: 14px;
}

.pro-list .check {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 13px;
  background: var(--btn);
  color: var(--btn-fg);
}

.pro-list .check svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pro-list b {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.pro-list span {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  color: var(--copy);
}

.pro-note {
  margin-top: 26px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--copy);
}

.pro-demo {
  position: relative;
  width: min(400px, 100%);
  margin: 0 auto;
}

.pro-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 26px;
}

.pro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  opacity: 0.95;
}

.c1 { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.c2 { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.c3 { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.c4 { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }

/* The result sits on the photo as glass (the Pro surface), and slides up once the scan is done. */
.pro-result {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px 18px 18px;
  border: 0.5px solid var(--gb);
  border-radius: 20px;
  /* denser than the tab-bar glass: text sits on a busy photo and must stay readable */
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: var(--gs), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms var(--ease) 900ms, transform 700ms var(--ease) 900ms;
}

.in .pro-result {
  opacity: 1;
  transform: none;
}

@media (prefers-color-scheme: dark) {
  .pro-result {
    background: rgba(28, 28, 30, 0.8);
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pro-result {
    background: var(--card);
  }
}

.pro-scan {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 12%;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.65);
  opacity: 0;
}

.in .pro-scan {
  animation: proscan 1.6s var(--ease) 1 forwards;
}

@keyframes proscan {
  0% { top: 12%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 62%; opacity: 0; }
}

.pro-badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--sub);
}

.pro-dish {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.pro-dish b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pro-dish span {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.legend.compact {
  gap: 14px;
  margin: 14px 0 0;
  max-width: none;
}

.legend.compact li span:first-child {
  color: var(--c);
  font-size: 13px;
  font-weight: 600;
}

.legend.compact b {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legend.compact .lg-bar {
  height: 6px;
  margin-top: 8px;
}

.pro-section {
  padding: 104px 0;
}

.pro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 72px;
}

.pro-demo {
  width: min(460px, 100%);
}

@media (max-width: 860px) {
  .pro-section {
    padding: 72px 0;
  }
  .pro-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

/* ---------- Statement: words light up as you scroll ---------- */
.statement-section {
  padding: 120px 0 40px;
}

.statement {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: pretty;
}

.statement span {
  color: var(--tx);
  opacity: 0.16;
  transition: opacity 260ms var(--ease);
}

.statement span.lit {
  opacity: 1;
}

@media (max-width: 860px) {
  .statement-section {
    padding: 72px 0 8px;
  }
}

/* ---------- Story: pinned phone, chapters swap as you scroll ---------- */
.story {
  position: relative;
  height: calc(var(--n) * 85vh + 40vh);
}

.story-sticky {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.story-texts {
  position: relative;
  min-height: 300px;
}

.chapter {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(calc(-50% - 16px));
  transition: opacity 180ms linear, transform 300ms var(--ease);
  pointer-events: none;
}

.story[data-active="0"] .chapter[data-ch="0"],
.story[data-active="1"] .chapter[data-ch="1"],
.story[data-active="2"] .chapter[data-ch="2"],
.story[data-active="3"] .chapter[data-ch="3"] {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
  transition: opacity 420ms var(--ease) 160ms, transform 700ms var(--ease) 160ms;
}

.story-phone {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.story-device {
  width: min(330px, calc((100vh - 170px) * 0.46));
  transform: rotateX(3deg) rotateY(calc((0.5 - var(--sp, 0)) * 16deg));
}

.story-device .phone-screen {
  padding: 0;
}

/* The incoming screen fades in on top (opaque); the outgoing one stays put until it's covered. */
.scr {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 50px 14px 0;
  background: var(--bg);
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0ms linear 460ms, transform 0ms linear 460ms;
}

.story[data-active="0"] .scr-0,
.story[data-active="1"] .scr-1,
.story[data-active="2"] .scr-2,
.story[data-active="3"] .scr-3 {
  z-index: 2;
  opacity: 1;
  transform: none;
  transition: opacity 420ms var(--ease), transform 620ms var(--ease);
}

.story[data-active="0"] .scr-0 .ring .seg {
  stroke-dasharray: var(--len) var(--C);
  opacity: 1;
}

.story-dots {
  position: absolute;
  right: max(20px, calc(50% - 560px));
  top: 50%;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}

.story-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--track);
  transition: background 300ms var(--ease), transform 300ms var(--ease);
}

.story[data-active="0"] .story-dots i[data-ch="0"],
.story[data-active="1"] .story-dots i[data-ch="1"],
.story[data-active="2"] .story-dots i[data-ch="2"],
.story[data-active="3"] .story-dots i[data-ch="3"] {
  background: var(--tx);
  transform: scale(1.3);
}

@media (max-width: 860px) {
  .story {
    height: calc(var(--n) * 90vh + 30vh);
  }
  .story-sticky {
    top: 56px;
    height: calc(100vh - 56px);
    align-items: flex-start;
    padding-top: 16px;
  }
  .story-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .story-phone {
    order: -1;
  }
  /* The screens are laid out for a full-size phone; on small viewports they are scaled down
     as a whole (zoom) so nothing wraps or crowds. */
  .story-device {
    width: min(240px, calc((100vh - 350px) * 0.46));
  }
  .story-device .scr {
    width: calc(100% / 0.7);
    height: calc(100% / 0.7);
    inset: 0 auto auto 0;
    scale: 0.7;
    transform-origin: 0 0;
  }
  .story-device .p-tabbar {
    left: 8px;
    right: 8px;
    bottom: 9px;
    height: 36px;
  }
  .story-device .p-tab svg {
    width: 15px;
    height: 15px;
  }
  .story-texts {
    min-height: 210px;
  }
  .chapter {
    top: 0;
    text-align: center;
    transform: translateY(24px);
  }
  .story[data-active="0"] .chapter[data-ch="0"],
  .story[data-active="1"] .chapter[data-ch="1"],
  .story[data-active="2"] .chapter[data-ch="2"],
  .story[data-active="3"] .chapter[data-ch="3"] {
    transform: none;
  }
  .chapter .h2 {
    font-size: 30px;
  }
  .chapter .copy {
    margin: 10px auto 0;
    font-size: 16px;
  }
  .story-dots {
    display: none;
  }
}

/* Story screen 1: water */
.sw-card {
  padding: 18px 16px 16px;
  margin-bottom: 10px;
}

.sw-now b {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--water);
}

.sw-now span {
  font-size: 15px;
  color: var(--sub);
}

.sw-track {
  position: relative;
  height: 14px;
  margin-top: 26px;
  border-radius: 7px;
  background: var(--track);
}

.sw-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  border-radius: 7px;
  background: var(--water);
  transition: width 1200ms var(--ease) 250ms;
}

.sw-thumb {
  position: absolute;
  top: 50%;
  left: 20%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: left 1200ms var(--ease) 250ms;
}

.story[data-active="1"] .sw-fill {
  width: 60%;
}

.story[data-active="1"] .sw-thumb {
  left: 60%;
}

.sw-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--tx);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 300ms var(--ease) 900ms, transform 300ms var(--ease) 900ms;
}

.story[data-active="1"] .sw-bubble {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sw-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 1px;
}

.sw-ticks i {
  width: 1px;
  height: 5px;
  background: var(--sep);
}

.sw-ticks i:nth-child(5n + 1) {
  height: 8px;
  background: var(--sub);
}

.sw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--sub);
}

.sw-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px 0 9px;
  border-radius: 15px;
  background: var(--quiet);
  color: var(--tx);
  font-weight: 600;
}

.sw-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.sw-log {
  padding: 4px 0;
}

.w-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.w-row + .w-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 0;
  height: 0.5px;
  background: var(--sep);
}

.w-row span {
  color: var(--sub);
}

.w-row b {
  color: var(--water);
  font-weight: 600;
}

/* Story screen 2: favourites */
.sf-head {
  margin: 4px 4px 0;
}

.sf-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sf-stack {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  margin: 26px auto 0;
}

.sf-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 5px solid var(--card);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--float);
  transition: transform 700ms var(--ease) 700ms, opacity 500ms var(--ease) 700ms;
}

.sf-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-card.k0 { z-index: 3; transform: rotate(-2deg); }
.sf-card.k1 { z-index: 2; transform: translate(-20px, 6px) rotate(-10deg) scale(0.94); }
.sf-card.k2 { z-index: 1; transform: translate(20px, 4px) rotate(9deg) scale(0.92); }

.story[data-active="2"] .sf-card.k0 {
  transform: translate(130%, -30%) rotate(24deg);
  opacity: 0;
}

.story[data-active="2"] .sf-card.k1 {
  transform: rotate(-2deg);
}

.sf-heart {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 22px auto 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--float);
}

.sf-heart svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--tx);
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: fill 200ms linear 350ms, stroke 200ms linear 350ms, transform 300ms var(--ease) 350ms;
}

.story[data-active="2"] .sf-heart svg {
  fill: var(--heart);
  stroke: var(--heart);
  transform: scale(1.15);
}

.sf-chosen {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.sf-chosen span {
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 2px solid var(--heart);
  border-radius: 50%;
}

.sf-chosen span:last-child {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 300ms var(--ease) 1100ms, transform 400ms var(--ease) 1100ms;
}

.story[data-active="2"] .sf-chosen span:last-child {
  opacity: 1;
  transform: none;
}

.sf-chosen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Story screen 3: search */
.ss-field {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--search);
  font-size: 14px;
}

.ss-field svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--sub);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ss-field .s-caret {
  height: 16px;
  margin-left: -4px;
}

.ss-list {
  margin-top: 8px;
  padding: 2px 0;
  list-style: none;
  border-radius: 16px;
  background: var(--card);
}

.ss-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms var(--ease), transform 360ms var(--ease);
}

.ss-list li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 56px;
  right: 0;
  height: 0.5px;
  background: var(--sep);
}

.story[data-active="3"] .ss-list li {
  opacity: 1;
  transform: none;
}

.story[data-active="3"] .ss-list li:nth-child(1) { transition-delay: 1100ms; }
.story[data-active="3"] .ss-list li:nth-child(2) { transition-delay: 1180ms; }
.story[data-active="3"] .ss-list li:nth-child(3) { transition-delay: 1260ms; }
.story[data-active="3"] .ss-list li:nth-child(4) { transition-delay: 1340ms; }

.ss-thumb {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.ss-list .s-text b {
  font-size: 13px;
}

.ss-list .s-text span {
  font-size: 11px;
}

.ss-list .s-kcal {
  font-size: 13px;
}

.ss-barcode {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
}

.ss-barcode svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ss-barcode .s-scan {
  top: 6px;
  animation-name: scan-sm;
}

@keyframes scan-sm {
  to {
    top: 36px;
  }
}

/* ---------- Try it: the two interactive cards ---------- */
.try {
  padding: 104px 0;
}

.try-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.try-head .copy {
  margin: 16px auto 0;
}

.try-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.try .wcard {
  background: var(--bg);
  box-shadow: none;
}

@media (max-width: 860px) {
  .try {
    padding: 72px 0;
  }
  .try-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }
}

/* ---------- Trust + FAQ ---------- */
.trust {
  padding: 96px 0;
}

.trust-grid,
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: start;
}

.trust-list {
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-top: 0.5px solid var(--sep);
}

.trust-list li:first-child {
  padding-top: 4px;
  border-top: 0;
}

.trust-list b {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.trust-list span {
  font-size: 17px;
  line-height: 1.45;
  color: var(--copy);
}

.faq-section {
  padding: 96px 0;
}

.card {
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--lift);
}

.faq {
  overflow: hidden;
}

.faq details + details {
  border-top: 0.5px solid var(--sep);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 16px 22px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--sub);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}

.faq details[open] summary svg {
  transform: rotate(180deg);
}

.faq details p {
  padding: 0 22px 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--copy);
}

.faq details p a {
  color: var(--tx);
}

@media (max-width: 860px) {
  .trust,
  .faq-section {
    padding: 72px 0;
  }
  .trust-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0 48px;
  border-top: 0.5px solid var(--sep);
  font-size: 13px;
  color: var(--sub);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer a {
  color: var(--tx);
  font-size: 15px;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer .brand {
  font-size: 22px;
}

.footer .brand:hover {
  text-decoration: none;
}

.footer-bottom {
  display: grid;
  gap: 6px;
  margin-top: 24px;
  line-height: 1.4;
}

/* ---------- Legal pages ---------- */
.doc {
  max-width: 800px;
  padding-top: 40px;
  padding-bottom: 72px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.doc .updated {
  margin-top: 10px;
  font-size: 15px;
  color: var(--sub);
}

.doc .intro {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--copy);
}

.doc section {
  margin-top: 16px;
  padding: 22px 24px;
}

.doc h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc section p,
.doc section ul {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--copy);
}

.doc section strong {
  color: var(--tx);
}

.doc section ul {
  padding-left: 20px;
}

.doc section li + li {
  margin-top: 8px;
}

.doc section a {
  color: var(--tx);
}

@media (max-width: 600px) {
  .doc section {
    padding: 18px;
  }
}

/* Photo credits table */
.credits {
  margin-top: 24px;
  overflow-x: auto;
}

.credits table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.credits th {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
  color: var(--sub);
}

.credits td {
  padding: 10px 16px;
  border-top: 0.5px solid var(--sep);
  color: var(--copy);
  vertical-align: middle;
}

.credits td:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tx);
  font-weight: 600;
}

.credits a {
  color: var(--tx);
}

.cr-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

@media (max-width: 600px) {
  .credits table,
  .credits tbody,
  .credits tr,
  .credits td {
    display: block;
  }
  .credits thead {
    display: none;
  }
  .credits tr {
    padding: 12px 16px;
    border-top: 0.5px solid var(--sep);
  }
  .credits td {
    padding: 2px 0;
    border: 0;
  }
  .credits td:first-child {
    margin-bottom: 6px;
  }
}

/* ---------- Account deletion ---------- */
.del {
  max-width: 560px;
  padding-top: 40px;
  padding-bottom: 72px;
}

.del h1 {
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.del .lead {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--copy);
}

.del .ways {
  margin-top: 28px;
  overflow: hidden;
}

.del .way {
  padding: 18px 20px;
}

.del .way + .way {
  border-top: 0.5px solid var(--sep);
}

.del .way h2 {
  font-size: 17px;
  font-weight: 600;
}

.del .way p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--copy);
}

.panel {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--sub);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 0.5px;
  background: var(--sep);
}

.group {
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 16px;
}

.field:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--sep);
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--tx);
  font: 400 17px/1.2 var(--font);
  letter-spacing: -0.01em;
}

.field input::placeholder {
  color: var(--sub);
  letter-spacing: 0;
  opacity: 1;
}

.field input:disabled {
  opacity: 0.4;
}

.g-logo {
  width: 20px;
  height: 20px;
}

.signed {
  padding: 18px 20px;
}

.signed .who {
  font-size: 15px;
  color: var(--sub);
}

.signed .email {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.check-row input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--tx);
}

.msg {
  font-size: 13px;
  line-height: 1.4;
}

.msg.error {
  color: var(--heart);
}

.msg.ok {
  color: var(--tx);
  font-size: 17px;
  font-weight: 600;
}

.small {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sub);
}

.small a {
  color: var(--tx);
}

/* ---------- 404 ---------- */
.nf {
  padding: 96px 20px 120px;
  text-align: center;
}

.nf h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nf p {
  margin: 10px 0 28px;
  color: var(--copy);
}

/* Product walkthrough and support, below the home-page story. */
.sampler { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px clamp(40px,7vw,104px); align-items:center }
.sampler .try-grid { display:contents }
.sampler .try-head { margin:0; text-align:left; align-self:end }
.sampler .try-head .copy { margin:12px 0 0; max-width:36ch }
.sampler .wcard { grid-column:1; grid-row:2; align-self:start; margin:0; width:100%; max-width:none }
.sampler .fav { grid-area:1/2/3/3; display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; justify-items:start }
.sampler .fav-stack { grid-column:1/-1; width:100%; aspect-ratio:1.45; margin:0; border-radius:20px; overflow:hidden }
.sampler .fav-card[data-k] { transform:none; border:0; border-radius:0; box-shadow:none }
.sampler .fav-count { grid-column:1; grid-row:2; margin:0; font-size:15px }
.sampler .fav-heart { grid-column:2; grid-row:2; width:44px; height:44px; box-shadow:none }
.sampler .fav-heart svg { width:21px }
.pro-grid .pro-demo { grid-column:1; grid-row:1; width:100%; border-radius:20px; overflow:hidden; background:var(--card) }
.pro-grid .pro-copy { grid-column:2; grid-row:1 }
.pro-demo .pro-photo { aspect-ratio:1.45; border-radius:0 }
.pro-demo .pro-result { position:static; background:var(--card); color:var(--tx); backdrop-filter:none; -webkit-backdrop-filter:none; border:0; border-radius:0; box-shadow:none; opacity:1; transform:none; padding:20px 24px }
.pro-copy .pro-list li { display:block; padding:14px 0; border-bottom:1px solid var(--sep) }
.pro-copy .pro-list { gap:0 }
.trust-grid { display:block }
.trust-grid .trust-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(24px,4vw,60px); margin:36px 0 0 }
.trust-grid .trust-list li { display:block; border:0; border-top:1px solid var(--sep); padding:18px 0 0 }
.trust-grid .trust-list span { display:block; margin-top:8px }
.faq-grid { max-width:820px; display:block }
.faq-grid .faq { margin-top:28px; border-radius:0; background:transparent; box-shadow:none; border-block:1px solid var(--sep) }
.faq-grid .faq summary { padding:20px 0; font-size:clamp(17px,2vw,21px); font-weight:500 }
.faq-grid .faq details p { padding:0 36px 20px 0 }
@media(max-width:740px){
  .sampler { display:flex; flex-direction:column; align-items:stretch; gap:24px }
  .sampler .try-head,.sampler .wcard { align-self:stretch }
  .sampler .fav { margin-top:12px }
  .pro-grid { display:flex; flex-direction:column; align-items:stretch }
  .trust-grid .trust-list { grid-template-columns:1fr; gap:20px }
}
@media(min-width:741px) and (max-width:860px){
  .pro-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
}

.footer-top-home {
  justify-content: flex-start;
  gap: 16px 48px;
}
.footer-top-home .footer-links { flex-basis: 100%; }
.store-marks { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
@media (max-width: 560px) {
  .footer-top-home { column-gap: 20px; }
}
.store-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  color: var(--tx);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
}
.store-mark svg { width: 19px; height: 19px; fill: currentColor; }
.footer a.store-mark:hover { color: var(--sub); }

/* ---------- Real app screenshots inside the phones ---------- */
.phone-screen picture,
.phone-screen .shot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.phone-screen .shot {
  object-fit: cover;
  object-position: top center;
}

/* The screenshots already include the app's own status-bar space and tab bar. */
.phone-screen::before {
  z-index: 6;
}

.story-device .scr,
.scr {
  padding: 0;
}

@media (max-width: 860px) {
  .story-device .scr {
    width: 100%;
    height: 100%;
    scale: none;
  }
}

/* ---------- FAQ: centred title ---------- */
.faq-grid > div:first-child {
  text-align: center;
}

/* ==========================================================================
   Realistic phone (overrides the simple frame above). Everything is sized in
   cqw of the .phone container, so the device keeps its proportions at any size.
   Structure: .phone (size + container) > .phone-body (titanium band, buttons,
   shadow) > .phone-screen (display; the black bezel is its spread shadow).
   ========================================================================== */
.phone {
  container-type: inline-size;
  aspect-ratio: 9 / 19.5;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.phone-body {
  position: absolute;
  inset: 0;
  border-radius: 16cqw;
  /* brushed titanium band */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 22%, rgba(255, 255, 255, 0) 78%, rgba(255, 255, 255, 0.18)),
    linear-gradient(90deg, #4b4b50, #2a2a2d 8%, #1f1f22 50%, #2a2a2d 92%, #4b4b50);
  box-shadow:
    inset 0 0 0 0.35cqw rgba(255, 255, 255, 0.22),
    inset 0 0 0 0.9cqw rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 3cqw 6cqw -2cqw rgba(15, 15, 25, 0.35),
    0 14cqw 26cqw -8cqw rgba(15, 15, 25, 0.45);
}

@media (prefers-color-scheme: dark) {
  .phone-body {
    box-shadow:
      inset 0 0 0 0.35cqw rgba(255, 255, 255, 0.3),
      inset 0 0 0 0.9cqw rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}

/* Side buttons: volume up/down (left, one element + its shadow copy) and side button (right). */
.phone-body::before,
.phone-body::after {
  content: "";
  position: absolute;
  width: 1.1cqw;
  border-radius: 0.6cqw;
  background: linear-gradient(90deg, #2a2a2d, #5a5a60 60%, #2a2a2d);
}

.phone-body::before {
  left: -0.9cqw;
  top: 25%;
  height: 13cqw;
  box-shadow: 0 17cqw 0 #3a3a3e;
}

.phone-body::after {
  right: -0.9cqw;
  top: 30%;
  height: 21cqw;
}

.phone-screen {
  position: absolute;
  inset: 3.4cqw;
  height: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 12.6cqw;
  background: var(--bg);
  /* black bezel around the display */
  box-shadow: 0 0 0 2.2cqw #050506;
}

/* Dynamic Island */
.phone-screen::before {
  top: 2.6cqw;
  left: 50%;
  z-index: 6;
  width: 29cqw;
  height: 8.4cqw;
  margin-left: -14.5cqw;
  border-radius: 99px;
  background: #000;
  box-shadow: inset 0 0 0 0.3cqw rgba(255, 255, 255, 0.05);
}

/* Glass: a soft diagonal reflection, stronger while the hero phone is tilted. */
.phone-glare {
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.06) 28%, rgba(255, 255, 255, 0) 45%);
}

.story-device .phone-screen {
  padding: 0;
}

/* ---------- Hero on phones: the whole device is visible, photos stay on screen ---------- */
@media (max-width: 860px) {
  .stage {
    height: calc(min(250px, 64vw) * 19.5 / 9 + 70px);
  }
  .hero-phone {
    top: 20px;
    width: min(250px, 64vw);
    transform: translateX(-50%) rotateX(calc((1 - var(--p)) * 14deg + 2deg)) rotateY(calc((1 - var(--p)) * -14deg))
      rotateZ(calc((1 - var(--p)) * 4deg)) scale(calc(1 + var(--p) * 0.04));
  }
  .orbit {
    border-width: 4px;
    border-radius: 22px;
  }
  .o1 { --x: calc(-50vw + 20px); --y: 70px; --s: min(100px, 25vw); }
  .o2 { --x: calc(-50vw + 28px); --y: 300px; --s: min(90px, 23vw); }
  .o3 { --x: calc(50vw - 20px - min(100px, 25vw)); --y: 40px; --s: min(100px, 25vw); }
  .o4 { --x: calc(50vw - 28px - min(90px, 23vw)); --y: 290px; --s: min(90px, 23vw); }
  .orbit {
    transform: translate(var(--x), calc(var(--y) - var(--p) * 60px));
  }
  .floor {
    bottom: 10px;
    width: 300px;
    margin-left: -150px;
  }
}

/* ==========================================================================
   Header: language dropdown + mobile menu; hero layout on phones.
   ========================================================================== */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  color: var(--copy);
  font-size: 15px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}

.lang-menu[open] summary svg {
  transform: rotate(180deg);
}

.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--float), 0 0 0 0.5px var(--sep);
}

.lang-list a {
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--tx);
  font-size: 16px;
  text-decoration: none;
}

.lang-list a:hover {
  background: var(--quiet);
}

.lang-list a[aria-current] {
  font-weight: 600;
}

.menu-btn {
  display: none;
  place-items: center;
  align-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--tx);
  transition: transform 220ms var(--ease), opacity 160ms linear;
}

.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mnav {
  display: grid;
  padding: 4px 20px 18px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--sep);
}

.mnav[hidden] {
  display: none;
}

.mnav a {
  padding: 15px 0;
  border-top: 0.5px solid var(--sep);
  color: var(--tx);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.mnav a:first-child {
  border-top: 0;
}

@media (min-width: 761px) {
  .mnav {
    display: none !important;
  }
}

/* Secondary hero action: quiet fill, same size as the primary. */
.btn-ghost {
  background: var(--quiet);
  color: var(--tx);
}

.btn-ghost svg {
  width: 16px;
  height: 16px;
}

/* Kicker as a quiet pill above the title. */
.hero-kicker {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 99px;
  background: var(--card);
  box-shadow: var(--lift), 0 0 0 0.5px var(--sep);
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 760px) {
  .header .wrap {
    gap: 12px;
  }
  .header-end {
    gap: 10px;
  }
  .menu-btn {
    display: grid;
  }
  .hero {
    padding-top: 20px;
  }
  .hero h1 {
    margin-top: 14px;
    font-size: clamp(40px, 11.6vw, 50px);
  }
  .hero .lead {
    font-size: 17px;
  }
  .hero .actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
  }
  .hero .actions .btn {
    width: min(100%, 360px);
  }
  /* bigger phone; the photos bleed off the screen edges behind it */
  .stage {
    height: calc(min(300px, 74vw) * 19.5 / 9 + 60px);
    margin-top: 28px;
  }
  .hero-phone {
    width: min(300px, 74vw);
  }
  .o1 { --x: calc(-50vw - 5vw); --y: 40px; --s: 33vw; }
  .o2 { --x: calc(-50vw - 3vw); --y: 300px; --s: 30vw; }
  .o3 { --x: calc(50vw - 28vw); --y: 30px; --s: 33vw; }
  .o4 { --x: calc(50vw - 27vw); --y: 280px; --s: 30vw; }
}

@media (max-width: 360px) {
  .header-end .btn-sm {
    padding: 0 12px;
    font-size: 14px;
  }
}

/* The outermost hero photos only appear when they fit completely; otherwise just a white sliver
   of their frame showed at the page edge (looked like a stray light, top right). */
@media (max-width: 1499px) {
  .o5,
  .o6 {
    display: none;
  }
}

/* No white highlights on the device: an even dark titanium band, no glass glare. */
.phone-body {
  background: linear-gradient(90deg, #2c2c2f, #1f1f22 10%, #1b1b1e 50%, #1f1f22 90%, #2c2c2f);
  box-shadow:
    inset 0 0 0 0.35cqw rgba(255, 255, 255, 0.06),
    inset 0 0 0 0.9cqw rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 3cqw 6cqw -2cqw rgba(15, 15, 25, 0.35),
    0 14cqw 26cqw -8cqw rgba(15, 15, 25, 0.45);
}

@media (prefers-color-scheme: dark) {
  .phone-body {
    background: linear-gradient(90deg, #3a3a3e, #2a2a2d 10%, #232326 50%, #2a2a2d 90%, #3a3a3e);
    box-shadow:
      inset 0 0 0 0.35cqw rgba(255, 255, 255, 0.08),
      inset 0 0 0 0.9cqw rgba(0, 0, 0, 0.55);
  }
}

.phone-glare {
  display: none;
}

/* Footer links and store marks behave like the header nav: no underline, they brighten on
   hover / press (dimmer at rest, full text colour when pointed at or tapped). */
.footer-links a,
.footer .store-mark {
  color: var(--copy);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.footer-links a:hover,
.footer-links a:active,
.footer-links a:focus-visible,
.footer .store-mark:hover,
.footer .store-mark:active,
.footer a.store-mark:hover {
  color: var(--tx);
  text-decoration: none;
}

/* "Coming soon to iPhone" note under the hero buttons (shown only after a tap on iPhone/iPad). */
.dl-soon {
  flex-basis: 100%;
  margin: 4px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--sub);
}
.dl-soon[hidden] {
  display: none;
}

/* ---------- Support form (same look as the account-deletion page) ---------- */
.field textarea,
.field select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--tx);
  font: 400 17px/1.35 var(--font);
  letter-spacing: -0.01em;
}
.field textarea::placeholder {
  color: var(--sub);
  letter-spacing: 0;
  opacity: 1;
}
.field-area {
  height: auto;
  padding: 14px 16px;
}
.field-area textarea {
  min-height: 150px;
  resize: vertical;
}
.field-select {
  gap: 12px;
}
.field-label {
  color: var(--sub);
  font-size: 17px;
}
.field-select select {
  appearance: none;
  -webkit-appearance: none;
  text-align: right;
  text-align-last: right;
  padding-right: 24px;
  cursor: pointer;
}
.field-select select option {
  background: var(--card);
  color: var(--tx);
}
.field-select svg {
  position: absolute;
  right: 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--sub);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.field input:disabled,
.field textarea:disabled,
.field select:disabled {
  opacity: 0.4;
}
.sup .msg.error {
  font-size: 15px;
}
/* Honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sup-done {
  padding: 24px 22px;
  outline: none;
}
.sup-done h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sup-done p {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--copy);
}
.nav a[aria-current="page"] {
  color: var(--tx);
}

/* Support topic: a styled dropdown in the form group (Apple-style menu card, check on the chosen one). */
.sup .group {
  overflow: visible;
}
.dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tx);
  font: 500 17px/1.2 var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
}
.dd-btn::after {
  content: "";
  position: absolute;
  inset: 0;
}
.dd .dd-btn svg {
  position: static;
  width: 16px;
  height: 16px;
  transition: transform 200ms var(--ease);
}
.dd-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.dd-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.dd-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 8px;
  z-index: 20;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 0 0 0.5px var(--sep);
  outline: none;
  animation: dd-in 160ms var(--ease);
}
@keyframes dd-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}
@media (prefers-color-scheme: dark) {
  .dd-list {
    background: #2c2c2e;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  }
}
.dd-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 44px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--tx);
  font-size: 17px;
  cursor: pointer;
}
.dd-list li.active {
  background: var(--quiet);
}
.dd-list li svg {
  position: static;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}
.dd-list li[aria-selected="true"] {
  font-weight: 600;
}
.dd-list li[aria-selected="true"] svg {
  visibility: visible;
}
/* ---------- Support desk (staff) ---------- */
.desk {
  padding-top: 32px;
  padding-bottom: 72px;
}
.desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.desk-head h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.desk-who {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--sub);
}
.desk-who .btn-text {
  height: 36px;
  font-size: 15px;
}
.desk-auth {
  padding-top: 8px;
}
.desk-msg {
  margin-top: 16px;
  font-size: 15px;
}
.desk-noaccess {
  margin-top: 20px;
  padding: 18px 20px;
  font-size: 16px;
}
.desk-app {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}
.desk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.desk-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 99px;
  background: var(--quiet);
  color: var(--tx);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}
.desk-filter[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-fg);
}
.desk-count:empty {
  display: none;
}
.desk-count {
  opacity: 0.6;
}
.desk-list {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 70vh;
  overflow: auto;
}
.desk-list li + li .desk-item {
  border-top: 0.5px solid var(--sep);
}
.desk-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: var(--tx);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.desk-item:hover,
.desk-item[aria-current="true"] {
  background: var(--quiet);
}
.desk-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
}
.desk-item-top span {
  flex: none;
  font-size: 13px;
  color: var(--sub);
}
.desk-item-sub {
  overflow: hidden;
  font-size: 14px;
  color: var(--copy);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.desk-item-tags {
  display: flex;
  gap: 6px;
}
.pill {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--quiet);
  color: var(--copy);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}
.pill.st-open { background: rgba(62, 138, 216, 0.16); color: var(--water); }
.pill.st-in_progress { background: var(--streak-bg); color: var(--streak); }
.pill.st-resolved { background: var(--green-fill); color: var(--green); }
.desk-empty,
.desk-pick {
  padding: 24px 4px;
  color: var(--sub);
  font-size: 15px;
}
.desk-detail {
  min-height: 300px;
  padding: 22px 24px;
}
.desk-back {
  display: none;
  height: 36px;
  margin-bottom: 8px;
  font-size: 15px;
}
.desk-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  transform: rotate(90deg);
}
.desk-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.desk-meta h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.desk-from,
.desk-when {
  margin-top: 4px;
  font-size: 14px;
  color: var(--sub);
}
.desk-from a {
  color: var(--tx);
}
.desk-status {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--sub);
}
.desk-status select,
.desk-reply textarea,
.desk-note textarea {
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  color: var(--tx);
  font: 400 16px/1.4 var(--font);
}
.desk-status select {
  height: 38px;
  padding: 0 12px;
}
.desk-body {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.desk-sub {
  margin-top: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.desk-thread {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.desk-thread:empty {
  display: none;
}
.desk-thread li {
  padding: 12px 14px;
  border-left: 3px solid var(--sep);
}
.desk-reply-meta {
  font-size: 12px;
  color: var(--sub);
}
.desk-thread p {
  margin-top: 4px;
  font-size: 15px;
  white-space: pre-wrap;
}
.desk-reply,
.desk-note {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.desk-reply textarea,
.desk-note textarea {
  width: 100%;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
}
.desk-note label {
  font-size: 13px;
  color: var(--sub);
}
.desk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.desk-actions .btn {
  height: 42px;
  border-radius: 99px;
  font-size: 15px;
}
.desk-ok {
  font-size: 14px;
  color: var(--green);
}
@media (max-width: 860px) {
  .desk-app {
    grid-template-columns: minmax(0, 1fr);
  }
  .desk-app .desk-detail {
    display: none;
  }
  .desk-app.has-ticket .desk-side {
    display: none;
  }
  .desk-app.has-ticket .desk-detail {
    display: block;
  }
  .desk-back {
    display: inline-flex;
  }
  .desk-detail {
    padding: 18px 16px;
  }
}

/* Desk sign-in / no-rank state: one narrow centred column, like a sign-in page. */
.desk.is-gate {
  max-width: 440px;
  min-height: calc(100vh - 64px - 220px);
  padding-top: clamp(40px, 9vh, 96px);
}
.desk.is-gate .desk-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.desk.is-gate .desk-auth {
  max-width: none;
  padding-top: 0;
}
.desk.is-gate .desk-auth .lead {
  text-align: center;
}
.desk.is-gate .desk-noaccess,
.desk.is-gate .desk-msg {
  text-align: center;
}

/* Support: topic-specific extras, slide open under the topic row (all optional). */
.sup-extra {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: -16px; /* cancels the panel gap while closed */
  transition: grid-template-rows 260ms var(--ease), opacity 200ms var(--ease), margin-top 260ms var(--ease);
}
.sup-extra.open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0;
}
.sup-extra-in {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 12px;
}
.sup-extra:not(.open) .sup-extra-in {
  visibility: hidden;
  transition: visibility 0s 260ms;
}
.sup-q {
  padding: 0 4px;
  font-size: 15px;
  color: var(--sub);
}
.sup-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sup-pill {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 99px;
  background: var(--card);
  color: var(--tx);
  font: 500 16px/1 var(--font);
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.sup-pill[aria-checked="true"] {
  background: var(--btn);
  color: var(--btn-fg);
  font-weight: 600;
}
.sup-shot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.sup-shot-btn {
  border-radius: 99px;
  cursor: pointer;
}
.sup-shot-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.sup-shot-btn[hidden] {
  display: none;
}
.sup-shot-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 6px 6px 6px;
  border-radius: 14px;
  background: var(--card);
  font-size: 14px;
}
.sup-shot-file[hidden] {
  display: none;
}
.sup-shot-file img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
}
.sup-shot-file > span {
  overflow: hidden;
  max-width: 180px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sup-shot-x {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--quiet);
  color: var(--tx);
  cursor: pointer;
}
.sup-shot-x svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.sup-hint {
  flex-basis: 100%;
  padding: 0 4px;
  font-size: 13px;
  color: var(--sub);
}
@media (prefers-reduced-motion: reduce) {
  .sup-extra { transition: none; }
}

/* Desk: ticket details (topic extra, screenshot, context). */
.desk-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 14px 0 0;
  font-size: 14px;
}
.desk-details[hidden] {
  display: none;
}
.desk-details dt {
  color: var(--sub);
}
.desk-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.desk-shot {
  display: block;
  max-width: min(320px, 100%);
  max-height: 240px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg);
}

/* Support: "Sending failed" card (same card as the thank-you one, red title). */
.sup-fail h2 {
  color: var(--heart);
}
.sup-done .sup-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--sub);
}
.sup-done .sup-note[hidden] {
  display: none;
}
.desk-warn {
  flex-basis: 100%;
  font-size: 14px;
  color: var(--streak);
}
.desk-warn[hidden] {
  display: none;
}

/* ==========================================================================
   Support desk v2 (AI-assisted): summary chips, tabs, priority badges, SLA,
   issue-group rows, AI box, user card, reply box, quick actions, templates.
   ========================================================================== */
.desk-app { display: block; margin-top: 20px; }
.desk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.desk-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; }
.desk-chip {
  height: 36px; padding: 0 14px; border: 0; border-radius: 99px; cursor: pointer;
  font: 600 14px/1 var(--font); color: var(--tx); background: var(--quiet);
}
.desk-chip.tone-red { background: rgba(229, 72, 77, 0.16); color: var(--heart); }
.desk-chip.tone-orange { background: var(--streak-bg); color: var(--streak); }
.desk-chip.tone-blue { background: rgba(62, 138, 216, 0.16); color: var(--water); }
.desk-chip.tone-yellow { background: rgba(219, 154, 46, 0.18); color: var(--carbs); }
.desk-chip[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: 1px; }
.desk-chip-clear { height: 36px; font-size: 14px; }
.desk-tpl-btn { height: 36px; font-size: 14px; }
.desk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.desk-cols { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.desk-list { max-height: 74vh; }
.pbadge {
  display: inline-grid; place-items: center; min-width: 28px; height: 20px; padding: 0 6px;
  border-radius: 6px; font: 700 11px/1 var(--font); color: #fff; background: #8e8e93; flex: none;
}
.pbadge.p1 { background: #e5484d; }
.pbadge.p2 { background: #f57c12; }
.pbadge.p3 { background: #d4a514; color: #1c1c1e; }
.pbadge.p4 { background: #8e8e93; }
.sla { flex: none; font-size: 12px; color: var(--sub); }
.sla.soon { color: var(--streak); font-weight: 600; }
.sla.overdue { color: var(--heart); font-weight: 700; }
.desk-item-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.desk-item-who b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.desk-item.group { background: color-mix(in srgb, var(--quiet) 60%, transparent); }
.desk-item.child { padding-left: 34px; }
.desk-item .chev { font-size: 16px; color: var(--sub); transition: transform 200ms var(--ease); }
.desk-item .chev.up { transform: rotate(180deg); }
.pill.muted { opacity: 0.7; }
.pill.st-ai { background: rgba(62, 138, 216, 0.16); color: var(--water); }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.desk-label { margin: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sub); }
.desk-detail h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.desk-meta { align-items: flex-start; }
.desk-ai { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-size: 15px; line-height: 1.45; }
.desk-ai .desk-label { margin-top: 0; }
.desk-ai p + p { margin-top: 6px; }
.desk-user { margin-top: 12px; font-size: 15px; }
.desk-user a { color: var(--tx); }
.desk-user p { margin-top: 2px; font-size: 13px; }
.desk-thread li.from-user { border-left-color: var(--sub); }
.desk-thread li.from-team { border-left-color: var(--green); }
.desk-thread li.from-ai { border-left-color: var(--water); }
.desk-replybox { margin-top: 6px; }
.desk-reply-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.desk-reply-head .desk-label { margin: 18px 0 6px; }
.desk-reply-head .btn-text { height: 32px; font-size: 14px; margin-left: auto; }
.conf { padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.conf-high { background: var(--green-fill); color: var(--green); }
.conf-medium { background: rgba(219, 154, 46, 0.18); color: var(--carbs); }
.conf-low { background: rgba(229, 72, 77, 0.16); color: var(--heart); }
.desk-reply-text, .desk-quick textarea, .desk-replybox textarea {
  width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--bg);
  color: var(--tx); font: 400 15px/1.45 var(--font); resize: vertical; outline: none;
}
.desk-replybox .desk-actions { margin-top: 10px; }
.desk-tpl { height: 42px; padding: 0 12px; border: 0; border-radius: 99px; background: var(--quiet); color: var(--tx); font: 500 14px var(--font); }
.desk-quick { margin-top: 8px; padding-top: 4px; border-top: 0.5px solid var(--sep); }
.desk-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.desk-field { display: grid; gap: 4px; font-size: 13px; color: var(--sub); }
.desk-field select { height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--bg); color: var(--tx); font: 400 15px var(--font); }
.desk-quick .desk-actions { margin: 10px 0; }
.desk-fix-preview { margin-top: 12px; }
.desk-fix-preview pre { white-space: pre-wrap; font: 400 14px/1.45 var(--font); }
.desk-dialog { width: min(640px, calc(100vw - 32px)); max-height: 86vh; padding: 20px 22px; border: 0; color: var(--tx); }
.desk-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.desk-dialog-head { display: flex; align-items: center; justify-content: space-between; }
.desk-dialog-head h2 { font-size: 19px; font-weight: 700; }
.tpl-list { margin: 10px 0; padding: 0; list-style: none; max-height: 30vh; overflow: auto; }
.tpl-form { display: grid; gap: 10px; }
.tpl-form label { display: grid; gap: 4px; font-size: 13px; color: var(--sub); }
.tpl-form input, .tpl-form select, .tpl-form textarea {
  padding: 10px 12px; border: 0; border-radius: 10px; background: var(--bg); color: var(--tx); font: 400 15px/1.4 var(--font);
}
@media (max-width: 860px) {
  .desk-cols { grid-template-columns: minmax(0, 1fr); }
  .desk-app .desk-cols .desk-detail { display: none; }
  .desk-app.has-ticket .desk-cols .desk-side { display: none; }
  .desk-app.has-ticket .desk-cols .desk-detail { display: block; }
  .desk-quick-grid { grid-template-columns: minmax(0, 1fr); }
}
.desk-item .desk-item-top .pbadge { flex: none; color: #fff; font-size: 11px; }
.desk-item .desk-item-top .pbadge.p3 { color: #1c1c1e; }
.desk-item .desk-item-top .desk-item-who { color: var(--tx); font-size: 15px; }
