/* Follow Daily — web client design system.
   Grounded in the captured app: deep forest green, warm cream, 8 accent swatches,
   practice-colored cards, uppercase overlines, soft rounded surfaces. Responsive:
   left rail on large screens (§11), bottom tab bar on phones. No build step. */

:root {
  /* Brand */
  --ink: #17271d;
  --ink-soft: #4a5a50;
  --ink-faint: #8a958d;
  --green: #1f4d33;
  --green-deep: #163826;
  --green-700: #285f40;
  --cream: #f6f1e7;
  --cream-2: #efe8d9;
  --surface: #fffdf8;
  --surface-2: #fbf7ee;
  --line: rgba(23, 39, 29, 0.10);
  --line-strong: rgba(23, 39, 29, 0.18);
  --shadow-sm: 0 1px 2px rgba(23, 39, 29, 0.06), 0 2px 8px rgba(23, 39, 29, 0.05);
  --shadow-md: 0 6px 24px rgba(23, 39, 29, 0.10);
  --shadow-lg: 0 20px 60px rgba(23, 39, 29, 0.18);

  /* Accent swatches (user accentColor enum8) */
  --amber: #e2a13a;  --olive: #8a9550;  --pink: #df8aa3;  --periwinkle: #8aa1de;
  --coral: #e0865a;  --lavender: #b196df;  --green-accent: #6aab78;  --teal: #54b0aa;

  /* ── Three-Priorities color system (Handoff #02 §5 · priority-color-families.md) ──────
     3 hue families × 3 shades (deep→light), so the 9 radar axes read as 3 groups of 3. The
     per-practice --p-<key> tokens are REDEFINED into these families (minimal churn — every
     consumer already references --p-<key>); native clients mirror the same values in
     practiceColor(). Pastor-reviewable: trivially swappable tokens, nothing downstream keys off
     the specific hex. */
  --prio-god:    #d8932a;   /* Love God — amber/gold */
  --prio-people: #3e78b8;   /* Love People — blue */
  --prio-jesus:  #2e8a60;   /* Be Like Jesus — green (brand) */
  --prio-god-soft:    color-mix(in srgb, var(--prio-god) 10%, var(--surface));
  --prio-people-soft: color-mix(in srgb, var(--prio-people) 10%, var(--surface));
  --prio-jesus-soft:  color-mix(in srgb, var(--prio-jesus) 10%, var(--surface));

  --p-worship: #c57f1a; --p-hear: #e0a12b; --p-pray: #f4cc6a;     /* love_god   1→3 (amber/gold) */
  --p-serve:   #2c5f9e; --p-connect: #4e8ac9; --p-invite: #93bcea; /* love_people 1→3 (blue) */
  --p-reflect: #1e6b49; --p-guard: #3e9e73; --p-grow: #86cba6;     /* be_like_jesus 1→3 (green) */

  --accent: var(--amber); /* overridden per-user from profile accentColor */

  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;
  --pad: clamp(16px, 4vw, 28px);
  --maxw: 1180px;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--green-700); }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ── Typography helpers ───────────────────────────────────────────── */
.display { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }
.overline {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ── App shell ────────────────────────────────────────────────────── */
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; }
.sidebar {
  position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh;
  width: 264px; flex: 0 0 264px; padding: 28px 18px;
  background: var(--green-deep); color: #eaf2ea; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; }
.brand .mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2f6b47, #1c4530); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand .name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: #fff; letter-spacing: -.01em; }
.nav-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-md);
  color: #cfe0d3; background: transparent; border: 0; width: 100%; text-align: left;
  font-size: 0.98rem; font-weight: 500; transition: background .15s, color .15s;
}
.nav-item .ico { width: 22px; height: 22px; opacity: .92; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.12); color: #fff; }
.nav-spacer { flex: 1; }
.nav-profile { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: var(--pad);
  padding-bottom: 120px; flex: 1; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 4px 2px 22px; }
