/* Plato website. The app's Forest & Lime world (see ../plato/DESIGN.md). */

:root {
  --ground: #F6F4EE;
  --card: #FFFFFF;
  --field: #FFFFFF;
  --border: #E6E2D8;
  --divider: #EFECE4;
  --ink: #0F1F17;
  --muted: #5B6460;
  --forest: #123B2A;
  --forest-deep: #0E2F21;
  --on-forest: #FFFFFF;
  --sage: #CFE3D6;
  --lime: #C8F169;
  --mint: #E9F0E3;
  --carbs: #2F6FDB;
  --protein: #D9582A;
  --fat: #C99400;
  --error: #B3261E;
  --shadow: 0 18px 40px rgba(15, 31, 23, 0.12);
  --plate-shadow: 0 40px 80px rgba(15, 31, 23, 0.16), 0 8px 18px rgba(15, 31, 23, 0.10);

  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B1410;
    --card: #15201A;
    --field: #15201A;
    --border: #26332C;
    --divider: #1E2A24;
    --ink: #EDF2EE;
    --muted: #A4B0A8;
    --forest: #173F2D;
    --forest-deep: #12331F;
    --on-forest: #EDF2EE;
    --mint: #1A2E22;
    --carbs: #7FB2FF;
    --protein: #FF9B6A;
    --fat: #F5C84B;
    --error: #FF8F80;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    --plate-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 8px 18px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
::selection { background: var(--lime); color: #123B2A; }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--lime); } }
.panel :focus-visible, .plan-pro :focus-visible, .close-frame :focus-visible { outline-color: var(--lime); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Type ------------------------------------------------------------------------ */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, min(5.6vw, 8.5svh), 76px); line-height: 0.98; color: var(--forest); }
h2 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; color: var(--forest); }
h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }
@media (prefers-color-scheme: dark) { h1, h2 { color: var(--ink); } }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); max-width: 34ch; margin: 22px 0 0; }
p { max-width: 62ch; }

