/* eatnibble.app — tokens and decisions are documented in DESIGN.md */

:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f2f5;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --brand: #16a34a;
  --brand-text: #15803d;
  --brand-soft: rgba(22, 163, 74, 0.1);
  --protein: #0a84ff;
  --fat: #ff9f0a;
  --over: #ff9f0a;
  --nav-bg: rgba(251, 251, 253, 0.78);
  --ai-bg: #f1f8f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 50px -12px rgba(0, 0, 0, 0.16);
  --max-width: 1120px;
  --gutter: 24px;
  --section: clamp(80px, 12vw, 140px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #141416;
    --surface-2: #1f1f22;
    --border: rgba(255, 255, 255, 0.09);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --brand-text: #30d158;
    --brand-soft: rgba(48, 209, 88, 0.14);
    --nav-bg: rgba(0, 0, 0, 0.72);
    --ai-bg: #07130b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 60px -16px rgba(0, 0, 0, 0.8);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.02;
}

h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.06;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.accent {
  color: var(--brand-text);
}

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--text-2);
}

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

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1caf6d, #008a47);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-2);
}

.nav-links a:hover {
  color: var(--text);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: #15923f;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-sm {
  min-height: 36px;
  padding: 8px 16px;
  font-size: 14px;
}

/* Apple's official badge, unaltered: only scaled, min 40px tall, clear space around it */
.store-badge {
  display: inline-block;
  margin: 2px;
  border-radius: 9px;
  transition: opacity 0.15s;
}

.store-badge:hover {
  opacity: 0.85;
}

.store-badge img {
  display: block;
  width: auto;
  height: 60px;
}

.hero-actions .btn {
  min-height: 60px;
  padding-inline: 28px;
}

.text-link {
  display: inline-flex;
  gap: 6px;
  margin-top: 20px;
  font-weight: 600;
  color: var(--brand-text);
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

/* Reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Hero */

.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-copy .lead {
  margin-top: 28px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-2);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% -10% 0;
  background: radial-gradient(closest-side, rgba(22, 163, 74, 0.28), transparent);
  filter: blur(20px);
  z-index: -1;
}

/* Phone mock */

.phone {
  width: min(320px, 100%);
  padding: 11px;
  border-radius: 48px;
  background: #0b0b0c;
  box-shadow: inset 0 0 0 1.5px #3a3a3c, var(--shadow);
  animation: float 7s ease-in-out infinite;
}

.phone-screen {
  border-radius: 38px;
  overflow: hidden;
  background: #000;
  color: #f5f5f7;
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 26px 8px;
  font-size: 12px;
  font-weight: 600;
}

.phone-island {
  width: 86px;
  height: 24px;
  border-radius: 999px;
  background: #0b0b0c;
  box-shadow: 0 0 0 1px #1c1c1e;
}

.shot {
  position: relative;
  margin: 4px 12px 0;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 300 / 190;
}

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

.macro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.macro-pills span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #1c1c1e;
  font-size: 11.5px;
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot.carbs {
  background: var(--brand);
}

.dot.protein {
  background: var(--protein);
}

.dot.fat {
  background: var(--fat);
}

/* Sections */

.section {
  padding: var(--section) 0;
}

.section-tight {
  padding-top: 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Input methods */

.ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.way {
  padding: 32px 28px 34px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.way:nth-child(3n + 2) {
  transition-delay: 0.08s;
}

.way:nth-child(3n) {
  transition-delay: 0.16s;
}

.way h3 {
  margin: 44px 0 10px;
}

.way p,
.mini p {
  color: var(--text-2);
  font-size: 15px;
}

/* Feature split */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.split-reverse .split-copy {
  order: 2;
}

.split-copy .lead {
  margin-top: 24px;
}

.split-copy .lead + p {
  margin-top: 16px;
  color: var(--text-2);
}

.split-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-card {
  padding: 22px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* AI section */

.ai {
  position: relative;
  padding: var(--section) 0;
  background: var(--ai-bg);
  border-block: 1px solid var(--border);
  overflow: hidden;
}

.ai::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -260px;
  width: 1100px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(22, 163, 74, 0.22), transparent);
  pointer-events: none;
}

.ai .wrap {
  position: relative;
}

.ai-head {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.ai-head .lead {
  max-width: 640px;
  margin: 24px auto 0;
}

.ai-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.ai-logos li,
.ai-logos a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.ai-logos a:hover {
  color: var(--text);
}

.ai-logos img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border), 0 6px 18px -6px rgba(0, 0, 0, 0.25);
}