.topbar h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin: 0; letter-spacing: -0.02em; }
.avatar-btn { width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); overflow: hidden; }
.avatar-btn .emoji { font-size: 1.4rem; }

/* Bottom tab bar (phones) */
.tabbar { display: none; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  appearance: none; border: 0; border-radius: var(--r-pill); padding: 14px 22px;
  font-size: 1rem; font-weight: 600; background: var(--green); color: #fff;
  box-shadow: var(--shadow-sm); transition: transform .06s ease, filter .15s, background .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn.full { width: 100%; }
.btn.lg { padding: 16px 26px; font-size: 1.05rem; }
.btn.ghost { background: transparent; color: var(--green-700); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.accent { background: var(--accent); color: #2a210d; }
.btn.subtle { background: var(--cream-2); color: var(--ink); box-shadow: none; }
.btn.danger { background: transparent; color: #b5462f; box-shadow: none; font-weight: 600; }
.linkbtn { background: none; border: 0; color: var(--green-700); font-weight: 600; padding: 6px; }
.linkbtn:hover { text-decoration: underline; }

/* ── Cards & surfaces ─────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); padding: 22px; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 980px) { .grid-2 { grid-template-columns: 1.25fr 1fr; } }

/* ── Hero (empty states) ──────────────────────────────────────────── */
.hero { text-align: center; padding: 48px 18px; }
.hero .ribbons { width: 180px; height: 132px; margin: 0 auto 26px; position: relative; }
.hero .mark-lg { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 24px;
  background: var(--green); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-md); z-index: 2; }
.hero h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 6px 0 8px; }
.hero p { max-width: 420px; margin: 0 auto 26px; color: var(--ink-soft); }

/* ── Fields ───────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 18px; }
.field > .overline { display: block; margin-bottom: 8px; }
.input, .select {
  width: 100%; padding: 14px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong);
  background: var(--surface); font-size: 1rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { outline: none; border-color: var(--green-700);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-700) 14%, transparent); }
.input-wrap { position: relative; }
.input-wrap .eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--ink-faint); padding: 8px; }
.help { font-size: .86rem; color: var(--ink-soft); margin-top: 8px; }
.error-text { color: #b5462f; font-size: .9rem; margin-top: 8px; }

.policy { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.policy li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-soft); }
.policy li .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; font-size: .7rem; }
.policy li.met { color: var(--green-700); }
.policy li.met .dot { background: var(--green); border-color: var(--green); color: #fff; }

/* ── Segmented toggle ─────────────────────────────────────────────── */
.segmented { display: inline-flex; background: var(--cream-2); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.segmented button { border: 0; background: transparent; padding: 10px 18px; border-radius: var(--r-pill);
  font-weight: 600; color: var(--ink-soft); font-size: .95rem; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ── Day chips ────────────────────────────────────────────────────── */
.daychips { display: flex; gap: 8px; flex-wrap: wrap; }
.daychip { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--surface); font-weight: 700; color: var(--ink-soft); }
.daychip.on { background: var(--green); color: #fff; border-color: var(--green); }

/* ── Week streak strip ────────────────────────────────────────────── */
.weekstrip { display: flex; justify-content: space-between; gap: 6px; }
.weekday { text-align: center; flex: 1; }
.weekday .dow { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-faint); text-transform: uppercase; }
.weekday .ring { width: 38px; height: 38px; margin: 8px auto 0; border-radius: 50%;
  border: 2px solid var(--line-strong); display: grid; place-items: center; font-weight: 600; color: var(--ink-soft); }
.weekday.today .ring { border-color: var(--green); }
.weekday.done .ring { background: var(--accent); border-color: var(--accent); color: #2a210d; }
.weekday.future .ring { border-style: dashed; color: var(--ink-faint); }

/* ── Habit cards ──────────────────────────────────────────────────── */
.habit-card { display: flex; align-items: center; gap: 16px; padding: 18px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--p, var(--green)); }
.habit-card .picon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--p, var(--green)) 18%, var(--surface)); color: var(--p, var(--green)); flex: 0 0 auto; }
.habit-card .meta { flex: 1; min-width: 0; }
.habit-card .meta .name { font-weight: 600; font-size: 1.08rem; }
.habit-card .meta .sub { font-size: .85rem; color: var(--ink-faint); }
.habit-card.done { opacity: .62; }
.habit-card.done .name { text-decoration: line-through; }

