/* yet. app. No web fonts, no images beyond icons: the whole app is three small files, so it opens instantly and works offline. */
:root {
  --ink: #0b221b; --forest: #11342a; --pine: #1c4c3d; --sage: #a3c9ad; --mist: #dfe9df; --cream: #f5f1e7; --paper: #fbf9f3;
  --lime: #d9f94b; --text: #13261f; --muted: #53655c; --line: rgba(19, 38, 31, 0.14); --warn: #b4580d; --amber: #f0c27a; --danger: #9b2c1c;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --fs: 17px;                      /* body text never below 17px; the user can raise it in Settings */
  --tab: 68px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
html[data-text="l"] { --fs: 19px; }
html[data-text="xl"] { --fs: 22px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { font: 400 var(--fs)/1.5 var(--sans); color: var(--text); background: var(--ink); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.dark :focus-visible, .tabs :focus-visible, .top :focus-visible { outline-color: var(--lime); }

.app { max-width: 520px; min-height: 100%; margin: 0 auto; background: var(--paper); display: flex; flex-direction: column; position: relative; }
.mark { font-weight: 800; letter-spacing: -0.05em; }
.mark i { font-style: normal; color: var(--lime); }
.boot { flex: 1; display: grid; place-items: center; background: var(--ink); color: var(--cream); font-size: 72px; min-height: 100vh; }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 18px 10px; background: var(--ink); color: var(--cream); }
.top .mark { font-size: 30px; line-height: 1; }
.top h1 { font: 600 1.05em/1.2 var(--sans); flex: 1; }
.top .back { width: 44px; height: 44px; margin-left: -12px; border: 0; background: none; color: inherit; font-size: 26px; line-height: 1; }
.demo { font-size: 0.72em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(245, 241, 231, 0.12); color: var(--sage); }

/* screens */
.screen { flex: 1; padding: 18px 18px calc(var(--tab) + var(--safe-b) + 26px); display: grid; gap: 16px; align-content: start; animation: in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.hello { font: italic 400 1.9em/1.1 var(--serif); letter-spacing: -0.01em; }
.sub { color: var(--muted); }
.label { font-size: 0.78em; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pine); }
.dark .label { color: var(--sage); }

.card { padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: grid; gap: 10px; }
.card.dark { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.card.dark .sub { color: rgba(245, 241, 231, 0.76); }
.card.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.card h2, .card h3 { font: 600 1.12em/1.25 var(--sans); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.big { font: 800 2.3em/1 var(--sans); letter-spacing: -0.04em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 700; background: var(--lime); color: var(--ink); text-decoration: none; transition: transform 0.12s ease; }
.btn:active { transform: scale(0.97); }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.dark { background: var(--forest); color: var(--cream); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 0.92em; }
.btns { display: grid; gap: 10px; }
.btns.two { grid-template-columns: 1fr 1fr; }
.link { background: none; border: 0; padding: 12px 0; min-height: 44px; font-weight: 600; color: var(--pine); text-decoration: underline; text-underline-offset: 4px; text-align: left; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button { min-height: 92px; padding: 12px 8px; border-radius: 18px; border: 1px solid var(--line); background: #fff; display: grid; gap: 6px; justify-items: center; align-content: center; font-weight: 600; font-size: 0.9em; line-height: 1.2; }
.quick svg { width: 26px; height: 26px; color: var(--pine); }

.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.item { width: 100%; min-height: 60px; padding: 12px 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; }
.item .grow b { display: block; font-weight: 600; }
.item .grow span { display: block; color: var(--muted); font-size: 0.9em; }
.chev { color: var(--muted); font-size: 1.3em; }
.pill { font-size: 0.78em; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--mist); color: var(--forest); white-space: nowrap; }
.pill.ok { background: var(--lime); color: var(--ink); }
.pill.watch { background: var(--amber); color: #3b2600; }
.pill.low { background: #f3c7bd; color: #5a1509; }

.check { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid var(--pine); display: grid; place-items: center; background: none; padding: 0; }
.check[aria-pressed="true"] { background: var(--pine); }
.check[aria-pressed="true"]::after { content: ""; width: 12px; height: 7px; border-left: 3px solid var(--lime); border-bottom: 3px solid var(--lime); transform: rotate(-45deg) translateY(-1px); }

/* order timeline */
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 0.8em; }
.steps li { display: grid; gap: 4px; }
.steps li::before { content: ""; height: 5px; border-radius: 5px; background: var(--mist); }
.steps li.done::before { background: var(--pine); }
.steps span { color: var(--muted); }

/* labs */
.ring { width: 132px; height: 132px; flex: none; }
.marker .bar { position: relative; height: 8px; border-radius: 8px; background: var(--mist); margin: 6px 0 2px; }
.marker .bar i { position: absolute; top: -4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--pine); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.marker .bar b { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: var(--sage); }
.trend { font-weight: 700; }
.spark { width: 100%; height: 56px; }

/* messages */
.thread { display: grid; gap: 10px; }
.msg { max-width: 86%; padding: 12px 15px; border-radius: 18px; background: #fff; border: 1px solid var(--line); justify-self: start; }
.msg.me { justify-self: end; background: var(--forest); border-color: var(--forest); color: var(--cream); }
.msg small { display: block; margin-top: 4px; font-size: 0.78em; opacity: 0.7; }
.composer { position: sticky; bottom: calc(var(--tab) + var(--safe-b)); display: flex; gap: 8px; padding: 10px 0; background: var(--paper); }
.composer textarea { flex: 1; min-height: 52px; max-height: 140px; padding: 13px 16px; border-radius: 22px; border: 1.5px solid var(--muted); background: #fff; resize: none; }

/* forms */
.field { display: grid; gap: 6px; font-weight: 600; font-size: 0.92em; }
.field input, .field select { min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--muted); background: #fff; font-weight: 600; font-size: 1.05em; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--mist); }
.seg button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
/* the switch itself is 56 x 34, inside a 64 x 44 tap area */
.toggle { width: 64px; height: 44px; flex: none; padding: 0; border: 0; background: none; position: relative; }
.toggle::before { content: ""; position: absolute; left: 4px; top: 5px; width: 56px; height: 34px; border-radius: 999px; background: #8f9c94; transition: background 0.2s ease; }
.toggle::after { content: ""; position: absolute; top: 9px; left: 8px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
.toggle[aria-checked="true"]::before { background: var(--pine); }
.toggle[aria-checked="true"]::after { transform: translateX(22px); }
.opt { width: 100%; text-align: left; padding: 18px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; display: grid; gap: 4px; font-weight: 600; font-size: 1.05em; }
.opt span { font-weight: 400; color: var(--muted); font-size: 0.9em; }
.opt[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.opt[aria-pressed="true"] span { color: rgba(245, 241, 231, 0.76); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; }
.scale button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }

/* onboarding */
.onb { flex: 1; min-height: 100vh; padding: calc(28px + var(--safe-t)) 22px calc(28px + var(--safe-b)); background: var(--ink); color: var(--cream); display: grid; gap: 20px; align-content: start; }
.onb .mark { font-size: 54px; line-height: 1; }
.onb h1 { font: italic 400 2.1em/1.08 var(--serif); }
.onb .opt { background: rgba(245, 241, 231, 0.07); border-color: rgba(245, 241, 231, 0.2); color: var(--cream); }
.onb .opt span { color: rgba(245, 241, 231, 0.74); }
.onb .opt[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.onb .opt[aria-pressed="true"] span { color: rgba(11, 34, 27, 0.75); }
.prog { height: 5px; border-radius: 5px; background: rgba(245, 241, 231, 0.18); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--lime); border-radius: 5px; transition: width 0.3s ease; }
.onb .foot { margin-top: auto; display: grid; gap: 10px; }

/* tab bar */
.tabs { position: fixed; z-index: 10; left: 50%; bottom: 0; width: min(520px, 100%); transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + var(--safe-b)); background: var(--ink); }
.tabs button { min-height: 56px; border: 0; background: none; color: rgba(245, 241, 231, 0.66); display: grid; gap: 3px; justify-items: center; align-content: center; font-size: 12.5px; font-weight: 600; border-radius: 14px; position: relative; }
.tabs svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--lime); }
.tabs .dot { position: absolute; top: 8px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: var(--ink); font-size: 11.5px; font-weight: 800; line-height: 18px; }

/* sheet */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(11, 34, 27, 0.55); display: grid; align-items: end; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(520px, 100%); margin: 0 auto; padding: 22px 20px calc(22px + var(--safe-b)); border-radius: 26px 26px 0 0; background: var(--paper); display: grid; gap: 14px; animation: up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); max-height: 88vh; overflow: auto; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { font: italic 400 1.6em/1.1 var(--serif); }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 14px); transform: translateX(-50%); width: max-content; max-width: min(480px, 92%); text-align: center; padding: 13px 18px; border-radius: 999px; background: var(--forest); color: var(--cream); font-weight: 600; font-size: 0.92em; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.5); animation: up 0.3s ease; }
.note { font-size: 0.86em; color: var(--muted); }
.offline { padding: 8px 18px; background: var(--amber); color: #3b2600; font-weight: 600; font-size: 0.86em; text-align: center; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .tabs, .top, .btn, .composer { display: none !important; } .app { max-width: none; } body { background: #fff; } }

/* =====================================================================
   APP AUDIT ROUND 1: visual design and premium polish
   ===================================================================== */
/* A1.1 nothing runs past the right edge: grid children may shrink, and long rows wrap at the largest text size */
.screen, .card { grid-template-columns: minmax(0, 1fr); }
.btns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.field input, .field select { width: 100%; min-width: 0; }
.seg { display: flex; max-width: 100%; }
.seg button { flex: 1 1 auto; min-width: 44px; }
html[data-text="xl"] .seg button { padding: 0 10px; }
html[data-text="xl"] .btns.two { grid-template-columns: minmax(0, 1fr); }

/* A1.2 text-size choices are readable on the dark welcome screens */
.onb .seg { background: rgba(245, 241, 231, 0.1); }
.onb .seg button { color: var(--cream); }
.onb .seg button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }

/* A1.3 cards lift off a warmer ground */
.app, .composer { background: var(--cream); }
.card, .quick button { border-color: rgba(19, 38, 31, 0.07); box-shadow: 0 1px 2px rgba(11, 34, 27, 0.05), 0 12px 28px -20px rgba(11, 34, 27, 0.35); }
.card.dark { background: linear-gradient(155deg, var(--pine), var(--forest) 60%); }

/* A1.4 the lead card on each screen carries the brand serif */
.card.hero { padding: 22px; gap: 12px; }
.card.hero h2 { font: italic 400 1.6em/1.1 var(--serif); letter-spacing: -0.01em; }

/* A1.5 order tracker as a vertical timeline */
.steps { grid-template-columns: 1fr; gap: 0; font-size: 1em; }
.steps li { grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; min-height: 44px; position: relative; }
.steps li::before { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--sage); }
.steps li.done::before { background: var(--pine); box-shadow: none; }
.steps li + li::after { content: ""; position: absolute; left: 6px; top: -15px; width: 2px; height: 30px; background: var(--mist); }
.steps li.done + li.done::after { background: var(--pine); }
.steps li:not(.done) b { font-weight: 400; color: var(--muted); }

/* A1.6 in-range results stay quiet so flagged ones lead */
.list .pill.ok { background: var(--mist); color: var(--forest); }
.pill.watch::before, .pill.low::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; }

/* A1.7 a real active state on the tab bar */
.tabs { border-top: 1px solid rgba(245, 241, 231, 0.1); }
.tabs button { font-size: 13px; }
.tabs button[aria-current="page"]::before { content: ""; position: absolute; top: -6px; left: 50%; width: 32px; height: 3px; margin-left: -16px; border-radius: 0 0 3px 3px; background: var(--lime); }
.tabs button[aria-current="page"] svg { fill: rgba(217, 249, 75, 0.16); }

/* A1.8 membership: calmer cancel button and a facts card */
.btn.danger.ghost { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; }

/* A1.9 care screen: tidy composer, directional bubbles, quiet placeholder */
.composer { align-items: flex-end; }
.composer .btn { min-height: 52px; padding: 0 20px; }
.msg { border-radius: 18px 18px 18px 6px; }
.msg.me { border-radius: 18px 18px 6px 18px; }
.card.quiet { background: transparent; border: 1.5px dashed var(--line); box-shadow: none; }

/* A1.10 welcome screens: depth, a visible select mark, tighter option stack */
.onb { background: radial-gradient(120% 50% at 50% 108%, var(--pine) 0%, var(--ink) 65%); }
.onb .opt { position: relative; padding-right: 58px; }
.onb .opt + .opt { margin-top: -8px; }
.onb .opt::after { content: ""; position: absolute; right: 18px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(245, 241, 231, 0.45); }
.onb .opt[aria-pressed="true"]::after { box-shadow: inset 0 0 0 6px var(--ink), inset 0 0 0 12px var(--lime); }

/* =====================================================================
   APP AUDIT ROUND 2: task flow and clarity
   ===================================================================== */
/* round 1 follow-up: a selected welcome option shows a dark dot inside a lime band inside a dark ring */
.onb .opt[aria-pressed="true"]::after { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 6px var(--lime), inset 0 0 0 12px var(--ink); }
/* a task label that is also a link reads as the task, not as a stray link */
.item .grow .link { padding: 0; min-height: 44px; display: inline-flex; align-items: center; color: var(--text); font-weight: 600; }
/* the cancel-request link sits apart from the timeline */
.steps + .link { margin-top: 6px; color: var(--danger); }
.card.marker p + p { font-weight: 600; }

/* =====================================================================
   APP AUDIT ROUND 3: fit across device sizes and one-handed use
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; scroll-padding: calc(72px + var(--safe-t)) 0 calc(var(--tab) + var(--safe-b) + 16px); }

/* A3.1 the "Today" tick is a 44 x 44 target; the visible ring stays 30px */
.check { width: 44px; height: 44px; margin: -7px 0 -7px -7px; border: 0; }
.check::before { content: ""; grid-area: 1 / 1; box-sizing: border-box; width: 30px; height: 30px; border: 2px solid var(--pine); border-radius: 50%; }
.check[aria-pressed="true"] { background: none; }
.check[aria-pressed="true"]::before { background: var(--pine); }
.check::after { grid-area: 1 / 1; }
.onb .link { min-width: 44px; }

/* A3.2 Continue stays visible while choosing goals on a short screen */
.onb, .boot { min-height: 100dvh; }
.onb .opt ~ .foot { position: sticky; bottom: 0; margin: 0 -22px calc(-28px - var(--safe-b)); padding: 14px 22px calc(14px + var(--safe-b)); background: linear-gradient(rgba(11, 34, 27, 0), var(--ink) 30%); }

/* A3.3 Care: the conversation fills the screen and the message box sits just above the tab bar */
.screen.chat { grid-template-rows: auto auto auto 1fr; padding-bottom: calc(var(--tab) + var(--safe-b)); }
.chat .thread { align-content: end; }

/* A3.4 confirmations appear at the top, never over the control just tapped */
.toast { top: calc(var(--safe-t) + 72px); bottom: auto; border-radius: 22px; max-width: min(480px, calc(100% - 32px)); }

/* A3.6 rows that broke at the largest text size */
.card > .row { flex-wrap: wrap; }
.hero .row > .grow { min-width: 9em; }
.row > .btn { flex: none; white-space: nowrap; margin-left: auto; }
.facts dt { flex: none; }
.facts dd { text-align: right; }
html[data-text="xl"] .btn.wide { padding: 10px 18px; line-height: 1.25; }

/* A3.7 tab labels follow the text setting */
html[data-text="l"] .tabs button { font-size: 14.5px; }
html[data-text="xl"] .tabs button { font-size: 16px; }

/* A3.8 weight and date stack when they cannot fit side by side */
[data-form="weight"].btns.two { grid-template-columns: repeat(auto-fit, minmax(8.5em, 1fr)); }

/* A3.9 phone in landscape: the tab bar becomes a side rail and the header scrolls away */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 700px) {
  :root { --tab: 0px; }
  .top { position: static; }
  .tabs { top: 0; bottom: 0; left: calc(50% - 344px); width: 76px; transform: none; grid-template-columns: 1fr; align-content: center; border-top: 0; }
  .tabs button[aria-current="page"]::before { top: 50%; left: -6px; width: 3px; height: 32px; margin: -16px 0 0; border-radius: 0 3px 3px 0; }
}

