/* ==========================================================================
   CaloFlag — shared site styles
   Tokens and components from the 2026-10 redesign handoff. Same system as
   sugarflag-web/css/site.css with CaloFlag brand values (persimmon accent,
   waitlist form, macro card). Every page links this file; per-page <style>
   blocks are gone.
   ========================================================================== */

:root {
  /* Colors */
  --bg: #FFF8EE;
  --ink: #1C2A20;
  --muted: #5A6B5F;
  --muted-2: #3C4A41;
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --green-soft: #E0F2E9;
  --green-light: #7BC47F;
  --accent: #E8562D;
  --accent-dark: #B5401E; /* small error text on --accent-soft (AA); --accent itself is for large text and icons */
  --accent-soft: #FBE8E4;
  --amber: #D9A441;
  --line: #E8DFD0;
  --sand: #F6F1EA;
  --white: #FFFFFF;
  --on-green-2: rgba(255, 255, 255, 0.85);
  --on-ink: #FFF8EE;
  --on-ink-2: rgba(255, 248, 238, 0.78);

  /* Aliases read by css/consent.css */
  --primary: var(--green);
  --primary-dark: var(--green-dark);
  --primary-soft: var(--green-soft);
  --surface: var(--white);
  --border: var(--line);
  --text-secondary: var(--muted);

  /* Type */
  --font-body: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(48px, 7vw, 96px);

  /* Shape */
  --r-pill: 999px;
  --r-photo: 22px;
  --r-hero: 28px;
  --r-panel: 32px;
  --r-card: 24px;
  --r-callout: 18px;
  --r-input: 14px;
  --r-tile: 12px;

  /* Shadows: the only three in the system */
  --shadow-hero: 0 30px 60px -30px rgba(28, 42, 32, 0.35);
  --shadow-pin: 0 8px 24px -8px rgba(28, 42, 32, 0.4);
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

h1 {
  letter-spacing: -0.015em;
}

h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--green-dark);
}

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

img {
  height: auto;
}

strong {
  font-weight: 600;
}

button {
  font: inherit;
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 0 0 var(--r-tile) 0;
}

.skip-link:focus {
  top: 0;
  color: var(--on-ink);
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

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

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

.section-last {
  padding-bottom: var(--section);
}

.page {
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: var(--section);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  text-wrap: pretty;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  padding: 18px var(--gutter);
}

.site-nav {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--ink);
}

.logo-icon {
  width: 30px;
  height: 30px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--green);
}

.nav-links a.is-active {
  font-weight: 600;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--green);
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
}

.btn-ink {
  background: var(--ink);
  color: var(--on-ink);
}

.btn-ink:hover {
  background: var(--green);
  color: var(--white);
}

.btn-inverted {
  background: var(--bg);
  color: var(--ink);
}

.btn-inverted:hover {
  background: var(--white);
  color: var(--ink);
}

.btn-sm {
  font-size: 15px;
  padding: 13px 22px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline-color: currentColor;
}

/* --------------------------------------------------------------------------
   Waitlist form (hero + green panel)
   -------------------------------------------------------------------------- */

.waitlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 440px;
}

.waitlist-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 6px 6px 20px;
}

.waitlist-pill:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.waitlist-pill input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 8px 0;
}

.waitlist-pill input::placeholder {
  color: var(--muted);
}

.waitlist-pill .btn {
  font-size: 15px;
  padding: 13px 22px;
}

.waitlist-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

/* The launch note never fits beside the radios in the 440px column, so it is
   always its own line rather than a wrapped fragment with a dangling "·". */
.waitlist-note {
  flex-basis: 100%;
}

.pill-radios {
  display: flex;
  gap: 6px;
}

.pill-radio {
  position: relative;
  cursor: pointer;
}

.pill-radio input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.pill-radio span {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pill-radio:hover span {
  border-color: var(--muted);
  color: var(--ink);
}

.pill-radio input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.pill-radio input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Dark variant: on the green panel */

.waitlist-dark .waitlist-pill {
  border: 0;
}

.waitlist-dark .waitlist-pill:focus-within {
  outline-color: var(--white);
}

.waitlist-dark .waitlist-pill .btn {
  background: var(--ink);
  color: var(--on-ink);
}

.waitlist-dark .waitlist-pill .btn:hover {
  background: #0F1A13;
}

.waitlist-dark .waitlist-meta {
  color: var(--on-green-2);
}

.waitlist-dark .pill-radio span {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.waitlist-dark .pill-radio:hover span {
  border-color: var(--white);
  color: var(--white);
}

.waitlist-dark .pill-radio input:checked + span {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink);
}

.waitlist-dark .pill-radio input:focus-visible + span {
  outline-color: var(--white);
}

/* --------------------------------------------------------------------------
   Flag icon
   -------------------------------------------------------------------------- */

.flag-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.flag-dot svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter) 32px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
}

