/* Good Hope with Dr. Sheryl — design system v2 (Dec 2026)
   Warm editorial calm: cream paper, plum ink, ember-gold light. Fraunces + Figtree. */

:root {
  --plum: #2A1B3D;
  --plum-2: #3A2752;
  --ember: #E2A24A;
  --ember-soft: #F6D9A8;
  --clay: #B0563B;
  --clay-soft: #F3D5C8;
  --sage: #5F8C73;
  --sage-soft: #D7E6DA;
  --lilac-soft: #E7E0F0;
  --cream: #F7F1E8;
  --sand: #EFE6D8;

  --bg: var(--cream);
  --surface: #FFFDF9;
  --surface-2: var(--sand);
  --line: rgba(42, 27, 61, .10);
  --line-strong: rgba(42, 27, 61, .20);
  --text: #2A1B3D;
  --muted: #6E6378;
  --accent: var(--plum);
  --on-accent: #F7F1E8;
  --shadow: 0 1px 2px rgba(42, 27, 61, .05), 0 8px 24px -8px rgba(42, 27, 61, .14);
  --shadow-lg: 0 24px 60px -20px rgba(42, 27, 61, .35);

  --r-sm: 12px; --r: 20px; --r-lg: 28px; --r-xl: 36px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #150E1D; --surface: #1F1629; --surface-2: #2A1F37;
  --line: rgba(247, 241, 232, .09); --line-strong: rgba(247, 241, 232, .2);
  --text: #F4ECE0; --muted: #B4A9BD; --accent: #F4ECE0; --on-accent: #2A1B3D;
  --sand: #2A1F37; --lilac-soft: #2C2240; --sage-soft: #1F3329; --clay-soft: #3A2220; --ember-soft: #3A2C17;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100dvh; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
main[tabindex="-1"]:focus, main:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 450; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 .4em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--clay); font-weight: 400; }
:root[data-theme="dark"] h1 em, :root[data-theme="dark"] h2 em { color: var(--ember); }
p { margin: 0 0 1em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: .86rem; color: var(--muted); }
.eyebrow { font: 600 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--clay); margin: 0 0 14px; }

/* ---------- layout ---------- */
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.app-main { width: min(720px, 100% - 32px); margin-inline: auto; padding: 8px 0 140px; }
.app-main.wide { width: min(1080px, 100% - 32px); }
section { margin: 0 0 40px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- top bars ---------- */
.topbar {
  position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(1120px, 100% - 24px); margin: max(10px, env(safe-area-inset-top)) auto 0; padding: 10px 12px 10px 16px; border-radius: 22px;
  background: color-mix(in oklab, var(--surface) 82%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: transform .45s var(--ease), box-shadow .3s;
}
.topbar > .wrap { width: 100% !important; }
.topbar.hide { transform: translateY(calc(-100% - 24px)); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 34px; height: 34px; }
.logo b { font: 500 1.18rem/1 var(--serif); letter-spacing: -.01em; display: block; }
.logo small { font: 600 .58rem/1 var(--sans); letter-spacing: .2em; color: var(--clay); display: block; margin-top: 4px; }
.mark-stroke { stroke: var(--text); }
.topnav { display: flex; gap: 6px; align-items: center; }
.topnav a.link { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--muted); }
.topnav a.link:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 1023px) { .topnav a.link { display: none; } }
.topnav a { white-space: nowrap; } .topbar .logo { min-width: 0; }

.sos {
  border: 1.5px solid var(--clay); color: var(--clay); background: transparent; border-radius: 999px;
  padding: 6px 14px; font: 700 .78rem/1 var(--sans); letter-spacing: .08em;
}

/* floating pill nav (Headspace / 5 Minute Journal / Imprint pattern) */
.tabbar {
  position: fixed; z-index: 50; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); width: min(440px, calc(100% - 24px));
}
.tabbar a {
  flex: 1; display: grid; justify-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 999px; text-decoration: none;
  font: 600 .68rem/1 var(--sans); color: var(--muted); transition: background .25s, color .25s;
}
.tabbar a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.tabbar { transition: transform .5s var(--ease), opacity .35s; }
.tab-hide { flex: none; width: 34px; align-self: center; height: 34px; margin-left: 2px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); transition: background .25s, color .25s; }
.tab-hide:hover { background: var(--surface-2); color: var(--text); }
.tab-hide svg, .tab-show svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-show { position: fixed; z-index: 50; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px 10px 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--shadow-lg);
  font: 600 .8rem/1 var(--sans); color: var(--text); animation: rise-in .45s var(--ease); }