/* A3.10 tablet: a wider column and a centered dialog */
@media (min-width: 700px) and (min-height: 700px) {
  .app { max-width: 640px; }
  .tabs, .sheet { width: min(640px, 100%); }
  .scrim { align-items: center; }
  .sheet { border-radius: 26px; max-height: 80vh; }
  .onb { align-content: center; }
}
@media (min-width: 560px) { .onb { background: radial-gradient(50% 45% at 50% 100%, var(--pine), var(--ink)); } }

/* =====================================================================
   APP AUDIT ROUND 4: accessibility and readability
   ===================================================================== */
/* A4.1 a screen title or result that receives focus from the app (never from Tab) shows no ring */
[tabindex="-1"]:focus { outline: none; }
.toast { cursor: pointer; }

/* A4.4 a mistake is explained at the field */
#w-err { color: var(--danger); font-weight: 600; font-size: 0.92em; }
#w-err:empty { display: none; }
.field input[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }

/* A4.5 every control outline and placeholder reaches at least 3 to 1 against its ground */
.toggle::before { background: #6f7d75; }                                   /* off switch: 4.3 to 1 on white (was 2.9) */
.steps li::before { box-shadow: inset 0 0 0 2px var(--muted); }             /* upcoming step ring: 6.2 to 1 (was 1.8) */
.steps li.done::before { box-shadow: none; }
.marker .bar b { background: var(--pine); }                                 /* range band: 7.8 to 1 on its track (was 1.5) */
.marker .bar i { background: var(--lime); border-color: var(--ink); }       /* the marker dot stays visible on the darker band */
.scale button, .sheet .opt, .card.quiet { border-color: rgba(19, 38, 31, 0.55); }   /* 3.6 to 1 (was 1.3) */
::placeholder { color: var(--muted); opacity: 1; }                          /* 6.2 to 1 */

/* A4.6 card titles are real headings and keep their small-caps look */
.card h2.label { font: 700 0.78em/1.5 var(--sans); }

/* A4.8 a Continue button that cannot act yet stays readable (14.8 to 1) instead of fading */
.btn[aria-disabled="true"] { background: none; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(245, 241, 231, 0.5); }

/* A4.10 sizes follow the reader's own browser or phone font setting (unchanged at the usual 16px default) */
:root { --fs: 1.0625rem; }
html[data-text="l"] { --fs: 1.1875rem; }
html[data-text="xl"] { --fs: 1.375rem; }
.tabs button { font-size: 0.8125rem; }
html[data-text="l"] .tabs button { font-size: 0.906rem; }
html[data-text="xl"] .tabs button { font-size: 1rem; }
.spark text, .ring text:last-child { font-size: 0.8em; }
.spark { overflow: visible; }
@media (max-height: 480px) { .top { position: static; } }

/* =====================================================================
   APP AUDIT ROUND 5: motion, speed and consistency
   ===================================================================== */
:root { --r-s: 14px; --r-m: 20px; --r-l: 26px; }

/* A5.1 entrance motion plays on arrival only. A tick, switch or rating redraws nothing, so the screen never flashes. */
.screen, .scrim, .sheet { animation: none; }
.nav .screen, .nav .onb > :not(.mark):not(.prog) { animation: in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.opening .scrim { animation: fade 0.2s ease; }
.opening .sheet { animation: up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.prog i { animation: fill 0.3s ease; transition: none; }
@keyframes fill { from { width: var(--from, 0%); } }

/* A5.2 controls that change in place get their own short motion */
.check::before, .scale button, .opt, .seg button { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease; }

/* A5.3 every tappable thing answers the finger */
button { touch-action: manipulation; }
.quick button { transition: transform 0.12s ease; }
.quick button:active, .opt:active, .scale button:active, .seg button:active { transform: scale(0.97); }
button.item:active { background: rgba(19, 38, 31, 0.05); box-shadow: 0 0 0 9px rgba(19, 38, 31, 0.05); border-radius: 6px; }
.tabs button:active, .back:active { background: rgba(245, 241, 231, 0.1); }
.back { border-radius: 50%; display: grid; place-items: center; }
.link:active, .check:active, .toggle:active { opacity: 0.6; }

/* A5.4 the confirmation drops in from above and fades out; a closed sheet slides away */
.toast { animation: toast-in 0.22s ease; }
.toast.out { animation: toast-out 0.18s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } }
@keyframes toast-out { to { opacity: 0; } }
.sheet-ghost { position: fixed; inset: 0; z-index: 20; background: rgba(11, 34, 27, 0.55); display: grid; align-items: end; pointer-events: none; animation: toast-out 0.18s ease forwards; }
.ghost-sheet { width: min(520px, 100%); margin: 0 auto; padding: 22px 20px calc(22px + var(--safe-b)); border-radius: var(--r-l) var(--r-l) 0 0; background: var(--paper); display: grid; gap: 14px; max-height: 88vh; overflow: hidden; animation: drop 0.2s ease forwards; }
.ghost-sheet h2 { font: italic 400 1.6em/1.1 var(--serif); }
.ghost-sheet .opt { border-color: rgba(19, 38, 31, 0.55); }
@keyframes drop { to { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) and (min-height: 700px) { .sheet-ghost { align-items: center; } .ghost-sheet { width: min(640px, 100%); border-radius: var(--r-l); } }

/* A5.6 new messages ease in; a quiet mark shows a reply is coming */
.msg.new { animation: in 0.2s ease; }
.msg.wait { opacity: 0.6; letter-spacing: 0.2em; font-weight: 700; padding: 8px 15px; }

/* A5.7 one look per action */
.btn svg { width: 20px; height: 20px; flex: none; }

/* A5.9 one icon set and one scale of corner sizes */
.back svg { width: 24px; height: 24px; }
.chev { display: grid; place-items: center; }
.chev svg { width: 18px; height: 18px; display: block; }
.scale button { border-radius: var(--r-s); }
.quick button, .opt, .composer textarea, .toast { border-radius: var(--r-m); }
.msg { border-radius: var(--r-m) var(--r-m) var(--r-m) 6px; }
.msg.me { border-radius: var(--r-m) var(--r-m) 6px var(--r-m); }

@media (prefers-reduced-motion: reduce) { .sheet-ghost { display: none; } }

/* =====================================================================
   APP UPGRADE: fuller screens (photographs, at-a-glance carousel, charts, habits, detail pages)
   ===================================================================== */
.greet { display: flex; align-items: center; gap: 14px; }
.mini-ring { flex: none; }
.mini-ring .trk { stroke: rgba(19, 38, 31, 0.12); }
.mini-ring .fil { stroke: var(--pine); }
.dark .mini-ring .trk { stroke: rgba(245, 241, 231, 0.2); }
.dark .mini-ring .fil { stroke: var(--lime); }
.quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick button { min-height: 84px; padding: 10px 2px; font-size: 0.84em; }

/* section headings and the side-scrolling rows under them */
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 0 -6px; }
.sec h2 { font: italic 400 1.45em/1.15 var(--serif); letter-spacing: -0.01em; }
.sec .link { padding: 0; min-height: 44px; display: inline-flex; align-items: center; flex: none; }
.hrail { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  scrollbar-width: none; margin: 0 -18px; padding: 4px 18px 12px; scroll-padding-left: 18px; }
.hrail::-webkit-scrollbar { display: none; }
.hrail > * { scroll-snap-align: start; }
.hrail:focus-visible { outline-offset: -3px; }
.stat, .tcard { border: 1px solid rgba(19, 38, 31, 0.07); background: #fff; color: var(--text); text-align: left; border-radius: var(--r-m);
  box-shadow: 0 1px 2px rgba(11, 34, 27, 0.05), 0 12px 28px -20px rgba(11, 34, 27, 0.35); transition: transform 0.12s ease; }
.stat:active, .tcard:active { transform: scale(0.97); }
.stat { width: 9.6em; min-height: 9.8em; padding: 14px; display: grid; gap: 2px; align-content: start; grid-template-rows: auto auto auto 1fr; }
.stat-k { font-size: 0.74em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pine); }
.stat-v { font: 800 1.5em/1.08 var(--sans); letter-spacing: -0.03em; }
.stat-s { font-size: 0.84em; line-height: 1.3; color: var(--muted); }
.stat .mini-ring, .stat .mini-spark { align-self: end; margin-top: 8px; }
.mini-spark { width: 100%; height: 34px; color: var(--pine); }
.stat.dark { background: linear-gradient(155deg, var(--pine), var(--forest) 60%); border-color: var(--forest); color: var(--cream); }
.stat.dark .stat-k { color: var(--sage); }
.stat.dark .stat-s { color: rgba(245, 241, 231, 0.78); }
.tcard { width: 9.8em; padding: 0; overflow: hidden; display: grid; align-content: start; }
.ph { background: var(--mist); object-fit: cover; }
.tcard .ph { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.tcard-t { display: grid; gap: 2px; padding: 10px 12px 13px; }
.tcard-t b { font-weight: 700; line-height: 1.2; }
.tcard-t span { font-size: 0.84em; line-height: 1.3; color: var(--muted); }
.tcard-t .tcard-go { color: var(--pine); font-weight: 700; margin-top: 4px; }

/* treatment cards and the treatment page */
.txhead { display: flex; gap: 14px; align-items: center; }
.txhead .ph { width: 76px; height: 76px; border-radius: 16px; flex: none; }
.photo-hero { padding: 0; overflow: hidden; gap: 0; }
.photo-hero .ph { width: 100%; height: auto; aspect-ratio: 16 / 10; display: block; }
.photo-hero .pad { padding: 18px; display: grid; gap: 10px; }
ul.plain { margin: 0; padding-left: 1.15em; display: grid; gap: 6px; }

/* labs: category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(19, 38, 31, 0.55); background: none; font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease; }
.chips button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.chips button:active { transform: scale(0.97); }
.list li[hidden] { display: none; }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .area { fill: rgba(28, 76, 61, 0.1); }
.chart .line { fill: none; stroke: var(--pine); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--pine); }
.chart text { font-size: 0.8em; fill: var(--text); }
.chart .val { font-weight: 800; }
.chart .ax { fill: var(--muted); }
.wk { display: grid; grid-template-columns: 5.4em minmax(0, 1fr) 2.2em; gap: 10px; align-items: center; }
.wk-name { font-weight: 600; font-size: 0.92em; }
.wk-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; height: 40px; align-items: end; }
.wk-bars i { display: block; border-radius: 4px; background: var(--pine); min-height: 6px; }
.wk-bars i.none { background: var(--mist); height: 6px; }
.wk-avg { font-weight: 800; text-align: right; }

/* habits */
.hab { flex-wrap: nowrap !important; }
.step { display: flex; align-items: center; gap: 4px; flex: none; }
.step button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(19, 38, 31, 0.55); background: #fff; font-size: 1.3em; font-weight: 600; line-height: 1; transition: transform 0.12s ease; }
.step button:active { transform: scale(0.92); }
.step output { min-width: 2.6em; text-align: center; font-weight: 800; font-size: 1.15em; }

/* help */
.faq details { border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4em; color: var(--pine); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 14px; color: var(--muted); }
.field select { appearance: auto; }
@media (orientation: landscape) and (max-height: 500px) and (min-width: 700px) { .hrail { margin: 0; padding-inline: 0; } }

/* =====================================================================
   APP REDESIGN (2026-11): the brand look of the homepage phone, carried into the real app.
   Brand fonts (cached for offline use by sw.js), a dark "aurora" header on Home, glowing progress rings,
   lab results on their range, product-line color on treatment cards and a floating tab dock.
   Every control, label and focus rule above is unchanged; this layer only restyles.
   ===================================================================== */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/outfit.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/fraunces.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/fraunces-italic.woff2) format("woff2"); }