.add-habit { width: 100%; padding: 18px; border-radius: var(--r-lg); border: 2px dashed var(--line-strong);
  background: transparent; color: var(--green-700); font-weight: 600; display: flex; align-items: center;
  justify-content: center; gap: 10px; }
.add-habit:hover { background: var(--surface-2); }

.faithful { background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); }
.faithful .star { width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--pink) 22%, var(--surface));
  color: var(--pink); display: grid; place-items: center; }
.faithful .t { font-family: var(--font-display); font-size: 1.35rem; }

/* ── Practice picker / list rows ──────────────────────────────────── */
.practice-row { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: box-shadow .15s; }
.practice-row:hover { box-shadow: var(--shadow-md); }
.practice-row .head { display: flex; align-items: center; gap: 14px; }
.practice-row .pmark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--p) 18%, var(--surface)); color: var(--p); }
.practice-row .title { font-weight: 600; font-size: 1.08rem; flex: 1; }
.practice-row .body { margin-top: 14px; }
.practice-row .desc { color: var(--ink-soft); margin: 0 0 14px; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill); background: var(--cream-2); color: var(--ink-soft); }
.tag.added { background: color-mix(in srgb, var(--green) 16%, var(--surface)); color: var(--green-700); }

/* ── Progress segments (header bar in flows) ──────────────────────── */
.progress-segs { display: flex; gap: 6px; flex: 1; }
.progress-segs .seg { height: 5px; border-radius: 3px; background: var(--line-strong); flex: 1; }
.progress-segs .seg.on { background: var(--accent); }

/* ── Modals & sheets ──────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(15, 25, 19, 0.45); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 18px; z-index: 50; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: min(440px, 100%); padding: 26px; }
.sheet { background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-lg);
  width: min(560px, 100%); margin-top: auto; padding: 26px; max-height: 88vh; overflow: auto; }
.scrim.bottom { place-items: end center; padding: 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: -6px auto 16px; }

/* Full-screen flow (daily practice, dark green) */
.flow { position: fixed; inset: 0; z-index: 60; background: var(--green-deep); color: #eef5ef;
  display: flex; flex-direction: column; padding: 22px; }
.flow .flow-top { display: flex; align-items: center; gap: 14px; }
.flow .flow-body { flex: 1; display: grid; place-content: center; text-align: center; max-width: 560px;
  margin: 0 auto; gap: 18px; padding: 24px; }