.tab-show[hidden] { display: none; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }
body.tabs-hidden .tabbar { transform: translate(-50%, calc(100% + 40px)); opacity: 0; pointer-events: none; }
body.tabs-hidden .composer { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 58px); }
@media (prefers-reduced-motion: reduce) { .tabbar, .topbar, .tab-show { transition: none; animation: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); text-decoration: none;
  font: 600 1rem/1 var(--sans); transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn.gold { background: var(--ember); color: #2A1B3D; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 10px 16px;
  font: 500 .92rem/1 var(--sans); text-decoration: none; transition: all .2s;
}
.chip[aria-pressed="true"], .chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tint-gold { background: var(--ember-soft); border-color: transparent; }
.card.tint-sage { background: var(--sage-soft); border-color: transparent; }
.card.tint-lilac { background: var(--lilac-soft); border-color: transparent; }
.card.tint-clay { background: var(--clay-soft); border-color: transparent; }
.card.plum { background: var(--plum); color: #F7F1E8; border: 0; }
.card.plum .small, .card.plum .muted { color: #CFC3DA; }
.tag { display: inline-block; font: 700 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-bottom: 12px; }
.tag.live { background: var(--sage-soft); color: var(--sage); }

/* arch frame: the brand motif from the logo */
.arch { border-radius: 999px 999px var(--r) var(--r); overflow: hidden; position: relative; }

/* ---------- landing ---------- */
.hero { display: grid; gap: 40px; align-items: center; padding: 28px 0 56px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 64px 0 88px; } }
.hero h1 { margin-bottom: 18px; }
.next-step { margin-top: 30px; }
.next-step p { font-weight: 600; margin-bottom: 12px; }
.portrait { position: relative; justify-self: center; width: min(420px, 100%); aspect-ratio: 4/5; }
.portrait .sun { position: absolute; inset: 8% -6% auto auto; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--ember); }
.portrait .arch { position: absolute; inset: 0 12% 0 0; background: var(--plum); box-shadow: var(--shadow-lg); }
.portrait .arch img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.02); }
.portrait .arch { background: radial-gradient(85% 55% at 50% 102%, rgba(226,162,74,.62), transparent 72%), radial-gradient(60% 40% at 50% 30%, rgba(246,217,168,.18), transparent 70%), linear-gradient(180deg, #3B2754, var(--plum)); }
.sheryl-hero { position: absolute; inset: 0; }
.sheryl-hero img { object-fit: cover; object-position: 50% 0; filter: none; }
.portrait .arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(42,27,61,.75)); }
.portrait .caption { position: absolute; left: 22px; bottom: 22px; right: 24%; color: #F7F1E8; z-index: 2; }
.portrait .caption b { font: 500 1.3rem/1.1 var(--serif); display: block; }
.portrait .play-badge { position: absolute; z-index: 3; right: 4%; bottom: 14%; width: 76px; height: 76px; border-radius: 50%; background: var(--surface); border: 0; box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.portrait .play-badge::before { content: ""; border-left: 18px solid var(--text); border-block: 11px solid transparent; margin-left: 5px; }
.portrait iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; }

.proof { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 760px) { .proof { grid-template-columns: repeat(4, 1fr); } }
.proof div { background: var(--surface); padding: 22px; }
.proof strong { font: 450 2rem/1 var(--serif); display: block; margin-bottom: 6px; }
.proof span { font-size: .88rem; color: var(--muted); }

.steps { display: grid; gap: 14px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps .card { counter-increment: s; }
.steps .card::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ember-soft); color: var(--clay); font: 600 1rem/1 var(--serif); margin-bottom: 14px; }

.bento { display: grid; gap: 14px; grid-template-columns: repeat(6, 1fr); }
.bento > * { grid-column: span 6; }
@media (min-width: 760px) { .bento .s4 { grid-column: span 4; } .bento .s2 { grid-column: span 2; } .bento .s3 { grid-column: span 3; } }

