/* Dietbot website: brand tokens match Dietbot/Resources/Assets.xcassets (green #4CAF50). No JavaScript. */
:root {
  --brand: #2E7D32;
  --brand-fill: #4CAF50;
  --brand-tint: #E8F5E9;
  --on-brand: #FFFFFF;
  --text: #1C1C1E;
  --secondary: #5F6368;
  --background: #FFFFFF;
  --subtle: #F5F7F5;
  --card: #FFFFFF;
  --rule: #E3E7E2;
  --warning: #E65100;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 14px 36px rgba(20, 40, 20, .10);
  --radius: 24px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #66BB6A; --brand-fill: #4CAF50; --brand-tint: #14231A; --on-brand: #102A12;
    --text: #F5F5F7; --secondary: #A1A6AB; --background: #0F1210; --subtle: #151916; --card: #1B201C;
    --rule: #2A312B; --warning: #FFB74D; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --brand: #66BB6A; --brand-fill: #4CAF50; --brand-tint: #14231A; --on-brand: #102A12;
  --text: #F5F5F7; --secondary: #A1A6AB; --background: #0F1210; --subtle: #151916; --card: #1B201C;
  --rule: #2A312B; --warning: #FFB74D; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.12; }
:focus-visible { outline: 3px solid var(--brand-fill); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 8px; }
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Header (every page) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar { max-width: var(--max); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-header nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.site-header nav a { color: var(--text); text-decoration: none; opacity: .82; }
.site-header nav a:hover { opacity: 1; color: var(--brand); }

/* ---------- Buttons ---------- */
.button, .store {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600;
  border-radius: 999px; padding: 12px 22px; transition: transform .2s ease, box-shadow .2s ease;
}
.button { background: var(--brand); color: var(--on-brand); }
.store { background: #000; color: #fff; border-radius: 14px; padding: 9px 18px; flex-direction: column; align-items: flex-start; gap: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .store { background: #fff; color: #000; } }
.store small { font-size: 11px; font-weight: 500; opacity: .8; line-height: 1.2; }
.store b { font-size: 18px; line-height: 1.2; }
.store.sm { padding: 6px 14px; border-radius: 11px; }
.store.sm b { font-size: 14px; }
.link-arrow { font-weight: 600; text-decoration: none; }
.button:hover, .store:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .16); }

/* ---------- Landing layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section-alt { background: var(--subtle); }
.section-tint { background: var(--brand-tint); }
.eyebrow { color: var(--brand); font-weight: 600; font-size: 15px; letter-spacing: .02em; margin: 0 0 10px; }
.h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; margin: 0; max-width: 20ch; text-wrap: balance; }
.lead { color: var(--secondary); font-size: 19px; max-width: 58ch; margin: 16px 0 0; }
.center { text-align: center; }
.center .h2, .center .lead { margin-left: auto; margin-right: auto; }
.note { color: var(--secondary); font-size: 14px; margin: 18px 0 0; }

/* Hero */
.hero { position: relative; padding: 64px 0 88px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; top: -260px; right: -220px; width: 900px; height: 900px; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-fill) 24%, transparent), transparent);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); font-weight: 800; margin: 0; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--brand-fill); }
.hero .lead { font-size: 21px; margin-top: 20px; }
.actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }

/* Phone frame around a screenshot */
.phone {
  position: relative; width: 290px; aspect-ratio: 600 / 1304; border-radius: 46px; padding: 9px;
  background: #1C1C1E; box-shadow: var(--shadow), inset 0 0 0 2px #3A3A3C; margin: 0 auto;
}
.phone img { width: 100%; height: 100%; border-radius: 38px; object-fit: cover; }
.phone.sm { width: 240px; border-radius: 40px; padding: 8px; }
.phone.sm img { border-radius: 33px; }
.stage { position: relative; display: flex; justify-content: center; padding: 20px 0; }

/* Floating cards around the hero phone */
.float { position: absolute; background: var(--card); color: var(--text); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.bubble { top: 40px; left: -8px; max-width: 250px; padding: 14px 16px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.wave { display: flex; gap: 3px; align-items: center; height: 20px; margin-top: 10px; }
.wave i { width: 3px; border-radius: 3px; background: var(--brand-fill); }
.foods { bottom: 40px; right: -16px; width: 272px; padding: 8px; }
.foods .total { display: flex; justify-content: space-between; padding: 6px 10px 2px; font-size: 13px; color: var(--secondary); font-weight: 600; }
.food { display: flex; align-items: center; gap: 10px; padding: 9px 10px; font-size: 14px; }
.food + .food { border-top: 1px solid var(--rule); }
.food .dot { width: 30px; height: 30px; border-radius: 9px; background: #FF9800; display: grid; place-items: center; color: #fff; flex: none; }
.food .dot .icon { width: 18px; height: 18px; }
.food b { display: block; font-weight: 600; }
.food small { color: var(--secondary); }
.food .kcal { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); border-radius: 6px; padding: 1px 6px; }

/* Strip of promises */
.strip { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.strip div { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.strip .icon { color: var(--brand); width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--brand-tint); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.step { text-align: center; }
.step .num { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-weight: 700; margin: 24px 0 10px; }
.step h3 { margin: 0 0 6px; font-size: 21px; }
.step p { margin: 0 auto; color: var(--secondary); max-width: 30ch; }

/* Cards and grids */
.cards { display: grid; gap: 16px; margin-top: 48px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.five { grid-template-columns: repeat(5, 1fr); }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 22px; }
.section-alt .card, .section-tint .card { border-color: transparent; }
.card .icon { color: var(--brand); margin-bottom: 14px; width: 28px; height: 28px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--secondary); font-size: 15px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-tint); border-radius: 6px; padding: 2px 7px; margin-left: 6px; vertical-align: 2px; }
.footnote { text-align: center; color: var(--secondary); margin: 28px 0 0; }

/* Text beside a picture */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--secondary); }
.checks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checks b { color: var(--text); }