.footer-brand .logo {
  font-size: 17px;
}

.footer-brand .logo-icon {
  width: 26px;
  height: 26px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--muted);
}

.footer-cols {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.footer-heading {
  font-weight: 600;
}

.footer-col a {
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  max-width: var(--container);
  margin: 32px auto 0;
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Landing — hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(32px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero h1 {
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.02;
}

.accent-word {
  color: var(--accent);
}

.hero .lead {
  font-size: clamp(17px, 1.4vw, 20px);
  max-width: 440px;
}

.hero-visual {
  position: relative;
}

.hero-photo {
  border-radius: var(--r-hero);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
  box-shadow: var(--shadow-hero);
}

.hero-photo img,
.hero-photo picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Calorie flag pins. --x/--y anchor the dot; --pin recolors (default accent). */

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  color: var(--pin, var(--accent));
}

.pin-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-radius: var(--r-pill);
  padding: 8px 12px 8px 10px;
  box-shadow: var(--shadow-pin);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.pin-label .flag-dot {
  background: currentColor;
}

.pin-label .flag-dot svg {
  fill: var(--white);
}

.pin-label b {
  color: var(--ink);
  font-weight: 600;
}

.pin-label em {
  font-style: normal;
  color: currentColor;
}

.pin-stem {
  width: 2px;
  height: 22px;
  background: var(--white);
}

.pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px currentColor;
}

/* Landing — fact strip */

.fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.fact-stat {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.fact-text {
  font-size: 17px;
  color: var(--muted);
  max-width: 460px;
  text-wrap: pretty;
}

/* Landing — how it works */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-photo {
  border-radius: var(--r-photo);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
}

.step-photo picture,
.step-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--green);
  line-height: 1.2;
  min-width: 28px;
}

.step h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.step p {
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

/* Landing — result panel */

.result-panel {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-panel);
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.result-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-copy h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
}

.result-copy p {
  color: var(--on-ink-2);
  font-size: 17px;
  max-width: 420px;
  text-wrap: pretty;
}

.dot-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.dot-list li {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dot-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
}

/* Macro card */

.meal-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r-card);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  justify-self: center;
  box-shadow: var(--shadow-card);
}

.meal-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.meal-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-input);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--sand);
}

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

.meal-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.meal-time {
  font-size: 14px;
  color: var(--muted);
}

.meal-kcal {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.meal-kcal b {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.meal-kcal span {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

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

.macro {
  background: var(--sand);
  border-radius: var(--r-tile);
  padding: 10px 12px;
}

.macro-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.macro-bar {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  margin-top: 8px;
  overflow: hidden;
}

.macro-bar span {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: var(--bar, var(--green));
  border-radius: var(--r-pill);
}

.plate-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-green {
  background: var(--green-soft);
  color: var(--green-dark);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
}

.meal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.meal-actions span {
  flex: 1;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
}

/* Landing — why photo-first */

.why {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.why-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.why-copy h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
}

.why-copy p {
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}

.reasons {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.reason {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.reason-num {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--green);
  line-height: 1.3;
}

.reason strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.reason span {
  font-size: 15px;
  color: var(--muted);
}

/* Landing — waitlist CTA panel */

.cta-panel {
  background: var(--green);
  color: var(--white);
  border-radius: var(--r-panel);
  padding: clamp(36px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.cta-panel h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.08;
  margin-bottom: 10px;
}

.cta-panel p {
  font-size: 17px;
  color: var(--on-green-2);
  text-wrap: pretty;
}

.cta-panel .waitlist {
  justify-self: end;
}

/* --------------------------------------------------------------------------
   Support
   -------------------------------------------------------------------------- */

.support-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}

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

.support-head > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.side-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}

.side-layout-legal {
  grid-template-columns: 240px minmax(0, 1fr);
}

.side-nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.side-nav a {
  color: var(--muted);
}

.side-nav a:hover {
  color: var(--green);
}

.side-nav a.is-active {
  color: var(--ink);
  font-weight: 500;
}

.side-content {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
}

.side-content section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-content h2 {
  font-size: 30px;
  line-height: 1.15;
}

.steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 14px;
}

.num-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.steps .num-circle {
  margin-top: 3px;
}

.tab-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.tab-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-callout);
  padding: 20px;
}

.tab-card svg {
  width: 22px;
  height: 22px;
  stroke: var(--green);
  margin-bottom: 12px;
}