.ai-scene {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 0.85fr);
  align-items: center;
  gap: 24px;
  max-width: 980px;
  margin: 64px auto 0;
}

.chat {
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.chat-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.chat-bar span {
  margin-left: 8px;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.bubble {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.45;
}

.bubble.user {
  align-self: flex-end;
  background: var(--surface-2);
  border-bottom-right-radius: 6px;
}

.bubble.bot {
  padding: 4px 2px;
  max-width: 100%;
  width: 100%;
}

.bubble.bot ul {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.bubble.bot li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 14px;
}

.bubble.bot li + li {
  border-top: 1px solid var(--border);
}

.bubble.bot li span {
  color: var(--text-2);
}

.muted {
  font-size: 13px;
  color: var(--text-2);
}

.tool {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.tool svg,
.ai-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}

.ai-arrow svg {
  width: 20px;
  height: 20px;
}

.app-drop {
  padding: 18px;
  border-radius: 28px;
  background: #000;
  color: #f5f5f7;
  box-shadow: inset 0 0 0 1.5px #2c2c2e, var(--shadow);
}

.app-drop-label {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8e8e93;
}

.meal-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meal-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(48, 209, 88, 0.16);
  color: #30d158;
}

.meal-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meal-text strong {
  display: block;
  font-size: 15px;
}

.meal-text span {
  font-size: 13px;
  color: #8e8e93;
}

.macro-pills.small span {
  font-size: 11px;
}

.app-drop-note {
  margin-top: 14px;
  font-size: 12px;
  color: #8e8e93;
}

/* Chat sequence: plays once when the scene scrolls in */
.js .ai-scene .b1,
.js .ai-scene .b2,
.js .ai-scene .b3,
.js .ai-scene .b4,
.js .ai-scene .b5 {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .ai-scene.in .b1,
.js .ai-scene.in .b2,
.js .ai-scene.in .b3,
.js .ai-scene.in .b4,
.js .ai-scene.in .b5 {
  opacity: 1;
  transform: none;
}

.js .ai-scene.in .b1 { transition-delay: 0.3s; }
.js .ai-scene.in .b2 { transition-delay: 1.1s; }
.js .ai-scene.in .b3 { transition-delay: 1.7s; }
.js .ai-scene.in .b4 { transition-delay: 2.4s; }
.js .ai-scene.in .b5 { transition-delay: 2.8s; }

.prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 48px;
}

.prompts span {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

.ai-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 980px;
  margin: 64px auto 0;
}

.ai-steps,
.ai-trust {
  padding: 32px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.ai-trust {
  transition-delay: 0.08s;
}

.ai-steps ol,
.checks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.ai-steps li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  color: var(--text-2);
  font-size: 15px;
}

.ai-steps li strong {
  color: var(--text);
}

.ai-steps li b {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

.checks li {
  position: relative;
  padding: 10px 0 10px 34px;
  font-size: 15px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.checks .yes::before {
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.checks .no::before {
  background-color: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.fine {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}

/* App mock UI — mirrors the iOS app's screens (Home, New meal, analysis, History, coach, Weight History) */

:root {
  --m-bg: #f2f2f7;
  --m-card: #ffffff;
  --m-sep: rgba(60, 60, 67, 0.14);
  --m-text: #000;
  --m-text-2: rgba(60, 60, 67, 0.6);
  --m-text-3: rgba(60, 60, 67, 0.3);
  --m-green: #1ba34c;
  --m-green-text: #1f9a48;
  --m-blue: #0a84ff;
  --m-orange: #f08a24;
  --m-red: #e5484d;
  --m-glass: linear-gradient(165deg, #dcefe2 0%, #cfe8d7 100%);
  --m-glass-edge: rgba(255, 255, 255, 0.85);
  --m-chip: #ffffff;
  --m-track: rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  :root {
    --m-bg: #000;
    --m-card: #1c1c1e;
    --m-sep: rgba(84, 84, 88, 0.6);
    --m-text: #fff;
    --m-text-2: rgba(235, 235, 245, 0.6);
    --m-text-3: rgba(235, 235, 245, 0.3);
    --m-green: #30d158;
    --m-green-text: #30d158;
    --m-orange: #ff9f0a;
    --m-red: #ff6961;
    --m-glass: linear-gradient(165deg, #12301d 0%, #0d2416 100%);
    --m-glass-edge: rgba(255, 255, 255, 0.12);
    --m-chip: #2c2c2e;
    --m-track: rgba(255, 255, 255, 0.12);
  }
}

.m-screen {
  padding: 18px;
  border-radius: 32px;
  background: var(--m-bg);
  border: 1px solid var(--border);
  color: var(--m-text);
  font-size: 15px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}

.m-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--m-card);
}

.m-glass {
  padding: 16px 18px;
  border-radius: 24px;
  background: var(--m-glass);
  box-shadow: inset 0 0 0 1px var(--m-glass-edge), 0 8px 24px -14px rgba(22, 100, 50, 0.45);
}

.m-ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-sub { color: var(--m-text-2); }
.m-green { color: var(--m-green-text); }
.m-num { font-variant-numeric: tabular-nums; }
.m-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.m-section-label { margin: 4px 4px -4px; color: var(--m-text-2); font-size: 15px; font-weight: 600; }

/* Summary (Home) */
.m-summary {
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  align-items: center;
  padding: 18px 14px;
}
.m-stat span { display: block; color: var(--m-text-2); font-size: 13px; }
.m-stat strong { display: block; margin-top: 2px; font-size: 24px; font-weight: 400; letter-spacing: -0.01em; }
.m-stat.right { text-align: right; }
.m-gauge { position: relative; aspect-ratio: 1; }
.m-gauge svg { width: 100%; height: 100%; }
.m-gauge circle { fill: none; stroke-width: 13; stroke-linecap: round; }
.m-gauge .track { stroke: var(--m-track); stroke-dasharray: 245 327; }
.m-gauge .fill { stroke: var(--m-green); }
.m-gauge-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.m-gauge-center span { color: var(--m-text-2); font-size: 12px; }
.m-gauge-center strong { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.m-gauge-center small { color: var(--m-text-2); font-size: 11px; }

/* Macro cards */
.m-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-macro { padding: 12px; border-radius: 18px; background: var(--m-card); }
.m-macro strong { display: block; font-size: 14px; }
.m-macro span { display: block; margin-top: 2px; color: var(--m-text-2); font-size: 12px; }
.m-bar { height: 4px; margin-top: 10px; border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, transparent); }
.m-bar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--c); }

/* Rows */
.m-head { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.m-head .m-ico { color: var(--m-green); }
.m-head .m-right { margin-left: auto; color: var(--m-text-2); font-weight: 400; font-size: 15px; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.m-row .m-ico { color: var(--m-green); }
.m-row .m-val { margin-left: auto; color: var(--m-text-2); }
.m-row small { display: block; color: var(--m-text-2); font-size: 12px; }

/* Water */
.m-bottles { display: flex; gap: 10px; margin-top: 12px; }
.m-bottles svg { width: 22px; height: 32px; }
.m-bottles .on { fill: var(--m-green); }
.m-bottles .off { fill: none; stroke: var(--m-text-3); stroke-width: 1.4; }

/* Analysis result */
.m-result-name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.m-result-kcal { margin-top: 2px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.m-result-macros { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--m-sep); text-align: center; }
.m-result-macros span { display: block; color: var(--m-text-2); font-size: 12px; }
.m-result-macros b { font-size: 19px; font-weight: 600; }
.m-micro { margin-top: 6px; text-align: center; color: var(--m-text-2); font-size: 12px; }
.m-primary { padding: 13px; border-radius: 999px; background: #1ba34c; color: #fff; text-align: center; font-size: 16px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }

.m-item { padding: 12px 0; }
.m-item + .m-item { border-top: 1px solid var(--m-sep); }
.m-item-top { display: flex; justify-content: space-between; font-weight: 600; }
.m-item-macros { margin-top: 2px; color: var(--m-text-2); font-size: 12px; }
.m-item-ctrl { display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.m-chip { padding: 5px 9px; border-radius: 999px; background: var(--m-chip); box-shadow: inset 0 0 0 1px var(--m-sep); font-size: 12px; font-weight: 500; }
.m-chip.on { background: var(--m-green); color: #fff; box-shadow: none; }
.m-step { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.m-step-btn { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--m-chip); box-shadow: inset 0 0 0 1px var(--m-sep); color: var(--m-green); font-size: 17px; line-height: 1; }
.m-step b { font-size: 15px; font-weight: 600; }
.m-step b small { color: var(--m-text-2); font-weight: 400; }
.m-input { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 10px 16px; border-radius: 999px; background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-sep); color: var(--m-text-3); }
.m-send { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--m-text-3); color: var(--m-card); }

/* History */
.m-avg { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
.m-avg > div + div { border-left: 1px solid var(--m-sep); }
.m-avg span { display: block; color: var(--m-text-2); font-size: 12px; }
.m-avg strong { display: block; color: var(--m-green-text); font-size: 20px; font-weight: 600; }
.m-tip { display: flex; align-items: center; gap: 10px; margin: 12px -18px -16px; padding: 12px 18px; border-top: 1px solid var(--m-sep); }
.m-tip .m-ico { color: var(--m-green); }
.m-tip strong { display: block; font-size: 14px; }
.m-tip span { display: block; color: var(--m-text-2); font-size: 12px; }

.m-chart { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 4px; height: 130px; margin: 14px 34px 0 0; border-bottom: 1px solid var(--m-sep); }
.m-chart i { height: var(--h); border-radius: 2px 2px 0 0; background: var(--m-green); }
.m-chart .m-goal, .m-chart .m-avgline { position: absolute; left: 0; right: 0; }
.m-chart .m-goal { bottom: 66.7%; border-top: 1.5px dashed color-mix(in srgb, var(--m-green) 55%, transparent); }
.m-chart .m-avgline { bottom: 56%; border-top: 1.5px solid color-mix(in srgb, var(--m-green) 75%, transparent); }
.m-chart em { position: absolute; font-style: normal; font-size: 11px; }
.m-chart .m-goal em { left: 0; bottom: 4px; color: var(--m-text-2); }
.m-chart .m-avgline em { right: 0; bottom: 4px; color: var(--m-green-text); }
.m-chart .m-axis { position: absolute; right: -34px; display: grid; height: 100%; align-content: space-between; color: var(--m-text-2); font-size: 11px; }
.m-chart-x { display: flex; justify-content: space-between; margin: 6px 34px 0 0; color: var(--m-text-2); font-size: 11px; }

/* Coach */
.m-coach-meta { color: var(--m-text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.m-coach-headline { font-size: 18px; font-weight: 600; line-height: 1.3; }
.m-coach-card .m-head { font-size: 16px; }
.m-coach-card p { margin-top: 6px; }
.m-coach-card.slip .m-head, .m-coach-card.slip .m-head .m-ico { color: var(--m-red); }
.m-coach-card.win .m-head, .m-coach-card.next .m-head { color: var(--m-green-text); }
.m-qchips { display: flex; gap: 8px; overflow: hidden; }
.m-qchip { flex: none; padding: 8px 13px; border-radius: 999px; background: color-mix(in srgb, var(--m-green) 16%, var(--m-bg)); color: var(--m-green-text); font-size: 14px; }

/* Weight */
.m-goalcard .top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 16px; }
.m-goalcard .top span { color: var(--m-green-text); font-weight: 400; font-size: 14px; }
.m-progress { height: 5px; margin-top: 10px; border-radius: 5px; background: color-mix(in srgb, var(--m-green) 18%, transparent); }
.m-progress i { display: block; width: var(--w); height: 100%; border-radius: 5px; background: var(--m-green); }
.m-goalcard .ends { display: flex; justify-content: space-between; margin-top: 6px; color: var(--m-text-2); font-size: 13px; }
.m-line svg { width: 100%; height: auto; display: block; }
.m-line .grid { stroke: var(--m-sep); stroke-width: 1; }
.m-line .goal { stroke: var(--m-green); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .8; }
.m-line .path { fill: none; stroke: var(--m-green); stroke-width: 2.4; stroke-linejoin: round; }
.m-line .dot { fill: var(--m-green); }
.m-line text { fill: var(--m-text-2); font-size: 11px; font-family: inherit; }
.m-line .flag { fill: var(--m-green-text); }

/* New meal drawer */
.m-drawer-head { display: flex; justify-content: space-between; align-items: center; }
.m-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-sep); }
.m-methods-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.m-methods-top .m-primary { display: flex; align-items: center; justify-content: center; gap: 8px; }
.m-glassbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 18px; background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-sep), 0 1px 2px rgba(0,0,0,.04); font-size: 13px; font-weight: 600; }
.m-glassbtn .m-ico { color: var(--m-green); }
.m-methods-top .m-glassbtn { flex-direction: row; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.m-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-saved .m-row { border-bottom: 1px solid var(--m-sep); padding: 10px 0; }
.m-plus { display: grid; place-items: center; margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: #1ba34c; color: #fff; font-size: 17px; line-height: 1; }

.phone-screen.m-app { background: var(--m-bg); color: var(--m-text); }
.m-screen-flat { padding: 6px 14px 18px; gap: 10px; border: 0; border-radius: 0; box-shadow: none; }
.m-screen-flat .shot { margin: 0; }
.m-title-sm { font-size: 22px; }
.m-card-list { padding-block: 4px; }
.split-visual .m-screen { width: 100%; max-width: 460px; margin-inline: auto; }
.ways-split { margin-bottom: clamp(48px, 6vw, 80px); }

@media (max-width: 480px) {
  .m-screen { padding: 14px; border-radius: 26px; }
  .m-summary { grid-template-columns: 1fr 128px 1fr; gap: 4px; padding: 14px 10px; }
  .m-stat span { font-size: 12px; }
  .m-stat strong { font-size: 19px; }
  .m-gauge-center span, .m-gauge-center small { font-size: 10px; }
  .m-gauge-center strong { font-size: 22px; }
  .m-item-ctrl { flex-wrap: wrap; }
  .m-chip { padding: 5px 7px; }
}

/* Small things */

.minis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mini {
  padding: 28px 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.mini:nth-child(4n + 2) { transition-delay: 0.06s; }
.mini:nth-child(4n + 3) { transition-delay: 0.12s; }
.mini:nth-child(4n) { transition-delay: 0.18s; }

.mini h3 {
  margin: 28px 0 8px;
  font-size: 17px;
}

/* Privacy */

.privacy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.privacy-icon {
  width: 56px;
  height: 56px;
  padding: 13px;
  border-radius: 18px;
  background: var(--brand-soft);
  fill: none;
  stroke: var(--brand-text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy h2 {
  font-size: clamp(26px, 3.2vw, 36px);
}

.privacy p {
  margin-top: 14px;
  max-width: 680px;
  color: var(--text-2);
}

.privacy .text-link {
  margin-top: 18px;
}

/* Final CTA */

.final {
  padding: 0 0 var(--section);
  text-align: center;
}

.final .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-mark-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 28px;
  box-shadow: 0 16px 40px -12px rgba(22, 163, 74, 0.6);
}

.final .lead {
  margin: 16px 0 32px;
}

/* AI page (ai.html) */

[hidden] {
  display: none !important;
}

.aip-hero {
  position: relative;
  padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 9vw, 112px);
  background: var(--ai-bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.aip-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -280px;
  width: 1100px;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(22, 163, 74, 0.22), transparent);
  pointer-events: none;
}

.aip-hero .wrap {
  position: relative;
}

.aip-hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
}

.aip-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.uses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.use {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.use-prompt {
  align-self: flex-start;
  margin-bottom: 28px;
  padding: 10px 14px;
  border-radius: 18px 18px 6px 18px;
  background: var(--surface-2);
  font-size: 15px;
}

.use h3 {
  margin-bottom: 8px;
}

.use p:not(.use-prompt) {
  color: var(--text-2);
  font-size: 15px;
}

.use code,
.server code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.use code {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(12px);
}

.uses-note {
  margin-top: 28px;
  color: var(--text-2);
  font-size: 15px;
}

.setup {
  padding: var(--section) 0;
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.setup-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}

.setup .section-head {
  margin-bottom: 32px;
}

.setup .section-head .lead {
  margin-top: 20px;
}

.server {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.server > div {
  min-width: 0;
}

.server-label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
}

.server code {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.copy-btn {
  flex-shrink: 0;
  min-width: 84px;
  background: var(--surface);
}

.picker {
  min-width: 0;
}

.picker-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.picker-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 14px 4px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.picker-tabs button:hover {
  color: var(--text);
}

.picker-tabs img,
.guide h3 img {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}

.picker-tabs button[aria-selected="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  color: var(--text);
}

.guide {
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.picker:not(.tabbed) .guide + .guide {
  margin-top: 12px;
}

.guide h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tabbed .guide h3 img {
  display: none;
}

.guide ol {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.guide li {
  position: relative;
  padding: 10px 0 10px 44px;
  counter-increment: step;
  font-size: 16px;
}

.guide li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 700;
}

.guide li:last-child::before {
  background: var(--brand);
  color: #fff;
}

.guide-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

.approve-visual {
  position: relative;
  min-height: 430px;
}

.code-page {
  width: min(320px, 62%);
  text-align: center;
}

.code-label {
  font-size: 13px;
  color: var(--text-2);
}

.code-digits {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 16px;
}

.code-digits i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 50px;
  border-radius: 10px;
  background: var(--surface-2);
  font-style: normal;
  font-size: 24px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.code-digits i:nth-child(3) {
  margin-right: 8px;
}

.code-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--surface-2);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.consent {
  position: absolute;
  right: 0;
  top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 230px;
  padding: 22px 18px 16px;
  border-radius: 32px;
  background: #000;
  color: #f5f5f7;
  box-shadow: inset 0 0 0 1.5px #2c2c2e, var(--shadow);
  text-align: center;
}

.consent-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}

.consent-pair img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
}

.consent-app {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.consent-dots {
  display: flex;
  gap: 4px;
}

.consent-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #636366;
}

.consent-title {
  margin-top: 14px;
  font-size: 17px;
}

.consent-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 12px;
  color: #30d158;
}

.consent-verified svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consent ul {
  width: 100%;
  margin: 14px 0;
  padding: 0;
  list-style: none;
  border-radius: 12px;
  background: #1c1c1e;
  text-align: left;
}

.consent li {
  padding: 9px 12px;
  font-size: 12.5px;
}

.consent li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.consent-btn {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.consent-deny {
  margin-top: 8px;
  font-size: 13px;
  color: #8e8e93;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fact {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.fact h2 {
  margin: 24px 0 12px;
  font-size: clamp(24px, 2.6vw, 30px);
}

.fact p {
  color: var(--text-2);
  font-size: 15px;
}

.fact .inline,
.trouble .inline {
  color: var(--brand-text);
}

.trouble {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}

.trouble .contact-card {
  margin-top: 0;
}

.trouble-list details:first-child {
  border-top: 1px solid var(--border);
}

.trouble h2 {
  margin-bottom: 24px;
  font-size: clamp(28px, 3.4vw, 40px);
}

.trouble details {
  border-bottom: 1px solid var(--border);
}

.trouble summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.trouble summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--text-2);
  transition: transform 0.2s;
}

.trouble details[open] summary::after {
  transform: rotate(45deg);
}

.trouble details p {
  padding: 0 0 18px;
  color: var(--text-2);
}

.trouble .contact-card h3 {
  margin-bottom: 6px;
}

.trouble .contact-card p {
  color: var(--text-2);
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  font-size: 14px;
  color: var(--text-2);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-2);
}

/* Simple content pages (privacy / terms / support / AI guide) */

.doc {
  padding: 56px 0 80px;
}

.doc .wrap {
  max-width: 720px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 40px);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.doc .updated {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 40px;
}

.doc h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 36px 0 12px;
}

.doc p,
.doc li {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}

.doc p + p {
  margin-top: 12px;
}

.doc ul,
.doc ol {
  padding-left: 20px;
  margin: 12px 0;
}

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

.doc code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.doc a.inline {
  color: var(--brand-text);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item h2 {
  margin: 0 0 8px;
}

.contact-card {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.contact-card h2 {
  margin-top: 0;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .split-reverse .split-copy {
    order: 0;
  }

  .hero-visual {
    margin-top: 8px;
  }

  .split-visual {
    width: 100%;
    max-width: 560px;
  }

  .minis {
    grid-template-columns: 1fr 1fr;
  }

  .ai-scene {
    grid-template-columns: 1fr;
    max-width: 560px;
    justify-items: center;
  }

  .ai-scene > * {
    width: 100%;
  }

  .ai-scene .ai-arrow {
    width: 44px;
    transform: rotate(90deg);
  }

  .js .ai-scene.in .ai-arrow {
    transform: rotate(90deg);
  }

  .ai-details {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .uses,
  .facts,
  .setup-grid,
  .trouble {
    grid-template-columns: 1fr;
  }

  .approve-visual {
    width: 100%;
    max-width: 560px;
  }

  .way h3 {
    margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  /* Phone: the badge is the only button; the AI CTA becomes a text link under it */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .hero-actions .btn-ghost {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand-text);
    font-size: 17px;
  }

  .hero-actions .btn-ghost::after {
    content: "→";
  }

  .hero-note {
    text-align: center;
  }

  .ways,
  .minis {
    grid-template-columns: 1fr;
  }

  .privacy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 20px;
  }

  .ai-steps,
  .ai-trust {
    padding: 24px;
  }

  .mock-card {
    padding: 18px;
  }

  .guide {
    padding: 22px 20px;
  }

  .code-page {
    width: 100%;
    margin-right: 0;
  }

  .code-digits i {
    width: 36px;
    height: 46px;
    font-size: 20px;
  }

  .approve-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-height: 0;
  }

  .consent {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal,
  .js .ai-scene .b1,
  .js .ai-scene .b2,
  .js .ai-scene .b3,
  .js .ai-scene .b4,
  .js .ai-scene .b5 {
    opacity: 1;
    transform: none;
  }
}

/* Shared plan / report page (share.html, served at /p/<id> and /r/<id>) */

.share {
  padding: clamp(40px, 7vw, 72px) 0 clamp(64px, 9vw, 112px);
}

.share .wrap {
  max-width: 880px;
}

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

.share-head {
  margin-bottom: 32px;
}

.share-head h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.04;
}

.share-byline {
  margin-top: 10px;
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 600;
  color: var(--text);
}

.share-range,
.share-meta {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 15px;
}

.share-meta {
  margin-top: 14px;
  font-size: 13px;
}

.share-note {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: var(--surface-2);
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.share-actions {
  display: flex;
  gap: 8px;
  margin: -12px 0 20px;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.share-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.share-card-wide {
  grid-column: 1 / -1;
}

.share-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.share-card-title .icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.share-fine {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.share-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

/* Macro ring */

.share-macros {
  display: flex;
  align-items: center;
  gap: 22px;
}

.share-ring {
  position: relative;
  flex: none;
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.share-ring-hole {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 50%;
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
}

.share-legend {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
  min-width: 0;
}

.share-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.share-legend strong {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* Calorie cycling week */

.share-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.share-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.share-day-name {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.share-day-bar {
  width: 100%;
  max-width: 34px;
  height: 56px;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: inset 0 -32px 0 0 color-mix(in srgb, var(--brand) 45%, transparent);
}

.share-day.is-low .share-day-bar {
  box-shadow: inset 0 -18px 0 0 color-mix(in srgb, var(--brand) 25%, transparent);
}

.share-day.is-high .share-day-bar {
  box-shadow: inset 0 -56px 0 0 var(--brand);
}

.share-day-level {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--text-2);
}

.share-day.is-high .share-day-level {
  color: var(--brand-text);
  font-weight: 600;
}

/* Fasting */

.share-big {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.share-fast-bar {
  display: flex;
  gap: 4px;
  height: 12px;
  margin-top: 16px;
}

.share-fast-fast,
.share-fast-eat {
  border-radius: 6px;
}

.share-fast-fast {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}

.share-fast-eat {
  background: var(--brand);
}

/* Rows: recipes, meals */

.share-list,
.share-items,
.share-days,
.share-meals {
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-row + .share-row,
.share-day-block + .share-day-block {
  border-top: 1px solid var(--border);
}

.share-row {
  padding: 14px 0;
}

.share-row:first-child,
.share-day-block:first-child {
  padding-top: 0;
}

.share-row:last-child,
.share-day-block:last-child {
  padding-bottom: 0;
}

.share-row-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.share-row h3,
.share-day-head h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.share-row-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.share-row-sub {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 13px;
}

.share-macro-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.share-macro-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-details {
  margin-top: 10px;
}

.share-details summary {
  width: fit-content;
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.share-items {
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}

.share-item,
.share-meal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.share-item + .share-item {
  border-top: 1px solid var(--border);
}

.share-item-amount,
.share-item-kcal,
.share-meal-kcal {
  color: var(--text-2);
  text-align: right;
}

.share-item-name,
.share-meal-name {
  overflow-wrap: anywhere;
}

/* Import panel */

.share-import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 40px;
  margin-top: 32px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 28px;
  background: var(--brand-soft);
}

.share-import h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.share-steps {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--text);
}

.share-steps li + li {
  margin-top: 4px;
}

.share-import-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.share-import-actions .btn {
  min-width: 184px;
  background: var(--surface);
}

/* Report */

.share-stats {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 10px;
}

.share-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
}

.share-stat strong {
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.share-stat-main strong {
  font-size: 32px;
  color: var(--brand-text);
}

.share-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.share-chart {
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  align-items: end;
  gap: clamp(2px, 0.8vw, 8px);
  height: 160px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
}

.share-bar {
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.share-bar-fill {
  width: 100%;
  max-width: 28px;
  margin: 0 auto;
  border-radius: 6px 6px 2px 2px;
  background: var(--brand);
}

.share-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--text-2);
  font-size: 12px;
}

.share-day-block {
  padding: 18px 0;
}

.share-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.share-day-head strong {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.share-meals {
  margin-top: 10px;
  padding: 2px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}

.share-meal {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.share-meal + .share-meal {
  border-top: 1px solid var(--border);
}

.share-meal-time {
  color: var(--text-2);
}

.share-foot {
  margin-top: 20px;
  text-align: center;
}

/* Loading / empty states */

.share-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 0;
  text-align: center;
}

.share-empty .icon {
  width: 44px;
  height: 44px;
  stroke: var(--text-2);
}

.share-empty h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.share-empty .lead {
  max-width: 460px;
  margin-bottom: 8px;
}

.share-skeleton {
  border-radius: 10px;
  background: var(--surface-2);
}

.share-skeleton-eyebrow { width: 160px; height: 26px; border-radius: 999px; margin-bottom: 18px; }
.share-skeleton-title { width: min(420px, 80%); height: 52px; margin-bottom: 14px; }
.share-skeleton-line { width: 180px; height: 20px; margin-bottom: 36px; }
.share-skeleton-card { height: 220px; background: var(--surface-2); border-color: transparent; }

.js .share-skeleton,
.js .share-skeleton-card {
  animation: share-pulse 1.4s ease-in-out infinite;
}

@keyframes share-pulse {
  50% { opacity: 0.55; }
}

@media (max-width: 720px) {
  .share-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-import {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-import-actions {
    align-items: flex-start;
  }

  .share-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .share-stat-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .share-card {
    padding: 18px;
  }

  .share-macros {
    flex-direction: column;
    align-items: stretch;
  }

  .share-ring {
    align-self: center;
  }

  .share-stat {
    padding: 12px 10px;
  }

  .share-stat strong {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .share-skeleton,
  .js .share-skeleton-card {
    animation: none;
  }
}

@media print {
  .share-page .nav,
  .share-page footer,
  .share-page .skip-link,
  .share-actions,
  .share-import {
    display: none;
  }

  .share-page {
    background: #fff;
    color: #000;
  }

  .share-card {
    break-inside: avoid;
    border-color: #ddd;
  }

  .share-day-block {
    break-inside: avoid;
  }
}