:root { --sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --serif: "Fraunces", ui-serif, Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --tab: 92px; --r-m: 22px; --r-l: 28px; }

/* glass top bar */
.top { background: rgba(11, 34, 27, 0.97); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); }
#lab-list .pill { min-width: 6.3em; text-align: center; }
.onb-tag { position: absolute; left: 22px; right: 22px; bottom: calc(34px + var(--safe-b)); font: italic 400 1.7em/1.1 var(--serif); color: var(--sage); }
.onb-tag i { font-style: normal; color: var(--lime); }
@media (max-height: 620px) { .onb-tag { display: none; } }
.top .mark { font-size: 32px; }
.demo { background: rgba(217, 249, 75, 0.12); color: var(--lime); }
.hello { font: italic 400 2.05em/1.06 var(--serif); letter-spacing: -0.015em; }
.card { border-radius: 24px; }
.card h2, .card h3 { letter-spacing: -0.01em; }

/* arrival: each block rises in turn (only when a screen opens, never on a tap that redraws in place) */
.nav .screen { animation: none; }
.nav .screen > * { animation: rise 0.5s var(--ease) both; }
.nav .screen > :nth-child(2) { animation-delay: 0.05s; } .nav .screen > :nth-child(3) { animation-delay: 0.1s; }
.nav .screen > :nth-child(4) { animation-delay: 0.15s; } .nav .screen > :nth-child(5) { animation-delay: 0.2s; }
.nav .screen > :nth-child(6) { animation-delay: 0.25s; } .nav .screen > :nth-child(n+7) { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Home: the aurora header */
.screen.home { padding-top: 0; }
.aurora { margin: 0 -18px; padding: 8px 18px 22px; display: grid; gap: 16px; color: var(--cream); border-radius: 0 0 34px 34px;
  background: radial-gradient(120% 70% at 105% -5%, rgba(217, 249, 75, 0.24), transparent 55%), radial-gradient(90% 70% at -5% 65%, rgba(28, 76, 61, 0.95), transparent 70%), var(--ink);
  box-shadow: 0 34px 50px -42px rgba(11, 34, 27, 0.95); }
.aurora :focus-visible { outline-color: var(--lime); }
.aurora .hello { color: var(--cream); font-size: 2.3em; }
.aurora .greet .sub { color: rgba(245, 241, 231, 0.72); }
.aurora .mini-ring .trk { stroke: rgba(245, 241, 231, 0.16); }
.aurora .mini-ring .fil { stroke: var(--lime); filter: drop-shadow(0 0 6px rgba(217, 249, 75, 0.6)); }
.card.glass { background: rgba(245, 241, 231, 0.08); border: 1px solid rgba(245, 241, 231, 0.14); color: var(--cream); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.card.glass .label { color: var(--sage); }
.card.glass .sub { color: rgba(245, 241, 231, 0.78); }
.aurora .quick button { background: rgba(245, 241, 231, 0.07); border-color: rgba(245, 241, 231, 0.13); color: var(--cream); box-shadow: none; }
.aurora .quick svg { color: var(--lime); }
.live-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78em; font-weight: 700; letter-spacing: 0.04em; color: var(--lime); }
.live-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(217, 249, 75, 0.7); } 100% { box-shadow: 0 0 0 10px rgba(217, 249, 75, 0); } }
.btn.glow { box-shadow: 0 10px 28px -10px rgba(217, 249, 75, 0.8); animation: glowpulse 2.8s ease-in-out infinite; }
@keyframes glowpulse { 50% { box-shadow: 0 10px 36px -4px rgba(217, 249, 75, 0.95); } }