.tab-card > strong {
  display: block;
  margin-bottom: 4px;
}

.tab-card span {
  color: var(--muted);
}

.faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

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

.faq-item h3 {
  font-size: 19px;
  margin: 0 0 8px;
}

.faq-item p {
  color: var(--muted);
  font-size: 16px;
}

.faq-item p + p {
  margin-top: 8px;
}

.ink-cta {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 15px;
}

.ink-cta strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.ink-cta span {
  color: rgba(255, 248, 238, 0.75);
}

/* --------------------------------------------------------------------------
   Legal
   -------------------------------------------------------------------------- */

.switch {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 14px;
  flex-wrap: wrap;
}

.switch-item {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-weight: 500;
}

a.switch-item:hover {
  border-color: var(--green);
  color: var(--green);
}

.switch-item.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
}

.legal-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.legal-date {
  font-size: 14px;
  color: var(--muted);
}

.legal-agree {
  font-size: 16px;
  font-weight: 600;
}

.toc {
  font-size: 14px;
  gap: 10px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.toc a {
  display: flex;
  gap: 10px;
}

.toc-num {
  color: var(--green);
  font-weight: 600;
  min-width: 20px;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 48px);
  max-width: 720px;
  font-size: 16px;
  line-height: 1.7;
}

.legal-body section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-body h2 {
  font-size: 26px;
  line-height: 1.15;
  display: flex;
  gap: 14px;
}

.legal-body h2 .num {
  color: var(--green);
}

.legal-body h3 {
  font-size: 18px;
  margin-top: 8px;
}

.legal-body ul {
  padding-left: 22px;
  color: var(--muted-2);
}

.legal-body li + li {
  margin-top: 6px;
}

.legal-body li ul {
  margin-top: 6px;
}

.legal-foot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 15px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Utility pages (thank-you, verify, reset, delete account)
   -------------------------------------------------------------------------- */

.util {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.util-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 64px) var(--gutter);
}

.util-card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.util-card h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.08;
}

.util-card p {
  font-size: 17px;
  color: var(--muted);
  text-wrap: pretty;
}

.util-card .small {
  font-size: 14px;
}

.util-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.util-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.util-icon-error {
  background: var(--accent-soft);
}

.util-icon-error svg {
  width: 30px;
  height: 30px;
  stroke: var(--accent);
  stroke-width: 2.4;
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--green);
  animation: cf-spin 0.8s linear infinite;
}

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

.util-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.util-state.is-active {
  display: flex;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-top: 8px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.form input {
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--r-input);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease;
}

.form input:focus {
  border-color: var(--green);
}

.form .btn {
  margin-top: 6px;
}

.form-error {
  display: none;
  width: 100%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: var(--r-tile);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.form-error.is-visible {
  display: block;
}

.util-footer {
  padding: 24px var(--gutter);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Delete-account: utility shell with a reading column */

.util-doc {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
  font-size: 16px;
  line-height: 1.7;
  align-self: flex-start;
}

.util-doc h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.06;
}

.util-doc header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.util-doc section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.util-doc h2 {
  font-size: 26px;
  line-height: 1.15;
}

.util-doc ul {
  padding-left: 22px;
  color: var(--muted-2);
}

.util-doc li + li {
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero,
  .fact,
  .result-panel,
  .why,
  .cta-panel,
  .support-head,
  .side-layout,
  .side-layout-legal {
    grid-template-columns: minmax(0, 1fr);
  }

  .pin {
    display: none;
  }

  .fact {
    align-items: start;
  }

  .meal-card {
    max-width: none;
  }

  .cta-panel .waitlist {
    justify-self: start;
  }

  .side-nav {
    position: static;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  .toc a {
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .menu-toggle {
    display: flex;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 12px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li + li {
    border-top: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 17px;
  }

  .hero h1 {
    font-size: clamp(36px, 10vw, 40px);
  }

  .waitlist {
    max-width: none;
  }

  .waitlist-pill {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--r-card);
    padding: 8px;
  }

  .waitlist-pill input {
    padding: 10px 12px;
  }

  .waitlist-pill .btn {
    width: 100%;
  }

  .cta-panel {
    padding: 28px 24px;
  }

  .ink-cta .btn,
  .util-card .btn,
  .support-head .btn {
    width: 100%;
  }

  .support-head > div {
    align-items: stretch;
  }

  .footer-inner {
    flex-direction: column;
    gap: 28px;
  }

  .footer-cols {
    gap: 28px 40px;
  }
}

@media (max-width: 400px) {
  .macro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