/* Scan spotlight: a meal photo with what Dietbot found */
.photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; }
.found { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.found span { background: rgba(0, 0, 0, .62); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.credit { color: var(--secondary); font-size: 12px; margin: 8px 0 0; }

/* Weekly targets, like alarms */
.schedule { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 22px; max-width: 440px; margin: 0 auto; width: 100%; }
.schedule .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.schedule .row + .row { border-top: 1px solid var(--rule); }
.schedule .kcal { font-size: 32px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
.schedule .kcal small { font-size: 15px; font-weight: 600; color: var(--secondary); }
.schedule .days { color: var(--secondary); font-size: 14px; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--brand-fill); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; right: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch.off { background: var(--rule); }
.switch.off::after { right: auto; left: 3px; }

/* Ask Dietbot */
.chips { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 28px; }
.chips span { background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 15px; }
.chips span:first-child { background: var(--brand-tint); border-color: transparent; color: var(--brand); }

/* Light and dark side by side */
.pair { display: flex; justify-content: center; gap: 36px; margin-top: 56px; flex-wrap: wrap; }
.pair figure { margin: 0; text-align: center; }
.pair figcaption { color: var(--secondary); font-size: 14px; margin-top: 12px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 44px; }
.plan { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 24px; position: relative; }
.plan.featured { border: 2px solid var(--brand-fill); }
.plan .badge { position: absolute; top: -12px; left: 20px; background: var(--brand-fill); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { margin: 0; font-size: 17px; }
.plan .price { font-size: 34px; font-weight: 700; margin: 10px 0 2px; letter-spacing: -.02em; }
.plan p { margin: 0; color: var(--secondary); font-size: 14px; }

/* FAQ and closing call to action */
.faq { max-width: 780px; margin: 44px auto 0; }
details { background: var(--card); border-radius: 16px; padding: 16px 20px; margin: 10px 0; border: 1px solid var(--rule); }
.section-alt details { border-color: transparent; }
summary { font-weight: 600; cursor: pointer; }
details p, details ul { margin: 10px 0 0; color: var(--secondary); }
.cta { text-align: center; }
.cta img { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.cta .actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 36px 0 52px; color: var(--secondary); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { color: var(--secondary); text-decoration: none; }
.site-footer nav a:hover { color: var(--brand); }
.site-footer p { margin: 0; flex-basis: 100%; }

/* ---------- Document pages (Privacy, Support, 404) ---------- */
main.doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 24px; }
main.doc h1 { font-size: 42px; margin: 0 0 8px; }
.updated { color: var(--secondary); font-size: 15px; margin: 0 0 32px; }
main.doc h2 { font-size: 23px; margin: 40px 0 8px; }
main.doc ul { padding-left: 22px; }
main.doc li { margin: 6px 0; }
main.doc .lead { margin-bottom: 24px; }
main.doc footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--secondary); font-size: 14px; }
.summary, .contact { background: var(--brand-tint); border-radius: 18px; padding: 20px 24px; margin: 0 0 8px; }
.summary p { margin: 0 0 8px; font-weight: 600; }
.summary ul, .contact p { margin: 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
th { color: var(--secondary); font-weight: 600; }
td:first-child { font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; background: var(--subtle); border-radius: 14px; padding: 4px 8px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
  .cards.four, .cards.five { grid-template-columns: repeat(2, 1fr); }
  .strip .container { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 36px; }
  .hero .container, .split { grid-template-columns: 1fr; gap: 40px; }
  .split.flip > :first-child { order: 0; }
  .steps, .cards.three { grid-template-columns: 1fr; }
  .site-header nav { display: none; }
  .site-header .store { margin-left: auto; }
  .bubble { left: 0; }
  .foods { right: 0; }
}
@media (max-width: 520px) {
  .cards.four, .cards.five, .strip .container, .plans { grid-template-columns: 1fr; }
  .phone { width: 250px; }
  .foods { width: 232px; bottom: 20px; }
  .bubble { max-width: 200px; top: 8px; }
  main.doc h1 { font-size: 34px; }
  td:first-child { white-space: normal; }
}

/* No inline styles (the Content-Security-Policy allows only this file). */
.left { text-align: left; }
.wave i:nth-child(5n+1) { height: 7px; }
.wave i:nth-child(5n+2) { height: 14px; }
.wave i:nth-child(5n+3) { height: 20px; }
.wave i:nth-child(5n+4) { height: 11px; }
.wave i:nth-child(5n) { height: 16px; }