.meet { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .meet { grid-template-columns: .8fr 1.2fr; } }
.meet .arch { aspect-ratio: 3/4; background: var(--sand); }
.meet .arch img { width: 100%; height: 100%; object-fit: cover; }
.creds { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0; list-style: none; }
.creds li { background: var(--surface-2); border-radius: 999px; padding: 8px 14px; font-size: .88rem; font-weight: 500; }

/* ---------- tiers / paywall ---------- */
.tiers { display: grid; gap: 14px; }
@media (min-width: 860px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier { position: relative; }
.tier ul { padding: 0; list-style: none; margin: 14px 0 22px; }
.tier li { padding: 7px 0 7px 28px; position: relative; font-size: .95rem; }
.tier li::before { content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; border-radius: 50%; background: var(--sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%235F8C73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100%; }
.tier .price { font: 450 2rem/1 var(--serif); margin: 6px 0 2px; }
.tier.feature { border: 2px solid var(--ember); }
.tier .ribbon { position: absolute; top: -12px; left: 22px; background: var(--ember); color: #2A1B3D; font: 700 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }

.timeline { list-style: none; padding: 0; margin: 18px 0; }
.timeline li { position: relative; padding: 0 0 22px 48px; }
.timeline li::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.timeline li.done .dot { background: var(--plum); color: #F7F1E8; }
.timeline li.now .dot { background: var(--ember); color: #2A1B3D; }
.timeline b { display: block; font: 500 1.08rem/1.25 var(--serif); }
.timeline li.done b { text-decoration: line-through; opacity: .6; }
.timeline svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- onboarding ---------- */
.ob { min-height: 100dvh; display: flex; flex-direction: column; width: min(560px, 100% - 32px); margin-inline: auto; padding: max(16px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom)); }
.ob-top { display: flex; align-items: center; gap: 14px; height: 44px; }
.ob-top .back { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.ob-top .back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.progress { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ember); border-radius: inherit; transition: width .5s var(--ease); }
.ob-body { flex: 1; padding: 28px 0 20px; animation: rise .5s var(--ease); }
.ob-body h2 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.ob-foot { position: sticky; bottom: 0; padding-top: 12px; background: linear-gradient(transparent, var(--bg) 30%); }
.choice-list { display: grid; gap: 10px; margin-top: 22px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px; border-radius: var(--r);
  border: 1.5px solid var(--line-strong); background: var(--surface); font: 500 1rem/1.3 var(--sans); transition: all .2s var(--ease);
}
.choice .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); font-size: 1.2rem; }
.choice .chk { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.choice[aria-pressed="true"] { border-color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--text) inset; }
.choice[aria-pressed="true"] .chk { background: var(--text); border-color: var(--text); }
.choice[aria-pressed="true"] .chk::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.grid-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.grid-choices .choice { flex-direction: column; align-items: flex-start; min-height: 116px; }
.grid-choices .choice .chk { position: absolute; }
.grid-choices .choice { position: relative; }
.grid-choices .choice .chk { top: 12px; right: 12px; }
.prep { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 10px; }
.prep li { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); color: var(--muted); font-weight: 500; transition: all .4s; }
.prep li.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.prep .spin { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--text); animation: spin .8s linear infinite; opacity: 0; }
.prep li.on .spin { opacity: 1; }
.prep li.done .spin { animation: none; border: 0; opacity: 1; }
.prep li.done .spin::after { content: "✓"; font-weight: 700; color: var(--sage); }
.cred-grid { display: grid; gap: 10px; margin-top: 22px; }
.cred-grid .card { display: flex; gap: 14px; align-items: center; box-shadow: none; }
.cred-grid .card strong { font: 450 1.6rem/1 var(--serif); min-width: 76px; color: var(--clay); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.input, .field input {
  width: 100%; min-height: 54px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line-strong);
  background: var(--surface); font: 400 1rem var(--sans); color: var(--text);
}
.input:focus, .field input:focus { outline: none; border-color: var(--text); }
.err { color: var(--clay); font-size: .9rem; min-height: 1.2em; }