.flow .flow-title { font-family: var(--font-display); font-size: 2rem; }
.flow .flow-text { font-size: 1.15rem; color: #d7e6da; white-space: pre-line; line-height: 1.6; }
.flow .flow-identity { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: #fff; }
/* Catalog markdown step (Handoff #04) — mirrors the admin preview's .h1/.h2/.h3/.tx/.sp/.center, themed for the dark flow. */
.flow .step-md { margin: auto 0; max-width: 460px; }
.flow .step-md.center { text-align: center; }
.flow .step-md .h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.15; margin: 8px 0; color: #fff; }
.flow .step-md .h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 8px 0; color: #fff; }
.flow .step-md .h3 { font-weight: 600; font-size: 1.05rem; color: #cfe0d3; letter-spacing: .01em; margin: 6px 0; }
.flow .step-md .tx { font-size: 1.1rem; line-height: 1.6; color: #d7e6da; margin: 6px 0; }
.flow .step-md .sp { height: 12px; }
.flow .step-md .ph { color: #9fb6a6; font-style: italic; }
.flow .flow-scripture { text-align: center; margin: auto 0; }
.flow .flow-scripture .ref { font-family: var(--font-display); font-size: 1.8rem; color: #fff; }
.flow .flow-scripture .lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #9fb6a6; margin-top: 8px; }
.flow .flow-nav { display: flex; align-items: center; justify-content: center; gap: 26px; padding-bottom: 14px; }
.circle-arrow { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #2a210d;
  display: grid; place-items: center; box-shadow: var(--shadow-md); }
.circle-arrow[disabled] { opacity: .3; }

/* ── Moods ────────────────────────────────────────────────────────── */
.moods { display: flex; gap: 12px; justify-content: space-between; }
.mood { flex: 1; border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: var(--r-md);
  padding: 14px 6px; display: grid; gap: 8px; place-items: center; font-weight: 600; font-size: .85rem; color: var(--ink-soft); }
.mood .face { font-size: 1.7rem; }
.mood.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); color: var(--ink); }

/* ── Feed ─────────────────────────────────────────────────────────── */
.post { padding: 16px 0; border-bottom: 1px solid var(--line); }
.post .ph { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post .pav { width: 34px; height: 34px; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; }
.post .pname { font-weight: 600; }
.post .ptime { color: var(--ink-faint); font-size: .82rem; }

/* ── Carousel (welcome) ───────────────────────────────────────────── */
.welcome { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; max-width: 460px; margin: 0 auto;
  padding: 24px; }
.welcome .slide { text-align: center; display: grid; align-content: center; gap: 18px; }
.welcome .slide h2 { font-family: var(--font-display); font-size: 2rem; margin: 0; }
.welcome .slide p { color: var(--ink-soft); margin: 0 auto; max-width: 360px; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 22px 0; }
.dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: width .2s, background .2s; }
.dots .dot.on { width: 22px; background: var(--accent); }
.preview-mock { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  border: 1px solid var(--line); padding: 16px; text-align: left; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: 22px; display: grid; place-items: center; z-index: 80; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg);
  font-weight: 500; animation: fade .15s ease; }

.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line-strong);
  border-top-color: var(--green); animation: spin 0.8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-loading { display: grid; place-items: center; min-height: 100dvh; }

/* ── Three-Priorities entry flow (Handoff #02 §4) ─────────────────── */
.pick-head { margin-bottom: 22px; }
.pick-head .display { font-size: 1.7rem; margin: 0; }
.pick-sub { font-weight: 600; color: var(--green-700); margin: 8px 0 2px; font-size: 1.05rem; }

/* Screen A — priority cards */
.priority-card { display: flex; align-items: stretch; gap: 0; width: 100%; text-align: left; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; padding: 0; }
.priority-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.priority-card .pc-bar { width: 8px; background: var(--fam); flex: 0 0 auto; }
.priority-card .pc-main { flex: 1; padding: 18px 8px 18px 16px; min-width: 0; }
.priority-card .pc-title { font-size: 1.5rem; color: var(--fam); line-height: 1.12; }
.priority-card .pc-tagline { margin: 5px 0 12px; color: var(--ink-soft); }
.priority-card .pc-video { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700;
  color: var(--fam); background: var(--fam-soft); padding: 6px 12px; border-radius: var(--r-pill); }
.priority-card .pc-video:hover { filter: brightness(.96); }
.priority-card > svg:last-child { align-self: center; margin: 0 16px; color: var(--ink-faint); flex: 0 0 auto; }

/* Screen B — priority context banner + expression cards */
.pick-prio-banner { background: var(--fam-soft); border: 1px solid color-mix(in srgb, var(--fam) 24%, transparent);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 18px; }
.pick-prio-banner .overline { color: var(--fam); }
.pick-prio-banner .display { font-size: 1.4rem; }
.expression-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-sm); border-left: 6px solid var(--p); }
.expression-card .ec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.expression-card .pmark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--p) 18%, var(--surface)); color: var(--p); flex: 0 0 auto; }
.expression-card .ec-title { font-weight: 600; font-size: 1.2rem; }
.expression-card .ec-summary { color: var(--ink-soft); margin: 0 0 16px; }