/* rings: the week on Home, the result count on Labs */
.rings-card { gap: 14px; background: radial-gradient(100% 90% at 0% 0%, rgba(163, 201, 173, 0.26), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(217, 249, 75, 0.12), transparent 70%), linear-gradient(160deg, #123a30, var(--ink)); }
.rings-card .row .sub { font-size: 0.84em; }
.rings-row { display: flex; align-items: center; gap: 20px; }
.rings { width: 136px; height: 136px; flex: none; transform: rotate(-90deg); overflow: visible; }
.rings circle { fill: none; stroke-width: 10; }
.rings .rg-bg { stroke: rgba(245, 241, 231, 0.1); }
.rg-fg { stroke-linecap: round; stroke-dashoffset: var(--o); }
.rg-fg.lime { stroke: var(--lime); filter: drop-shadow(0 0 5px rgba(217, 249, 75, 0.6)); }
.rg-fg.sage { stroke: var(--sage); }
.rg-fg.amber { stroke: var(--amber); }
.ring-fg { stroke-dashoffset: var(--o); filter: drop-shadow(0 0 6px rgba(217, 249, 75, 0.65)); }
.nav .rg-fg, .nav .ring-fg { animation: ringfill 1.5s var(--ease) 0.2s both; }
.nav .rg-fg.sage { animation-delay: 0.35s; } .nav .rg-fg.amber { animation-delay: 0.5s; }
@keyframes ringfill { from { stroke-dashoffset: var(--c); } }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.legend li { display: grid; padding-left: 20px; position: relative; line-height: 1.25; }
.legend li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 11px; height: 11px; border-radius: 50%; }
.legend .lime::before { background: var(--lime); box-shadow: 0 0 8px rgba(217, 249, 75, 0.7); }
.legend .sage::before { background: var(--sage); }
.legend .amber::before { background: var(--amber); }
.legend span { font-size: 0.86em; color: rgba(245, 241, 231, 0.74); }
.labs-hero { background: radial-gradient(110% 80% at 100% 0%, rgba(217, 249, 75, 0.2), transparent 55%), linear-gradient(160deg, #123a30, var(--ink)); }

/* the at-a-glance row */
.stat { border-radius: 22px; }
.stat.dark { background: radial-gradient(120% 90% at 100% 0%, rgba(217, 249, 75, 0.22), transparent 60%), linear-gradient(160deg, #164638, var(--ink)); }

/* lab results on their range */
.rbar { display: block; position: relative; height: 6px; margin: 10px 0 4px; border-radius: 6px; background: rgba(240, 194, 122, 0.5); }
.rbar b { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--sage); }
.rbar i { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: var(--pine); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(11, 34, 27, 0.25), 0 2px 6px rgba(11, 34, 27, 0.3); }
.rbar i.low, .rbar i.watch { background: var(--warn); }
.nav .rbar i { animation: slide 1.1s var(--ease) 0.3s both; }
@keyframes slide { from { left: 3%; } }

/* treatments carry their product line's color, as on the website */
.l-balance { --g1: #f8d3b6; --g2: #e98f76; }
.l-strong { --g1: #f8dc95; --g2: #e6a548; }
.l-lean { --g1: #eef8b0; --g2: #c3df4e; }
.card.rx, .photo-hero[class*="l-"], .tcard[class*="l-"] { background: linear-gradient(145deg, var(--g1), var(--g2)); border-color: transparent; color: var(--ink); box-shadow: 0 20px 38px -26px rgba(110, 50, 25, 0.75); }
.card.rx .label, .photo-hero[class*="l-"] .label { color: rgba(11, 34, 27, 0.72); }
.card.rx .sub, .photo-hero[class*="l-"] .sub, .tcard[class*="l-"] .tcard-t span { color: rgba(11, 34, 27, 0.78); }
.card.rx .pill, .photo-hero[class*="l-"] .pill { background: rgba(255, 255, 255, 0.62); color: var(--ink); }
.card.rx h2 { font: 400 1.55em/1.08 var(--serif); }
.card.rx .txhead .ph { width: 108px; height: 108px; border-radius: 22px; box-shadow: 0 16px 28px -16px rgba(0, 0, 0, 0.55); }
.card.rx .link { color: var(--ink); }
.tcard.explore .tcard-go::after { content: " \2192"; }

/* Care: a live waiting room */
.visit-card { background: radial-gradient(100% 90% at 100% 0%, rgba(217, 249, 75, 0.16), transparent 60%), linear-gradient(160deg, #123a30, var(--ink)); }
.vav { position: relative; width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--pine), #2d6b56); }
.vav svg { width: 22px; height: 22px; color: var(--cream); }
.vav i { position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); animation: ping 1.8s ease-out infinite; }
.visit-hero { justify-items: center; text-align: center; padding-top: 30px; background: radial-gradient(70% 60% at 50% 0%, rgba(217, 249, 75, 0.22), transparent 70%), linear-gradient(170deg, #123a30, var(--ink)); }
.pulse-orb { width: 96px; height: 96px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #efff9a, var(--lime) 62%); animation: orb 2.4s ease-out infinite; }
.pulse-orb svg { width: 38px; height: 38px; }
@keyframes orb { 0% { box-shadow: 0 0 0 0 rgba(217, 249, 75, 0.55), 0 0 0 0 rgba(217, 249, 75, 0.3); } 100% { box-shadow: 0 0 0 22px rgba(217, 249, 75, 0), 0 0 0 46px rgba(217, 249, 75, 0); } }
.msg.me { background: linear-gradient(150deg, var(--pine), var(--forest)); }
.card.dark .big { color: var(--lime); }

/* charts and check-ins */
.chart .area { fill: url(#wgrad); }
.chart .line { filter: drop-shadow(0 4px 6px rgba(28, 76, 61, 0.35)); }
.nav .chart .line { stroke-dasharray: 900; animation: draw 1.6s var(--ease) 0.2s both; }
@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
.scale button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--lime); box-shadow: 0 8px 18px -10px rgba(11, 34, 27, 0.8); }
.wk-bars i { background: linear-gradient(180deg, #3d8a6c, var(--pine)); }

/* floating tab dock */
.tabs { bottom: calc(10px + var(--safe-b)); width: min(496px, calc(100% - 24px)); padding: 7px; border-radius: 30px; border: 1px solid rgba(245, 241, 231, 0.12);
  background: rgba(8, 26, 21, 0.88); -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55); }
.tabs button { min-height: 58px; border-radius: 23px; transition: background-color 0.3s ease, color 0.3s ease; }
.tabs button[aria-current="page"] { background: var(--lime); color: var(--ink); }
.tabs button[aria-current="page"]::before { display: none; }
.tabs button[aria-current="page"] svg { fill: none; }
.tabs .dot { box-shadow: 0 0 0 2px var(--ink); }
.tabs button[aria-current="page"] .dot { background: var(--ink); color: var(--lime); }
.toast { background: rgba(17, 52, 42, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* welcome: drifting light and photographs on the first choice */
.onb { position: relative; overflow: hidden; isolation: isolate; }
.orbs i { position: absolute; z-index: -1; border-radius: 50%; filter: blur(56px); pointer-events: none; }
.orbs i:first-child { width: 340px; height: 340px; top: -90px; right: -130px; background: rgba(217, 249, 75, 0.26); animation: drift 12s ease-in-out infinite alternate; }
.orbs i:last-child { width: 380px; height: 380px; bottom: -140px; left: -150px; background: rgba(163, 201, 173, 0.3); animation: drift 15s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-40px, 34px) scale(1.12); } }
.nav .onb > .orbs { animation: none; }
.opt.who { grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; padding: 10px 58px 10px 10px; }
.opt.who img { width: 88px; height: 88px; border-radius: 16px; object-fit: cover; object-position: 50% 12%; display: block; }
.who-t { display: grid; gap: 3px; font-weight: 700; font-size: 1.12em; line-height: 1.2; }
.who-t small { font-weight: 400; font-size: 0.8em; opacity: 0.8; }

@media (orientation: landscape) and (max-height: 500px) and (min-width: 700px) {
  .tabs { top: 12px; bottom: 12px; left: calc(50% - 344px); width: 76px; }
}
@media (min-width: 700px) and (min-height: 700px) { .tabs { width: min(616px, calc(100% - 24px)); } }
@media (prefers-reduced-motion: reduce) { .orbs i, .btn.glow, .live-tag i, .vav i, .pulse-orb { animation: none !important; } }

/* ================= APP ROUND 1 (2026-11-25): intake, visit, inbox, booking, security ================= */
.top .bell { position: relative; width: 44px; height: 44px; margin-right: -10px; flex: none; border: 0; background: none; color: var(--cream); display: grid; place-items: center; border-radius: 50%; }
.top .bell svg { width: 24px; height: 24px; }
.top .bell .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--ink); }
.top .bell:active { background: rgba(245, 241, 231, 0.1); }
/* intake */
.field textarea { width: 100%; min-height: 76px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--muted); background: #fff; font: 600 1.05em/1.35 var(--sans); resize: vertical; }
.onb .field { color: var(--cream); }
.onb .field input, .onb .field select, .onb .field textarea { background: rgba(245, 241, 231, 0.08); border-color: rgba(245, 241, 231, 0.38); color: var(--cream); }
.onb .field input::placeholder, .onb .field textarea::placeholder { color: rgba(245, 241, 231, 0.5); }
.onb .field select option { color: var(--ink); }
.onb .field input:focus, .onb .field select:focus, .onb .field textarea:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px rgba(217, 249, 75, 0.25); }
.onb .chips button { border-color: rgba(245, 241, 231, 0.4); color: var(--cream); }
.onb .chips button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.onb .note { color: rgba(245, 241, 231, 0.72); }
.onb-facts div { border-top-color: rgba(245, 241, 231, 0.14); }
.onb-facts dt { color: rgba(245, 241, 231, 0.66); }
.onb-facts dd { color: var(--cream); max-width: 62%; }
.price-card { padding: 18px 18px 16px; border-radius: 22px; display: grid; gap: 6px; background: radial-gradient(120% 120% at 100% 0%, rgba(217, 249, 75, 0.18), transparent 60%), rgba(245, 241, 231, 0.06); border: 1px solid rgba(217, 249, 75, 0.35); }
.price-card .big { color: var(--lime); }
.price-card p:last-child { color: rgba(245, 241, 231, 0.8); font-size: 0.92em; }
.agree { display: flex; gap: 14px; align-items: flex-start; font-size: 0.95em; line-height: 1.45; }
.agree input { flex: none; width: 26px; height: 26px; margin-top: 1px; accent-color: var(--lime); }
.agree a { color: var(--lime); }
.onb .foot .btn[aria-disabled="true"] { opacity: 0.55; }
/* home: name, streak, today */
.greet-ring { position: relative; flex: none; display: grid; place-items: center; }
.greet-ring > span { position: absolute; font-weight: 800; font-size: 0.82em; color: var(--cream); }
.streak { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(217, 249, 75, 0.14); color: var(--lime); font-weight: 700; font-size: 0.84em; }
.streak svg { width: 15px; height: 15px; }
.item.is-done .grow > b, .item.is-done .grow > .link { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.check[aria-pressed="true"]::before { animation: pop 0.28s var(--ease); }
@keyframes pop { 40% { transform: scale(1.18); } }
/* care */
.team { gap: 12px; }
.team > .row b { display: block; }
.team .sub { display: block; font-size: 0.9em; }
.avs { display: flex; flex: none; }
.avs i { width: 38px; height: 38px; margin-left: -10px; border-radius: 50%; display: grid; place-items: center; font: normal 700 12px/1 var(--sans); color: var(--cream); background: var(--pine); box-shadow: 0 0 0 3px #fff; }
.avs i:first-child { margin-left: 0; background: var(--forest); }
.avs i:last-child { background: #2d6b56; }
.avs svg { width: 18px; height: 18px; }
.visit-row { width: 100%; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 18px; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--forest); color: var(--cream); }
.visit-row .grow b { display: block; }
.visit-row .grow span { display: block; font-size: 0.88em; color: rgba(245, 241, 231, 0.75); }
.visit-row .vav { width: 42px; height: 42px; }
.day-sep { text-align: center; margin: 4px 0; }
.day-sep span { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--mist); color: var(--forest); font-size: 0.76em; font-weight: 700; letter-spacing: 0.04em; }
.topics { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
.topics::-webkit-scrollbar { display: none; }
.topics button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(19, 38, 31, 0.18); background: #fff; font-weight: 600; font-size: 0.88em; }
.topics[hidden] { display: none; }
.composer .attach { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--pine); }
.composer .attach svg { width: 22px; height: 22px; }
/* visit */
.visit-hero .btn svg, .btn svg { width: 20px; height: 20px; flex: none; }
.clin { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(245, 241, 231, 0.07); border: 1px solid rgba(245, 241, 231, 0.12); text-align: left; }
.clin b { display: block; }
.clin span { display: block; font-size: 0.88em; color: rgba(245, 241, 231, 0.75); }
.clin-av { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2d6b56, var(--pine)); color: var(--lime); box-shadow: 0 0 0 3px rgba(217, 249, 75, 0.25); }
.clin-av svg { width: 22px; height: 22px; }
.devcheck { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; text-align: left; }
.devcheck li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(245, 241, 231, 0.07); }
.devcheck li span:not(.tick) { grid-column: 2; font-size: 0.88em; color: rgba(245, 241, 231, 0.75); }
.devcheck .tick { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); position: relative; animation: pop 0.4s var(--ease) both; animation-delay: var(--d); }
.devcheck .tick::after { content: ""; position: absolute; left: 9px; top: 9px; width: 11px; height: 6px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg); }
.call { position: fixed; inset: 0; z-index: 15; display: grid; grid-template-rows: auto 1fr auto auto; padding: calc(14px + var(--safe-t)) 16px calc(18px + var(--safe-b)); color: var(--cream);
  background: radial-gradient(90% 60% at 50% 35%, rgba(45, 107, 86, 0.85), transparent 70%), linear-gradient(180deg, #0f2e25, #05140f); }
.call-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: #ff5a4a; animation: ping 1.6s ease-out infinite; }
.remote { display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.remote span:last-child { color: rgba(245, 241, 231, 0.72); font-size: 0.9em; }
.clin-av.big { width: 132px; height: 132px; box-shadow: 0 0 0 10px rgba(217, 249, 75, 0.12), 0 0 0 22px rgba(217, 249, 75, 0.06); }
.clin-av.big svg { width: 54px; height: 54px; }
.pip { position: absolute; right: 16px; top: calc(56px + var(--safe-t)); width: 96px; height: 132px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(160deg, #3c5a4f, #1b3a30); border: 2px solid rgba(245, 241, 231, 0.3); font: 700 2em/1 var(--sans); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.pip.off { background: #1b2622; opacity: 0.8; }
.caption { justify-self: center; max-width: 34ch; margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.55); text-align: center; font-size: 0.95em; }
.controls { display: flex; justify-content: center; gap: 14px; }
.cbtn { width: 64px; display: grid; justify-items: center; gap: 6px; border: 0; background: none; color: var(--cream); font-size: 0.72em; font-weight: 600; padding: 0; }
.cbtn svg { box-sizing: content-box; width: 24px; height: 24px; padding: 16px; border-radius: 50%; background: rgba(245, 241, 231, 0.14); }
.cbtn[aria-pressed="true"] svg { background: var(--cream); color: var(--ink); }
.cbtn.end svg { background: #d6402f; color: #fff; }
.cbtn:active svg { transform: scale(0.94); }
.summary-hero { background: radial-gradient(90% 90% at 100% 0%, rgba(217, 249, 75, 0.2), transparent 60%), linear-gradient(160deg, #164638, var(--ink)); }
.summary-hero h2 { font: italic 400 1.9em/1.1 var(--serif); }
.steps.next li { grid-template-columns: 14px 1fr; align-items: start; padding: 6px 0; }
.steps.next li::before { margin-top: 5px; }
.steps.next b { color: var(--text); }
.steps.next li:not(.done) b { color: var(--text); font-weight: 600; }
.steps.next span { grid-column: 2; font-size: 0.9em; }
.list .item .ph { width: 48px; height: 48px; border-radius: 12px; flex: none; }
/* inbox */
.inbox .item { align-items: flex-start; }
.inbox .item small { display: block; margin-top: 2px; font-size: 0.78em; color: var(--muted); }
.inbox .item.unread .grow b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.inbox .item:not(.unread) .grow b { font-weight: 500; }
.ibx { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--mist); color: var(--pine); }
.ibx svg { width: 20px; height: 20px; }
.ibx.labs { background: #e6f5c2; } .ibx.ship { background: #fde7cf; color: #8a4a0b; } .ibx.visit, .ibx.msg { background: var(--forest); color: var(--lime); }
/* booking */
.cal-tile { width: 58px; height: 62px; flex: none; border-radius: 16px; display: grid; place-items: center; align-content: center; background: var(--forest); color: var(--cream); line-height: 1; }
.cal-tile small { font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lime); }
.cal-tile b { font-size: 1.5em; }
.cal-tile svg { width: 26px; height: 26px; color: var(--lime); }
.booked > .row + .row { align-items: flex-start; }
.sheet .chips.days button { min-height: 58px; display: grid; align-content: center; line-height: 1.15; padding: 0 14px; }
.sheet .chips.days small { font-size: 0.75em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.sheet .btn[aria-disabled="true"] { opacity: 0.5; }
.sheet { max-height: 92vh; overflow-y: auto; }
/* lock + security */
.lock { align-content: center; justify-items: center; text-align: center; }
.lock-ico { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: rgba(217, 249, 75, 0.14); color: var(--lime); }
.lock-ico svg { width: 36px; height: 36px; }
.lock .foot { width: 100%; }
.sec-hero { display: grid; gap: 8px; }
.sec-hero .lock-ico { width: 56px; height: 56px; border-radius: 18px; }
.danger-t { color: var(--danger); }
a.item { color: inherit; text-decoration: none; }
/* screens slide in the direction you travel; the top bar and tab bar hold still */
@media (prefers-reduced-motion: no-preference) {
  .top { view-transition-name: topbar; }
  .tabs { view-transition-name: tabbar; }
  ::view-transition-group(topbar), ::view-transition-group(tabbar) { animation: none; }
  ::view-transition-old(root) { animation: vt-out 0.16s ease both; }
  ::view-transition-new(root) { animation: vt-in 0.3s var(--ease) both; }
  html[data-dir="back"]::view-transition-new(root) { animation-name: vt-in-back; }
  html[data-dir="tab"]::view-transition-new(root) { animation-name: vt-fade; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateX(22px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-22px); } }
@keyframes vt-fade { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .devcheck .tick, .check[aria-pressed="true"]::before, .rec { animation: none; } }

/* ================= APP ROUND 2 (2026-11-25): dark mode, refill confirm, follow-up, trends, progress ================= */
.rx-sum { display: flex; align-items: center; gap: 14px; }
.rx-sum .ph { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.rx-sum b { display: block; font-size: 1.05em; }
.rx-sum span { color: var(--muted); font-size: 0.9em; }
.fu h3 { margin: 2px 0 0; }
.fu .label { display: block; }
.visit-row.alt { margin-top: -2px; background: var(--mist); color: var(--text); }
.visit-row.alt .grow span { color: var(--muted); }
.visit-row.alt .vav { background: var(--forest); }
.visit-row.alt .vav svg { color: var(--lime); }
.steps.next .link { padding: 0; min-height: 0; font-weight: 700; color: var(--pine); text-decoration: underline; }
.trendc { width: 100%; height: auto; overflow: visible; }
.trendc .band { fill: rgba(163, 201, 173, 0.32); }
.trendc .band-t { font: 700 10px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; fill: var(--pine); }
.trendc .tl { fill: none; stroke: var(--pine); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trendc .tp { fill: var(--pine); stroke: var(--paper); stroke-width: 2.5; }
.trendc .tp.out { fill: var(--warn); }
.trendc .tv { font: 700 12.5px var(--sans); fill: var(--text); }
.trendc .ax { font: 600 11px var(--sans); fill: var(--muted); }
.note-card { border-left: 4px solid var(--lime); }
.prog-card .row .sub { font-size: 0.82em; }
.progl { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.progl li { display: grid; grid-template-columns: 5.6em 1fr auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px; align-items: center; }
.progl .pn { font-weight: 700; }
.progl .pbar { grid-column: 1 / -1; grid-row: 2; position: relative; height: 8px; border-radius: 8px; background: rgba(245, 241, 231, 0.1); overflow: hidden; }
.progl .pbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; }
.progl .pa { background: rgba(245, 241, 231, 0.28); }
.progl .pb { background: var(--lime); height: 4px; top: 2px !important; box-shadow: 0 0 8px rgba(217, 249, 75, 0.5); }
.progl .pv { font-size: 0.86em; color: rgba(245, 241, 231, 0.8); font-variant-numeric: tabular-nums; }
.progl .pv b { color: var(--cream); }
.progl .pill { justify-self: end; }
.prog-card .pill:not(.ok):not(.watch) { background: rgba(245, 241, 231, 0.12); color: var(--cream); }
input.time { min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: var(--text); font: 600 0.95em var(--sans); }
.screen.home > .card:first-of-type { margin-top: 4px; }

/* dark mode: the same brand at night. Light surfaces become deep green, text becomes cream */
html.dk { --paper: #08140f; --text: #e6eee8; --muted: #9fb4a9; --line: rgba(245, 241, 231, 0.13); --mist: #18332a; --pine: #a3c9ad; --surf: #10221b; color-scheme: dark; }
html.dk body, html.dk .app, html.dk .composer { background: var(--paper); }
html.dk .card, html.dk .stat:not(.dark), html.dk .msg:not(.me), html.dk .opt:not([aria-pressed="true"]), html.dk .quick button, html.dk .topics button, html.dk .composer textarea,
html.dk .composer .attach, html.dk .field input, html.dk .field select, html.dk .field textarea, html.dk .scale button:not([aria-pressed="true"]), html.dk .step button, html.dk .sheet { background: var(--surf); color: var(--text); }
html.dk .card, html.dk .quick button, html.dk .stat { border-color: rgba(245, 241, 231, 0.08); box-shadow: none; }
html.dk .card.dark, html.dk .visit-row { border: 1px solid rgba(245, 241, 231, 0.1); }
html.dk .card.dark { background: var(--forest); }
html.dk .aurora .quick button { background: rgba(245, 241, 231, 0.07); }
html.dk .field input, html.dk .field select, html.dk .field textarea, html.dk .composer textarea { border-color: rgba(245, 241, 231, 0.3); }
html.dk .chips button { border-color: rgba(245, 241, 231, 0.35); color: var(--text); }
html.dk .chips button[aria-pressed="true"], html.dk .seg button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
html.dk .pill:not(.ok):not(.watch):not(.low), html.dk .list .pill.ok, html.dk .day-sep span { background: var(--mist); color: var(--sage); }
html.dk .btn.dark { background: #1d4a3b; box-shadow: inset 0 0 0 1px rgba(245, 241, 231, 0.16); }
html.dk .check[aria-pressed="true"]::before { background: #2d6b56; }
html.dk .steps li::before { background: var(--surf); }
html.dk .ibx.labs { background: #2b3a12; color: var(--lime); } html.dk .ibx.ship { background: #3a2a14; color: var(--amber); }
html.dk .avs i { box-shadow: 0 0 0 3px var(--surf); }
html.dk .tcard { border-color: transparent; }
html.dk .sec h2, html.dk .hello { color: var(--text); }
html.dk .toggle::before { background: #4c5b54; }
html.dk .toggle[aria-checked="true"]::before { background: #2d6b56; }
html.dk .quiet { background: transparent; border-color: rgba(245, 241, 231, 0.22); }
html.dk .trendc .band { fill: rgba(163, 201, 173, 0.18); }
html.dk .wk-bars i { background: var(--sage); }
html.dk .visit-row.alt { background: var(--mist); }
html.dk a { color: var(--sage); }

/* ================= APP ROUND 3 (2026-11-25): gestures, search, timeline, celebration, contrast ================= */
.top .bell { margin: 0 -5px 0 0; }
.sheet { position: relative; padding-top: 30px; }
.sheet::before { content: ""; position: absolute; top: 10px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 5px; background: rgba(19, 38, 31, 0.22); }
html.dk .sheet::before { background: rgba(245, 241, 231, 0.3); }
.ptr { position: fixed; z-index: 25; left: 50%; top: calc(64px + var(--safe-t)); width: 40px; height: 40px; margin-top: -40px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--lime); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); transform: translate(-50%, 0); pointer-events: none; }
.ptr svg { width: 20px; height: 20px; }
.ptr.ready { background: var(--lime); color: var(--ink); }
.ptr.spin svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.burst { position: fixed; z-index: 40; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 3px; animation: burst 0.9s cubic-bezier(0.15, 0.7, 0.3, 1) forwards; }
.burst i:nth-child(odd) { border-radius: 50%; width: 7px; height: 7px; }
@keyframes burst { 0% { transform: translate(0, 0) scale(0.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 24px)) scale(1) rotate(200deg); opacity: 0; } }
.searchbox { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1.5px solid var(--muted); }
.searchbox:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(28, 76, 61, 0.18); }
.searchbox svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; font: 600 1.05em var(--sans); color: var(--text); outline: none; }
html.dk .searchbox { background: var(--surf); border-color: rgba(245, 241, 231, 0.3); }
#sr { display: grid; gap: 12px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.tl::before { content: ""; position: absolute; left: 25px; top: 26px; bottom: 26px; width: 2px; background: var(--mist); }
.tl li { position: relative; }
.tl-d { position: relative; z-index: 1; width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; align-content: center; line-height: 1; background: var(--forest); color: var(--cream); }
.tl-d small { font-size: 0.64em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lime); }
.tl-d b { font-size: 1.25em; }
.tl li:first-child .tl-d { background: var(--lime); color: var(--ink); }
.tl li:first-child .tl-d small { color: var(--forest); }
/* contrast: small notes inside dark cards were too faint */
.card.dark .note, .dark .note, .summary-hero .label { color: rgba(245, 241, 231, 0.78); }
.prog-card .note { color: rgba(245, 241, 231, 0.78); }
@media (prefers-reduced-motion: reduce) { .ptr.spin svg { animation: none; } .burst { display: none; } }
/* dark mode: product-colored cards keep their light backgrounds, so they keep light-mode text colors too */
html.dk .card.rx, html.dk .tcard, html.dk .photo-hero { --text: #13261f; --muted: #53655c; --pine: #1c4c3d; --line: rgba(19, 38, 31, 0.14); --mist: #dfe9df; color: var(--text); }
html.dk .card.rx .btn.dark, html.dk .tcard .btn.dark { background: var(--forest); }
html.dk .danger-t { color: #ff9a85; }
html.dk .card.rx, html.dk .photo-hero[class*="l-"] { background: linear-gradient(145deg, var(--g1), var(--g2)); border-color: transparent; }
html.dk .card.rx .pill.pill, html.dk .photo-hero[class*="l-"] .pill.pill { background: rgba(255, 255, 255, 0.62); color: var(--ink); }