/* Nav ------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--ground);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease-std);
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 26px/1 var(--display); letter-spacing: -0.03em; color: var(--forest); }
@media (prefers-color-scheme: dark) { .brand { color: var(--ink); } }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink); padding: 8px 0; }
.nav-links a:hover { color: var(--forest); text-decoration: underline; }
.nav .spacer { flex: 1; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Buttons and the signup form --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 16px; border: 0;
  font: 600 16px/1 var(--text); text-decoration: none; cursor: pointer;
  background: var(--forest); color: var(--on-forest);
  transition: transform 120ms var(--ease-std), background-color 180ms var(--ease-std);
}
.btn:hover { background: var(--forest-deep); }
.btn:active { transform: scale(0.97); }
@media (prefers-color-scheme: dark) { .btn { background: var(--lime); color: #123B2A; } .btn:hover { background: #B6E04F; } }
.btn-lime { background: var(--lime); color: #123B2A; }
.btn-lime:hover { background: #B6E04F; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 14px; }

.signup { margin-top: 34px; max-width: 520px; }
.signup-row {
  display: flex; gap: 8px; padding: 8px;
  background: var(--field); border: 1.5px solid var(--border); border-radius: 20px;
  transition: border-color 180ms var(--ease-std), box-shadow 180ms var(--ease-std);
}
.signup-row:focus-within { border-color: var(--forest); outline: 3px solid var(--forest); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .signup-row:focus-within { outline-color: var(--lime); border-color: var(--lime); } }
.signup input[type="email"] {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 17px var(--text); padding: 0 12px; min-height: 48px;
}
.signup input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.signup input[type="email"]:focus { outline: none; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup .btn { flex: none; }
.signup-note { margin: 12px 4px 0; font-size: 14px; color: var(--muted); }
.signup-status { margin: 12px 4px 0; font-size: 15px; font-weight: 500; min-height: 1.5em; }
.signup-status[data-tone="ok"] { color: var(--forest); }
@media (prefers-color-scheme: dark) { .signup-status[data-tone="ok"] { color: var(--lime); } }
.signup-status[data-tone="error"] { color: var(--error); }
.signup.is-done .signup-row { display: none; }
.signup.is-done .signup-note { display: none; }
.signup-done {
  display: none; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--mint); border-radius: 20px; font-weight: 500;
}
.signup.is-done .signup-done { display: flex; }
.signup-done svg { flex: none; }
@media (max-width: 460px) {
  .signup-row { flex-direction: column; padding: 6px; }
  .signup .btn { width: 100%; }
}

/* Hero: the scan ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 28px 0 0; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head scan" "act scan"; grid-template-rows: 1fr 1fr;
  column-gap: 24px; min-height: min(720px, calc(100svh - 76px));
}
.hero-head { grid-area: head; align-self: end; position: relative; z-index: 2; }
.hero-act { grid-area: act; align-self: start; position: relative; z-index: 2; }
.hero .scan { grid-area: scan; align-self: center; }
.tag-short { display: none; font: 600 12.5px/1 var(--text); font-style: normal; }

/* The stage outgrows its column and crops off the right edge: the plate is the page. */
/* Sized by width and by height, so the whole plate fits the first screen on short laptops too. */
.scan { position: relative; width: min(52vw, 700px, calc(100svh - 150px)); min-width: 380px; justify-self: start; margin: 0 0 0 3vw; }
.scan-stage { position: relative; width: 100%; aspect-ratio: 1; }
.scan-plate {
  position: absolute; inset: 5%; border-radius: 50%;
  box-shadow: var(--plate-shadow);
}
.scan-plate img { width: 100%; height: 100%; border-radius: 50%; }
.scan-corners { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.scan-corners path { fill: none; stroke: var(--lime); stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 6px rgba(40, 60, 10, 0.22)); }
.scan-line {
  position: absolute; left: 10%; right: 10%; top: 8%; height: 3px; border-radius: 3px;
  background: var(--lime);
  opacity: 0;
}
/* The swept band trailing the line, like a scanner's light passing over the plate. */
.scan-line::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 64px;
  background: linear-gradient(to top, color-mix(in srgb, var(--lime) 38%, transparent), transparent);
  border-radius: 6px 6px 0 0;
}
.food { position: absolute; transform: translate(-50%, -50%); }
.food-dot {
  position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; background: var(--lime); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 31, 23, 0.3);
}
.food-tag {
  position: absolute; top: 0; white-space: nowrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 9px 14px 10px; box-shadow: var(--shadow);
  transform: translateY(-50%);
}
.food-tag b { display: block; font: 600 15px/1.25 var(--text); }
.food-tag span { display: block; font: 400 13px/1.3 var(--text); color: var(--muted); }
.food[data-side="right"] .food-tag { left: 20px; }
.food[data-side="left"] .food-tag { right: 20px; }
.scan-total {
  position: absolute; right: 11%; bottom: 7%;
  background: var(--forest); color: #fff; border-radius: 24px; padding: 14px 20px 16px;
  box-shadow: var(--shadow); min-width: 210px;
}
@media (prefers-color-scheme: dark) { .scan-total { background: #123B2A; border: 1px solid #2C5A43; } }
.scan-total small { display: block; font: 500 13px/1.3 var(--text); color: #CFE3D6; }
.scan-total strong { display: block; font: 800 40px/1.05 var(--display); letter-spacing: -0.02em; color: var(--lime); }
.scan-total em { font: 500 14px var(--text); font-style: normal; color: #CFE3D6; }
/* The caption sits inside the stage, beside the lower-left bracket, so it stays on the first screen. */
.scan-foot { position: absolute; left: 12%; bottom: 6%; z-index: 3; display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 13px; color: var(--muted); }
.scan-foot > span { background: var(--ground); padding: 4px 10px; border-radius: 999px; }
.scan-again {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--ink);
  font: 600 14px var(--text); cursor: pointer;
}
.scan-again:hover { border-color: var(--forest); }

/* The same findings as a list: for screen readers everywhere, and on screen on narrow
   phones, where tags on the plate would run off the edge. */
.scan-list { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; list-style: none; margin: 0; padding: 0; }
.scan-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--divider); font-size: 15px; }
.scan-list li:first-child { border-top: 0; }
.scan-list li span { color: var(--muted); white-space: nowrap; }
.scan-list .scan-list-total b, .scan-list .scan-list-total span { color: var(--ink); font-weight: 700; }

/* Scan choreography: JS adds .is-armed (hidden, ready) then .is-scanning. Without JS
   or with reduced motion, everything simply shows. */
.scan.is-armed .scan-corners, .scan.is-armed .food, .scan.is-armed .scan-total { opacity: 0; }
.scan.is-scanning .scan-corners { animation: corners-in 560ms var(--ease-out) forwards; }
.scan.is-scanning .scan-line { animation: sweep 1000ms 380ms var(--ease-std) forwards; }
.scan.is-scanning .food { animation: tag-in 380ms var(--ease-out) forwards; animation-delay: var(--at); }
.scan.is-scanning .scan-total { animation: total-in 520ms 1420ms var(--ease-out) forwards; }
@keyframes corners-in { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1); } }
.scan-corners { transform-origin: 50% 50%; }
@keyframes sweep {
  0% { opacity: 0; top: 10%; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; top: 88%; }
}
@keyframes tag-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes total-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; grid-template-areas: "head" "scan" "act"; grid-template-rows: auto; min-height: 0; gap: 8px; }
  .hero-act { display: flex; flex-direction: column; }
  .hero-act .lede { order: 2; }
  .hero-act .signup { order: 1; margin-top: 8px; }
  .scan { justify-self: center; margin: 8px auto 0; width: min(100%, 620px); min-width: 0; }
  .hero-act .lede { display: none; }
  .lede { max-width: 44ch; }
}
@media (max-width: 560px) {
  .hero { padding-top: 12px; }
  h1 { font-size: clamp(38px, 11vw, 46px); }
  .food-tag { padding: 7px 10px; border-radius: 12px; box-shadow: 0 6px 16px rgba(15, 31, 23, 0.16); }
  .food-tag b, .food-tag span { display: none; }
  .tag-short { display: block; }
  .food[data-side="right"] .food-tag { left: 12px; }
  .food[data-side="left"] .food-tag { right: 12px; }
  .food-dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-width: 2.5px; }
  .scan-foot { position: static; margin: 4px 0 0; }
  .scan-foot > span { background: none; padding: 0; }
  .food-salmon .food-tag { left: auto !important; right: 12px; }
  .scan-total { min-width: 0; padding: 8px 12px 10px; border-radius: 16px; right: 22%; bottom: 2%; }
  .scan-total { padding: 7px 12px 8px; }
  .scan-total small { font-size: 12px; }
  .scan-total strong { font-size: 22px; }
  .scan-total em { display: none; }
  .scan-corners path { stroke-width: 30; }
}