/* ---------- today ---------- */
.today-head { padding: 10px 0 18px; }
.today-head h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin-bottom: 4px; }
.week { display: flex; justify-content: space-between; margin: 18px 0 0; }
.week div { display: grid; gap: 6px; justify-items: center; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.week span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 500 .95rem/1 var(--sans); color: var(--text); }
.week .today span { background: var(--accent); color: var(--on-accent); }
.week .dot span { box-shadow: inset 0 0 0 1.5px var(--ember); }
.moods { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; }
.mood { flex: 1; aspect-ratio: 1; max-width: 64px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; transition: transform .2s var(--ease), background .2s; }
.mood svg { width: 60%; height: 60%; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; }
.mood[aria-pressed="true"] { background: var(--ember); transform: scale(1.08); }
.mood-reply { margin: 14px 0 0; font-family: var(--serif); font-size: 1.1rem; }
.essentials { list-style: none; padding: 0; margin: 0; }
.essentials li { position: relative; display: flex; gap: 14px; padding-bottom: 12px; }
.essentials li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -2px; border-left: 2px dashed var(--line-strong); }
.essentials li:last-child::before { display: none; }
.ess-check { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg); margin-top: 14px; display: grid; place-items: center; }
.ess-check.done { background: var(--sage); border-color: var(--sage); }
.ess-check.done::after { content: ""; width: 10px; height: 6px; border: 2.4px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.ess-check.next { border-color: var(--ember); background: var(--ember); box-shadow: 0 0 0 5px var(--ember-soft); }
.ess-card { flex: 1; display: flex; gap: 14px; align-items: center; text-decoration: none; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-height: 76px; transition: transform .2s var(--ease); }
.ess-card:hover { transform: translateX(3px); }
.ess-card .thumb { width: 72px; height: 56px; border-radius: 14px; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; }
.ess-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ess-card b { display: block; font: 500 1.05rem/1.25 var(--serif); }
.ess-card .small { margin: 2px 0 0; }
.ess-card.done-card { opacity: .62; }
.insight { text-align: center; padding: 38px 26px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.insight::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--ember-soft); top: -120px; left: 50%; transform: translateX(-50%); }
.insight > * { position: relative; }
.insight q { display: block; font: 400 clamp(1.5rem, 5vw, 2rem)/1.2 var(--serif); quotes: none; margin: 10px 0 14px; }
.talk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.talk a { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 500; min-height: 72px; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 70%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .hscroll { grid-auto-columns: minmax(230px, 31%); } }
.hscroll > * { scroll-snap-align: start; }
.series-card { display: block; text-decoration: none; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.series-card .art { aspect-ratio: 4/3; position: relative; display: grid; place-items: end start; padding: 16px; color: #F7F1E8; }
.series-card .art b { font: 450 1.45rem/1.05 var(--serif); position: relative; z-index: 1; max-width: 85%; }
.series-card .art svg.deco { position: absolute; right: -10%; top: -12%; width: 70%; opacity: .9; }
.series-card .meta { padding: 12px 16px 16px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 14px; }
.sec-head h2 { font-size: 1.5rem; margin: 0; }
.sec-head a { font-weight: 600; font-size: .9rem; color: var(--muted); }

/* ---------- library ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 16px; }
.seg button { border: 0; background: transparent; padding: 10px 20px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.vgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 18px; }
.vcard h3 { font-size: 1.08rem; margin: 10px 0 4px; line-height: 1.25; }
.vthumb { position: relative; display: block; width: 100%; aspect-ratio: 16/10; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; background: var(--plum); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.vthumb:hover img { transform: scale(1.04); }
.vthumb .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(21,14,29,.78); color: #fff; font: 600 .74rem/1 var(--sans); padding: 6px 8px; border-radius: 8px; }
.vthumb .lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(42,27,61,.55); color: #F7F1E8; font-weight: 600; gap: 6px; align-content: center; }
.vthumb .lock svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.vthumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vthumb .pl { position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(247,241,232,.95); display: grid; place-items: center; }
.vthumb .pl::before { content: ""; border-left: 13px solid #2A1B3D; border-block: 8px solid transparent; margin-left: 4px; }
.lessons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); }
.lesson { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line-strong); background: transparent; display: grid; place-items: center; font-weight: 600; }
.lesson.cur { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.lesson.done { background: var(--sage); color: #fff; border-color: transparent; }
.lesson svg { width: 40%; stroke: currentColor; fill: none; stroke-width: 2; }
.lesson-list { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- quiz ---------- */
.quiz-wrap { width: min(600px, 100% - 32px); margin-inline: auto; min-height: 100dvh; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) 0 24px; }
.qtext { font: 450 clamp(1.6rem, 5.4vw, 2.2rem)/1.15 var(--serif); letter-spacing: -.015em; margin: 8px 0 24px; }
.scale { display: grid; gap: 10px; }
.scale .choice { justify-content: space-between; }
.insight-pop { margin-top: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--ember-soft); animation: rise .4s var(--ease); }
.insight-pop b { display: block; margin-bottom: 4px; }
.result-hero { text-align: center; padding: 20px 0 8px; }
.result-hero .badge { width: 120px; height: 140px; margin: 0 auto 18px; }
.result-hero h1 { font-size: clamp(2.4rem, 8vw, 3.4rem); }
.bars { display: grid; gap: 14px; margin: 24px 0; }
.track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 10px 0 12px; }
.track i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.1s var(--ease); }
.nudge { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: .95rem; margin: 10px 0; }