/* Both screens — reassurance + survey fallback lines */
.pick-fallback { margin-top: 24px; text-align: center; display: grid; gap: 8px; }
.pick-fallback .reassure { font-style: italic; color: var(--ink-soft); margin: 0; }
.survey-link { font-size: .95rem; }
.survey-link .u { text-decoration: underline; }

/* Onboarding — opening philosophy video banner */
.philosophy-banner { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 10%, var(--surface)), var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.philosophy-banner:hover { box-shadow: var(--shadow-md); }
.philosophy-banner .pb-play { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: var(--cream);
  display: grid; place-items: center; flex: 0 0 auto; }
.philosophy-banner .pb-title { font-weight: 600; font-size: 1.05rem; }
.philosophy-banner > svg:last-child { margin-left: auto; color: var(--ink-faint); flex: 0 0 auto; }

/* ── Survey stub (Handoff #02 §10) ────────────────────────────────── */
.survey-bar { height: 6px; border-radius: 3px; background: var(--line-strong); overflow: hidden; margin-top: 8px; }
.survey-bar-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width .25s; }
.likert { display: grid; gap: 10px; }
.likert-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font-weight: 600;
  border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: var(--r-md); padding: 14px 16px;
  color: var(--ink-soft); transition: border-color .12s, background .12s, color .12s; }
.likert-opt:hover { border-color: var(--green); }
.likert-opt .likert-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: 0 0 auto; }
.likert-opt.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--surface)); color: var(--ink); }
.likert-opt.on .likert-dot { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--surface); }
.survey-foot { text-align: center; font-size: .85rem; margin-top: 18px; }
.result-badge { width: 72px; height: 72px; border-radius: 50%; margin: 8px auto 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--p) 18%, var(--surface)); color: var(--p); }
.survey-result .display { font-size: 1.5rem; }

/* ── Progress: 3-priority rollup (Handoff #02 §6.2) ───────────────── */
.rollup { display: flex; gap: 14px; }
.rollup-item { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg);
  padding: 18px 10px; box-shadow: var(--shadow-sm); display: grid; justify-items: center; gap: 8px; text-align: center; }
.rollup-item:hover { box-shadow: var(--shadow-md); }
.rollup-item .rl-label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.rollup-item .rl-sub { font-size: .74rem; color: var(--ink-faint); }
@media (max-width: 560px) { .rollup { flex-direction: column; } }

/* ── Intro-video player (Handoff #02 §7) ──────────────────────────── */
.video-modal { width: min(640px, 100%); }
/* Portrait intro reels: cap height, derive width, center in the modal. */
.video-frame { height: min(70vh, 560px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: var(--r-md); overflow: hidden; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-soon { aspect-ratio: 16 / 9; border-radius: var(--r-md); display: grid; align-content: center; justify-items: center;
  gap: 6px; text-align: center; padding: 16px; background: color-mix(in srgb, var(--vp) 12%, var(--surface-2)); color: var(--ink); }
.video-soon-mark { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--vp) 24%, var(--surface)); color: var(--vp); }

/* ── Responsive: phone ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .sidebar { display: none; }
  /* Clear the fixed bottom tabbar (which itself adds env(safe-area-inset-bottom)); include the
     inset here too so the last content (e.g. the survey link) never sits under the pill on notched phones. */
  .main-inner { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar .tab { display: grid; place-items: center; gap: 3px; background: none; border: 0; color: var(--ink-faint);
    font-size: .7rem; font-weight: 600; padding: 6px 18px; border-radius: var(--r-md); }
  .tabbar .tab.active { color: var(--green); }
  .tabbar .tab .ico { width: 24px; height: 24px; }
}