/* Sections ------------------------------------------------------------------------ */
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }

/* Ways to log: editorial rows, each with the thing the app shows ------------------ */
.ways { border-top: 1px solid var(--border); }
.way { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--border); }
.way h3 { display: flex; align-items: center; gap: 14px; }
.way-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--mint); display: grid; place-items: center; flex: none; }
.way-icon svg { width: 26px; height: 26px; stroke: var(--forest); }
@media (prefers-color-scheme: dark) { .way-icon svg { stroke: var(--lime); } }
.way p { margin: 12px 0 0; color: var(--muted); }
.frag {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 18px 20px; box-shadow: 0 1px 0 rgba(15, 31, 23, 0.02);
  justify-self: end; width: min(100%, 520px);
}
@media (max-width: 860px) { .way { grid-template-columns: 1fr; gap: 20px; } .frag { justify-self: stretch; } }
.frag-title { font: 600 13px var(--text); color: var(--muted); margin-bottom: 10px; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--divider); }
.row:first-of-type { border-top: 0; }
.row b { font-weight: 600; }
.row span { color: var(--muted); font-size: 15px; }
.row .kcal { font-weight: 600; color: var(--ink); white-space: nowrap; }
.frag-actions { display: flex; gap: 8px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; font: 600 14px var(--text); }
.pill-forest { background: #123B2A; color: #fff; }
.pill-line { border: 1px solid var(--border); color: var(--ink); background: var(--card); }
.credit { font-size: 13px; color: var(--muted); margin-top: 8px; }
.label-fact { border: 2px solid var(--ink); border-radius: 6px; padding: 10px 14px; font-size: 14px; position: relative; margin: 10px; }
.label-fact .lf-head { font: 800 22px/1 var(--text); letter-spacing: -0.01em; border-bottom: 6px solid var(--ink); padding-bottom: 6px; }
.label-fact .lf { display: flex; justify-content: space-between; border-top: 1px solid var(--ink); padding: 3px 0; }
.label-fact .lf.big { font-weight: 800; font-size: 18px; border-top-width: 3px; }
.bracketed { position: relative; padding: 6px; }
.bracketed::before, .bracketed::after { content: ""; position: absolute; width: 28px; height: 28px; border: 6px solid var(--lime); }
.bracketed::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.bracketed::after { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.voice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.voice .pill-forest { background: #123B2A; }
.voice .pill-forest svg { stroke: var(--lime); }
.transcript { flex: 1 1 240px; min-height: 52px; display: flex; align-items: center; padding: 10px 14px; border: 1.5px solid #123B2A; border-radius: 16px; font-size: 16px; }
@media (prefers-color-scheme: dark) { .transcript { border-color: var(--lime); } }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--forest); margin-left: 2px; vertical-align: -2px; animation: caret 1s steps(1) infinite; }
@media (prefers-color-scheme: dark) { .caret { background: var(--lime); } }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* Honest numbers: a meal broken down --------------------------------------------- */
.truth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .truth { grid-template-columns: 1fr; } }
.truth ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.truth li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.truth li svg { margin-top: 3px; stroke: var(--forest); }
@media (prefers-color-scheme: dark) { .truth li svg { stroke: var(--lime); } }
.truth li b { display: block; font-weight: 600; }
.truth li span { color: var(--muted); }
.meal-card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.meal-card .mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.meal-card .mc-head h3 { font-size: 26px; }
.meal-card .mc-head .kcal { font: 800 30px var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.meal-card .mc-sub { color: var(--muted); font-size: 15px; margin: 2px 0 18px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.macro { background: var(--ground); border-radius: 16px; padding: 12px 14px; }
.macro small { display: block; font-size: 13px; color: var(--muted); }
.macro b { font: 800 24px var(--display); letter-spacing: -0.01em; }
.macro .bar { height: 8px; border-radius: 8px; background: var(--divider); margin-top: 8px; overflow: hidden; }
.macro .bar i { display: block; height: 100%; border-radius: 8px; width: var(--w); transform-origin: left; }
.macro.c .bar i { background: var(--carbs); } .macro.p .bar i { background: var(--protein); } .macro.f .bar i { background: var(--fat); }
.notes { margin-top: 18px; display: grid; gap: 10px; }
.note { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.note-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); flex: none; }
.note-mark svg { stroke: var(--forest); }
@media (prefers-color-scheme: dark) { .note-mark svg { stroke: var(--lime); } }
.sample { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Coach: the forest panel ---------------------------------------------------------- */
.panel {
  background: #123B2A; color: #fff; border-radius: 32px; position: relative; overflow: hidden;
  padding: 56px;
  padding: clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (prefers-color-scheme: dark) { .panel { background: #173F2D; } }
@media (max-width: 960px) { .panel { grid-template-columns: 1fr; } }
.panel h2 { color: #fff; }
.panel p { color: #CFE3D6; font-size: 18px; }
.panel .points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.panel .points li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: #CFE3D6; }
.panel .points li b { color: #fff; font-weight: 600; }
.panel .points svg { stroke: var(--lime); margin-top: 4px; }
.coach-art { position: absolute; right: -40px; top: -40px; width: 220px; opacity: 0.95; pointer-events: none; }
@media (max-width: 960px) { .coach-art { position: static; justify-self: end; width: 96px; margin: -20px -12px -28px 0; } }
.coach-demo { display: grid; gap: 14px; position: relative; z-index: 1; }
.tip { background: #E9F0E3; color: #0F1F17; border-radius: 22px; padding: 18px; display: grid; gap: 10px; }
.tip-head { display: flex; align-items: center; gap: 12px; }
.tip-icon { width: 44px; height: 44px; border-radius: 50%; background: #123B2A; display: grid; place-items: center; flex: none; }
.tip-head b { font: 700 17px/1.25 var(--text); }
.tip p { margin: 0; font-size: 15px; line-height: 1.5; color: #0F1F17; }
.tip-ask { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid #E6E2D8; color: #123B2A; font: 600 14px var(--text); }
.tip-ask span { flex: 1; }
.tip-now { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid #D6DFD0; font-size: 13px; color: #5B6460; }
.tip-now b { color: #0F1F17; font-weight: 600; }
.bubble-me { justify-self: end; background: #0B2A1D; color: #fff; padding: 12px 16px; border-radius: 20px 20px 6px 20px; max-width: 80%; font-weight: 500; border: 1px solid rgba(207, 227, 214, 0.2); }
.bubble-coach { background: #fff; color: #0F1F17; padding: 14px 16px; border-radius: 20px 20px 20px 6px; max-width: 92%; font-size: 15px; line-height: 1.5; }
.panel .sample { color: #CFE3D6; }

/* Progress: the trend that ignores the noise ----------------------------------------- */
.progress-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.progress-grid .chart-card { margin-top: clamp(0px, 9vw, 140px); }
@media (max-width: 960px) { .progress-grid .chart-card { margin-top: 0; } }
@media (max-width: 960px) { .progress-grid { grid-template-columns: 1fr; } }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 22px 22px 16px; }
.chart-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-top b { font: 800 34px var(--display); letter-spacing: -0.02em; }
.chart-top span { color: var(--muted); font-size: 15px; }
.chart-rate { display: inline-flex; align-items: center; gap: 6px; background: var(--mint); color: var(--forest); padding: 6px 12px; border-radius: 999px; font: 600 14px var(--text); }
@media (prefers-color-scheme: dark) { .chart-rate { color: var(--lime); } }
.chart { width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.chart .dot { fill: var(--muted); opacity: 0.45; }
.chart .trend { fill: none; stroke: var(--forest); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { .chart .trend { stroke: var(--lime); } }
.chart .grid { stroke: var(--divider); stroke-width: 1; }
.chart text { fill: var(--muted); font: 500 12px var(--text); }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); opacity: 0.5; margin-right: 6px; vertical-align: 0; }
.legend i.t { width: 18px; height: 4px; border-radius: 4px; background: var(--forest); opacity: 1; vertical-align: 3px; }
@media (prefers-color-scheme: dark) { .legend i.t { background: var(--lime); } }
.progress-art { width: 132px; margin: -12px 0 8px -10px; }
.extras { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--border); }
.extras li { padding: 12px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr; gap: 2px; }
.extras li b { font-weight: 600; }
.extras li span { color: var(--muted); font-size: 15px; }

/* Pricing ------------------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { border-radius: 28px; padding: 36px; padding: clamp(28px, 4vw, 44px); position: relative; overflow: hidden; }
.plan-free { background: var(--card); border: 1px solid var(--border); }
.plan-pro { background: #123B2A; color: #fff; }
@media (prefers-color-scheme: dark) { .plan-pro { background: #173F2D; } }
.plan h3 { font-size: 30px; }
.plan .price { font: 800 clamp(44px, 5vw, 64px)/1 var(--display); letter-spacing: -0.03em; margin: 18px 0 4px; }
.plan .price small { font: 500 17px var(--text); letter-spacing: 0; color: var(--muted); }
.plan-pro .price { color: var(--lime); }
.plan.plan-pro .price small, .plan.plan-pro .per { color: #CFE3D6; }
.plan .per { color: var(--muted); font-size: 15px; margin: 0; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.plan li svg { margin-top: 4px; stroke: var(--forest); }
@media (prefers-color-scheme: dark) { .plan li svg { stroke: var(--lime); } }
.plan-pro li svg { stroke: var(--lime); }
.plan-pro li { color: #E4EEE7; }
.plan-art { position: absolute; right: -18px; top: -26px; width: 180px; pointer-events: none; }
@media (max-width: 560px) { .plan-art { width: 104px; right: -14px; top: -20px; } }

/* Privacy, plainly ------------------------------------------------------------------ */
.plain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); border-top: 1px solid var(--border); padding-top: 32px; }
@media (max-width: 860px) { .plain { grid-template-columns: 1fr; } }
.plain h3 { font-size: 22px; margin-bottom: 8px; }
.plain p { margin: 0; color: var(--muted); }

/* Closing call: the signup framed like a scan ---------------------------------------- */
.close { text-align: center; }
.close-frame {
  position: relative; margin: 0 auto; border-radius: 32px; background: #123B2A; color: #fff;
  padding: 72px 64px;
  padding: clamp(72px, 9vw, 120px) clamp(28px, 7vw, 120px);
}
@media (prefers-color-scheme: dark) { .close-frame { background: #173F2D; } }
.cc { position: absolute; width: clamp(48px, 6vw, 80px); height: clamp(48px, 6vw, 80px); overflow: visible; pointer-events: none; }
.cc path { fill: none; stroke: var(--lime); stroke-width: 14; stroke-linecap: round; }
.cc-tl { left: clamp(18px, 2.6vw, 34px); top: clamp(18px, 2.6vw, 34px); }
.cc-tr { right: clamp(18px, 2.6vw, 34px); top: clamp(18px, 2.6vw, 34px); transform: scaleX(-1); }
.cc-bl { left: clamp(18px, 2.6vw, 34px); bottom: clamp(18px, 2.6vw, 34px); transform: scaleY(-1); }
.cc-br { right: clamp(18px, 2.6vw, 34px); bottom: clamp(18px, 2.6vw, 34px); transform: scale(-1, -1); }
.close h2 { font-size: clamp(40px, 5.6vw, 72px); color: #fff; }
.close p { margin: 18px auto 0; color: #CFE3D6; font-size: 18px; }
.close .signup { margin: 32px auto 0; text-align: left; }
.close .signup-row { border-color: transparent; background: #fff; }
.close .signup input[type="email"] { color: #0F1F17; }
.close .signup input[type="email"]::placeholder { color: #5B6460; }
.close .signup-row:focus-within { border-color: var(--lime); outline-color: var(--lime); }
.close .btn { background: var(--lime); color: #123B2A; }
.close .btn:hover { background: #B6E04F; }
.close .signup-note { color: #CFE3D6; }
.close .signup-status[data-tone="ok"] { color: var(--lime); }
.close .signup-status[data-tone="error"] { color: #FFB4A8; }
.close .signup-done { color: #0F1F17; background: #E9F0E3; }

/* Footer -------------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 56px; font-size: 15px; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.footer nav a:hover { text-decoration: underline; }
.footer .spacer { flex: 1; }

/* Legal and utility pages ------------------------------------------------------------------ */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 80px; }
.doc h1 { font-size: clamp(40px, 5vw, 60px); }
.doc h2 { font-size: 26px; margin: 44px 0 10px; letter-spacing: -0.02em; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; font-family: var(--text); font-weight: 700; letter-spacing: 0; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .meta { color: var(--muted); margin: 10px 0 28px; }
.doc .box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 18px 22px; margin: 18px 0; }
.doc .box p:first-child { margin-top: 0; } .doc .box p:last-child { margin-bottom: 0; }
.doc .table { overflow-x: auto; margin: 16px 0; }
.doc table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { background: var(--mint); font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }
.doc a { color: var(--forest); font-weight: 500; }
@media (prefers-color-scheme: dark) { .doc a { color: var(--lime); } }
.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; margin: 14px 0; }
.steps-list li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; font-weight: 700; color: var(--forest); }
@media (prefers-color-scheme: dark) { .steps-list li::before { color: var(--lime); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
.scan-again[hidden] { display: none; }

/* A smaller plate (short laptop windows): slimmer total chip, caption further left. */
.scan { container-type: inline-size; }
@container (max-width: 640px) {
  .scan-total { min-width: 0; padding: 10px 16px 12px; border-radius: 20px; }
  .scan-total strong { font-size: 32px; }
  .scan-total em { display: none; }
  .scan-foot { left: 8%; }
}