/* ---------- guide / companion ---------- */
.guide-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; }
.orb { width: 64px; height: 64px; position: relative; flex: none; }
.orb.big { width: min(280px, 70vw); height: min(280px, 70vw); margin: 0 auto; }
.guide { position: absolute; inset: 0; }
.guide-canvas { width: 100%; height: 100%; }
.guide-fallback { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #FFF4DA, #E2A24A 55%, #B0563B); box-shadow: 0 0 40px 6px rgba(226,162,74,.45); animation: breathe 5s ease-in-out infinite; }
.guide.gl .guide-fallback { display: none; }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 46vh; padding: 8px 0 20px; }
.bubble { max-width: 84%; padding: 13px 16px; border-radius: 20px; animation: rise .35s var(--ease); }
.bubble.g { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.me { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; align-self: flex-end; }
.bubble.me a { color: inherit; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 4px; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
.composer { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 76px); width: min(688px, calc(100% - 24px)); }
.composer .chips { margin-bottom: 10px; }
.composer form { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); }
.composer input { flex: 1; border: 0; background: transparent; padding: 0 14px; font: 400 1rem var(--sans); color: var(--text); min-width: 0; }
.composer input:focus { outline: none; }
.composer button { min-height: 44px; }

/* ---------- games ---------- */
.game-card { display: flex; gap: 16px; align-items: center; text-decoration: none; }
.game-card .ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: none; }
.game-card .ic svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.breath { position: relative; width: min(300px, 76vw); aspect-ratio: 1; margin: 30px auto; display: grid; place-items: center; }
.breath .ring { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, var(--ember-soft), transparent 70%); }
.breath .core { width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #FFF4DA, var(--ember)); box-shadow: 0 0 60px rgba(226,162,74,.5); transition: transform 4s cubic-bezier(.45,0,.55,1); }
.breath .label { position: absolute; font: 450 1.6rem/1 var(--serif); }
.breath .count { position: absolute; bottom: -8px; font-weight: 600; color: var(--muted); }
.reframe-opts { display: grid; gap: 10px; }
.reframe-opts .choice.right { border-color: var(--sage); box-shadow: 0 0 0 1px var(--sage) inset; background: var(--sage-soft); }
.reframe-opts .choice.wrong { opacity: .5; }

/* ---------- me ---------- */
.profile { display: flex; gap: 16px; align-items: center; }
.avatar-i { width: 64px; height: 64px; border-radius: 50%; background: var(--ember); color: #2A1B3D; display: grid; place-items: center; font: 500 1.6rem/1 var(--serif); }
.list { list-style: none; padding: 0; margin: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.list li + li { border-top: 1px solid var(--line); }
.list a, .list button.li { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 16px 18px; text-decoration: none; background: none; border: 0; text-align: left; font: 500 1rem var(--sans); }
.list .small { margin: 0; }

/* ---------- sheet ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 90; background: rgba(21,14,29,.5); display: grid; align-items: end; animation: fade .25s; }
.sheet { background: var(--bg); border-radius: 28px 28px 0 0; padding: 12px 22px max(24px, env(safe-area-inset-bottom)); width: min(560px, 100%); margin: 0 auto; animation: up .4s var(--ease); max-height: 90dvh; overflow: auto; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line-strong); margin: 0 auto 18px; }
.crisis-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; margin-bottom: 10px; }
.crisis-line b { font-size: 1.05rem; }

/* ---------- footer ---------- */
.footer { padding: 40px 0 120px; border-top: 1px solid var(--line); margin-top: 40px; }
.care { font-size: .9rem; color: var(--muted); max-width: 72ch; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes breathe { 50% { transform: scale(1.06); } }
.reveal { animation: rise .7s var(--ease) both; }
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 12px; }

/* ---------- membership, billing, progress, admin (v3) ---------- */
.tier .price small { font: 500 .95rem var(--sans); color: var(--muted); margin-left: 2px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: var(--plum); color: #F7F1E8; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: .95rem; max-width: calc(100% - 32px); animation: toastIn .25s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.check-row { display: flex; gap: 10px; align-items: center; margin: 4px 0 10px; font-size: .95rem; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--clay); }
.test-banner { border: 1.5px dashed var(--ember); background: var(--ember-soft); color: var(--text); border-radius: var(--r); padding: 12px 16px; font-size: .92rem; }
.summary { display: grid; gap: 10px; margin: 12px 0; }
.summary .total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 1.05rem; }
.chart-card { padding: 16px 18px; }
.mood-chart { width: 100%; height: auto; display: block; overflow: visible; }
.mood-chart rect.m0 { fill: var(--line); } .mood-chart rect.m1 { fill: var(--clay); } .mood-chart rect.m2 { fill: var(--ember); }
.mood-chart rect.m3 { fill: #C9B26A; } .mood-chart rect.m4 { fill: var(--sage); } .mood-chart rect.m5 { fill: #3F7A5B; }
.mood-chart .avg { stroke: var(--plum-2); stroke-dasharray: 3 4; stroke-width: 1.2; opacity: .6; }
.mood-chart .axis { font: 10px var(--sans); fill: var(--muted); }
.plan { padding-left: 0; list-style: none; display: grid; gap: 8px; margin: 0; }
.plan li { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 14px; }
.faq { padding-left: 18px; display: grid; gap: 8px; margin: 0; }
.confirm { margin-top: 14px; padding: 14px; border-radius: var(--r-sm); background: rgba(247,241,232,.1); border: 1px solid rgba(247,241,232,.25); }
.card.flat .confirm { background: var(--surface-2); border-color: var(--line); }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 380px; margin: 20px auto 12px; }
.mcard { aspect-ratio: 1; border-radius: 16px; border: 0; background: var(--plum); cursor: pointer; display: grid; place-items: center; font-size: 1.9rem; transition: transform .35s var(--ease), background .3s; box-shadow: var(--shadow); }
.mcard span { opacity: 0; transition: opacity .2s; }
.mcard.up { background: var(--surface); transform: rotateY(180deg) scaleX(-1); }
.mcard.up span { opacity: 1; }
.mcard.got { background: var(--sage-soft); box-shadow: none; }
.mcard:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table.admin { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
table.admin th { text-align: left; font: 600 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
table.admin td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.admin select { font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
table.admin input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--clay); }
.card.danger { border: 1px solid var(--clay-soft); }
.danger-btn { background: var(--clay); }
form.card { margin-top: 14px; }
details summary { cursor: pointer; }
/* Logo byline: full name and professional title */
.logo small { letter-spacing: .14em; white-space: nowrap; }
.logo small.logo-cred { font: 500 .66rem/1.15 var(--sans); letter-spacing: .01em; text-transform: none; color: var(--muted); margin-top: 3px; }
@media (max-width: 430px) { .logo small { letter-spacing: .1em; font-size: .54rem; } .logo .lc-x { display: none; } }
.logo svg { flex-shrink: 0; }
.logo > span { min-width: 0; }
@media (max-width: 430px) { .logo { gap: 8px; } .logo svg { width: 30px; height: 30px; } .logo small { letter-spacing: .06em; font-size: .5rem; } .logo b { font-size: 1.08rem; } }
.btn.sm { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 430px) {
  .topbar { padding: 8px 8px 8px 12px; gap: 8px; }
  .topbar > .wrap { padding: 0 !important; gap: 8px; }
  .topbar .btn.sm { padding: 0 12px; font-size: .82rem; min-height: 36px; }
}
/* Legal links + agreement rows */
.footer .legal-links { flex-wrap: wrap; gap: 6px 16px; margin: 18px 0 8px; }
.footer .legal-links a { color: var(--muted); }
.check-row { align-items: flex-start; }
.check-row input { flex: none; margin-top: 3px; }
.check-row a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.renew-note { margin-top: 14px; }
/* Continue with Google */
.g-wrap { margin: 18px 0 6px; }
.g-btn { display: flex; justify-content: center; min-height: 44px; }
.g-btn > div { max-width: 100%; }
.or-rule { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; color: var(--muted, #6b6577); font-size: .85rem; }
.or-rule::before, .or-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .25; }

/* Meet Dr. Sheryl: animated vector sunrise scene (scales crisply to any resolution) */
.meet .arch.meet-scene { background: #F7F1E8; isolation: isolate; box-shadow: var(--shadow-lg); }
.meet-scene .ms-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.meet .arch.meet-scene img.ms-her { position: absolute; left: 50%; top: 9%; width: 60%; height: auto; object-fit: initial; transform-origin: 50% 30%; transform: translateX(-50%); filter: drop-shadow(0 18px 24px rgba(42,27,61,.22)); animation: msBreathe 8s ease-in-out infinite; z-index: 1; }
.meet-scene::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(transparent, rgba(185,211,193,.85)); z-index: 2; pointer-events: none; }
.meet-scene .ms-breath { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); z-index: 3; font: 600 .78rem/1 var(--sans, system-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--plum); background: rgba(255,253,249,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
.meet-scene .ms-breath { display: grid; } .meet-scene .ms-breath b { grid-area: 1 / 1; text-align: center; font-weight: 600; animation: msWordA 8s ease-in-out infinite; } .meet-scene .ms-breath b + b { animation-name: msWordB; }
.ms-rays { transform-box: fill-box; transform-origin: center; animation: msSpin 90s linear infinite; }
.ms-glow, .ms-sun { transform-box: fill-box; transform-origin: center; animation: msPulse 8s ease-in-out infinite; }
.ms-rings circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: msRing 8s ease-out infinite; }
.ms-rings circle:nth-child(2) { animation-delay: 2.66s; } .ms-rings circle:nth-child(3) { animation-delay: 5.33s; }
.ms-hill { animation: msDrift 16s ease-in-out infinite alternate; } .ms-h2 { animation-duration: 22s; animation-direction: alternate-reverse; }
.ms-float > * { offset-rotate: 0deg; }
.ms-leaf, .ms-heart, .ms-spark { opacity: 0; animation: msRise 14s linear infinite; }
.ms-leaf.l1 { --x: 40px; --dx: 30px; animation-delay: 0s; } .ms-leaf.l2 { --x: 230px; --dx: -40px; animation-delay: 4.5s; animation-duration: 17s; } .ms-leaf.l3 { --x: 120px; --dx: 50px; animation-delay: 9s; }
.ms-heart.h1 { --x: 260px; --dx: -20px; animation-delay: 2s; animation-duration: 12s; } .ms-heart.h2 { --x: 60px; --dx: 24px; animation-delay: 7s; animation-duration: 13s; }
.ms-spark.s1 { --x: 90px; --dx: 10px; animation-delay: 1s; animation-duration: 10s; } .ms-spark.s2 { --x: 200px; --dx: -12px; animation-delay: 3.5s; animation-duration: 11s; } .ms-spark.s3 { --x: 150px; --dx: 18px; animation-delay: 6s; animation-duration: 9s; } .ms-spark.s4 { --x: 270px; --dx: -16px; animation-delay: 8s; animation-duration: 10s; }
@keyframes msBreathe { 0%, 100% { transform: translateX(-50%) translateY(0) scale(1); } 50% { transform: translateX(-50%) translateY(-1.2%) scale(1.012); } }
@keyframes msPulse { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.08); } }
@keyframes msRing { 0% { transform: scale(.9); opacity: 0; } 15% { opacity: .55; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes msSpin { to { transform: rotate(360deg); } }
@keyframes msDrift { from { transform: translateX(-8px); } to { transform: translateX(8px); } }
@keyframes msRise { 0% { transform: translate(var(--x), 390px) rotate(0deg); opacity: 0; } 10% { opacity: .85; } 80% { opacity: .7; } 100% { transform: translate(calc(var(--x) + var(--dx)), 40px) rotate(220deg); opacity: 0; } }
@keyframes msWordA { 0%, 42% { opacity: 1; } 50%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes msWordB { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .meet-scene *, .meet .arch.meet-scene img.ms-her { animation: none !important; } .meet-scene .ms-breath b + b { opacity: 0; } .ms-leaf, .ms-heart, .ms-spark { opacity: 0; } }
