/* =========================================================================
   Homepage only (index.html) — Oct 2026 refresh.
   "New in the app" (#new), "Inside the app" (#app), the tabbed How it works,
   Members. Same restraint as the rest of the site: outline-only panels in
   plain var(--border), no glows. The .aw cards are live twins of real app
   widgets, so they keep the app's surface fill and 1.5px squircle border.
   ========================================================================= */

.hm-lead { max-width: 640px; margin: 14px auto 0; }

/* ---------- App-widget twins: shared card chrome ---------- */
.aw {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 18px 40px -30px rgba(60, 50, 20, 0.35);
}
:root[data-theme="dark"] .aw { box-shadow: none; }
.aw-head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.aw-kind {
  flex: 1; min-width: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--gold-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aw-meta { font-size: 11.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.aw-chev { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.aw-div { height: 1px; background: var(--border); margin: 12px 0; }
.aw-av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-dim);
  border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
}
.aw-av svg { width: 18px; height: 18px; }
.aw-av-me { border-color: var(--gold); }
.aw-av[style*="--h"] { background: hsl(var(--h) 42% 56%); color: #fff; }
.aw-live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-ink);
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.aw-live i, .duo-status i {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none;
  animation: awPulse 1.6s ease-in-out infinite;
}
@keyframes awPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes awPop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
.vb { width: 15px; height: 15px; flex: none; }

/* ---------- New in the app ---------- */
.nw-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-top: 56px; }
.nw-card {
  grid-column: span 5;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 12px 26px;
}
.nw-card.nw-wide { grid-column: span 7; }
.nw-stage {
  position: relative; flex: 1;
  display: grid; place-items: center;
  min-height: 300px; padding: 32px 24px;
  border-radius: 20px; border: 1px solid var(--border-soft);
  background:
    radial-gradient(var(--border) 1.2px, transparent 1.2px) 0 0 / 18px 18px,
    var(--surface-2);
  overflow: hidden;
}
.nw-stage > .aw, .nw-stage > .aw-stack { max-width: 380px; }
.nw-copy { padding: 22px 12px 0; }
.nw-tag {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.4px; color: var(--gold-ink);
}
.nw-tag svg { width: 15px; height: 15px; }
.nw-copy h3 { font-size: 1.3rem; margin-bottom: 8px; }
.nw-copy p { color: var(--text-muted); font-size: 0.96rem; line-height: 1.55; max-width: 52ch; }
.nw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.nw-chips li {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
}

/* Duo card (duo_card.dart DuoCard + _SideRow + _MiniDay) */
.duo-side { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.duo-side + .duo-side { margin-top: 10px; }
.duo-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.duo-who b { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; color: var(--text); }
.duo-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.duo-status.is-live { color: var(--gold-ink); font-weight: 700; }
.duo-status:not(.is-live) i { display: none; }
.duo-days { display: flex; gap: 3px; flex: none; }
.dd {
  width: 22px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  border: 1.2px solid transparent;
  transition: background .3s, border-color .3s, color .3s;
}
.dd.done { background: var(--gold); border-color: var(--gold); color: #1B1813; }
.dd.today { border-color: var(--gold); color: var(--gold-ink); }
.dd.future { background: var(--bg); border-color: var(--border); color: var(--text-muted); }
.dd.off { color: var(--text-dim); opacity: 0.45; }
.dd.is-today { border-color: var(--gold-dark); border-width: 1.8px; }
.dd.pop { animation: awPop .45s var(--ease); }
.duo-foot { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* One-day toggle (step2_goal.dart _WindowModeButton + the "Which day" box) */
.od-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.od-opt {
  padding: 12px 8px; border-radius: 14px;
  border: 1.5px solid var(--border); background: var(--surface);
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text);
  text-align: center; white-space: nowrap;
}
button.od-opt { cursor: pointer; transition: background .2s, border-color .2s, opacity .2s; }
button.od-opt:not(.on):not([disabled]):hover { border-color: var(--gold-line); }
.od-opt.on { background: var(--gold); border-color: var(--gold); color: #1B1813; }
.od-opt[disabled] { opacity: 0.45; cursor: not-allowed; }
.od-box { margin-top: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); }
.od-label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.od-status { margin: 12px 0 0; min-height: 3.2em; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.od-status.warn { color: var(--danger); }

/* Offline check-in */
.off-spot { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 700; color: var(--text); }
.off-spot svg { width: 15px; height: 15px; color: var(--gold); flex: none; }
.off-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted);
  font-size: 11px; font-weight: 800; white-space: nowrap;
  transition: background .3s, color .3s;
}
.off-chip svg { width: 13px; height: 13px; }
.off-chip .ic-ok, .off-chip.is-synced .ic-off { display: none; }
.off-chip.is-synced .ic-ok { display: block; }
.off-chip.is-synced { background: var(--gold-soft); color: var(--gold-ink); }
.off-body { display: flex; align-items: center; gap: 16px; margin: 16px 0 14px; }
.off-ring { width: 76px; height: 76px; flex: none; }
.off-ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.off-track { fill: none; stroke: var(--surface-2); stroke-width: 6; }
.off-fill { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 182.2; transition: stroke-dashoffset .3s linear; }
.off-min { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--text-muted); }
.off-min b { margin-right: 3px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.off-goal { font-size: 12.5px; color: var(--text-muted); }
.off-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }

/* Charity donation (charity_donation_card.dart) + a little ledger above it */
.aw-stack { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ledger { padding: 10px 16px; }
.ledger div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; color: var(--text-muted); }
.ledger b { color: var(--text); font-variant-numeric: tabular-nums; }
.ledger .lg-back b { color: var(--gold-ink); }
.ledger .lg-tot { margin-top: 4px; padding-top: 9px; border-top: 1px dashed var(--border); font-weight: 700; color: var(--text); }
.ch-row { display: flex; gap: 10px; align-items: flex-start; }
.ch-ic { flex: none; margin-top: 1px; color: var(--gold-ink); }
.ch-ic svg { width: 18px; height: 18px; }
.ch-title { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); }
.ch-body { margin: 3px 0 0; font-size: 12.5px; color: var(--text-muted); }
.ch-btn {
  display: inline-block; margin: 12px 0 0 28px; padding: 8px 14px;
  border-radius: 12px; background: var(--surface-2);
  font-size: 13px; font-weight: 700; color: var(--text);
}

/* ---------- Inside the app ---------- */
.ia-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; align-items: start; }
.ia-cap { margin-bottom: 16px; }
.ia-cap h3 { font-size: 1.15rem; margin-bottom: 4px; }
.ia-cap p { color: var(--text-muted); font-size: 0.95rem; }
.ia-cap-row { margin-top: 56px; }
.ia-stack { display: flex; flex-direction: column; gap: 12px; }

/* Home tiles (dashboard_screen.dart _CommitmentTile) */
.tile.is-live { border-color: var(--gold-line); }
.tile-main { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; }
.tile-copy { flex: 1; min-width: 0; }
.tile-place { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 700; color: var(--text); }
.tile-place svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.tile-body { margin: 4px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--text-muted); }
.tile-ring { position: relative; width: 68px; height: 68px; flex: none; }
.tile-ring svg { width: 68px; height: 68px; transform: rotate(-90deg); }
.tr-track { fill: none; stroke: var(--surface-2); stroke-width: 6; }
.tr-fill { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 182.2; }
.tile-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.tile-ring b { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); }
.tile-ring small { display: block; margin-top: 2px; font-size: 11px; color: var(--text-muted); }
.tile-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tile-meta span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 10px; background: var(--bg);
  font-size: 12px; font-weight: 600; color: var(--text);
}
.tile-meta svg { width: 13px; height: 13px; color: var(--text-muted); }
.tile-partner { display: flex; align-items: center; gap: 10px; }
.tp-avs { position: relative; width: 54px; height: 34px; flex: none; }
.tp-avs .aw-av { position: absolute; top: 0; left: 0; box-shadow: 0 0 0 2px var(--surface); }
.tp-avs .aw-av + .aw-av { left: 20px; }
.tp-txt { display: flex; flex-direction: column; min-width: 0; }
.tp-txt b { font-size: 14px; color: var(--text); }
.tp-txt small { font-size: 12px; color: var(--text-muted); }

/* Journal feed (journal_feed.dart _PostCard + _HeartButton) */
.jr-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.jr-tabs span {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
}
.jr-tabs span.on { background: var(--gold); border-color: var(--gold); color: #1B1813; }
.jr-tabs em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--text-dim); }
.jr-post { display: flex; gap: 10px; padding: 12px 6px 6px 14px; border-radius: 16px; }
.jr-post + .jr-post { margin-top: 10px; }
.jr-av { width: 36px; height: 36px; }
.jr-main { flex: 1; min-width: 0; }
.jr-head { display: flex; align-items: center; gap: 3px; font-size: 14.5px; }
.jr-head b { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-head img { width: 15px; height: 15px; flex: none; }
.jr-age { margin-left: 5px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.jr-more { margin-left: auto; width: 30px; height: 24px; display: grid; place-items: center; color: var(--text-muted); flex: none; }
.jr-more svg { width: 18px; height: 18px; }
.jr-rank { font-size: 12px; color: var(--text-muted); }
.jr-body { margin: 6px 8px 4px 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.jr-foot { display: flex; align-items: center; gap: 8px; }
.jr-stats {
  flex: 1; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.jr-heart {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 8px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer;
}
.jr-heart svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.jr-heart span { min-width: 18px; text-align: left; font-variant-numeric: tabular-nums; }
.jr-heart.on { color: #F91880; }
.jr-heart.on svg { fill: currentColor; }
.jr-heart.pop svg { animation: awPop .3s var(--ease); }

/* ---------- How it works: five steps, one phone ---------- */
.hiw-tabs {
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 340px);
  justify-content: center; gap: 72px; align-items: center; margin-top: 56px;
  scroll-margin-top: 96px;
}
.hiw-steps { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.hiw-tab {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  width: 100%; padding: 16px 18px;
  border: 1px solid transparent; border-radius: 20px; background: none;
  font: inherit; text-align: left; color: var(--text-muted);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.hiw-tab:hover { color: var(--text); }
.hiw-tab.on { border-color: var(--border); color: var(--text); }
.hiw-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hiw-tab-n {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--border);
  font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text-muted);
  transition: background .25s, border-color .25s, color .25s;
}
.hiw-tab.on .hiw-tab-n { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.hiw-tab-k {
  display: block; margin: 1px 0 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--gold-ink);
}
.hiw-tab-h { display: block; font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.hiw-tab-p { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.hiw-tab-p > span { min-height: 0; overflow: hidden; font-size: 0.94rem; line-height: 1.55; color: var(--text-muted); }
.hiw-tab.on .hiw-tab-p { grid-template-rows: 1fr; }
.hiw-tab.on .hiw-tab-p > span { padding-top: 6px; }

.hiw-tabs .hiw-track { display: grid; justify-items: center; gap: 0; margin-top: 0; }
.hiw-tabs .hiw-slide {
  grid-area: 1 / 1; width: 100%;
  visibility: hidden; opacity: 0; transform: translateY(10px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s linear .35s;
}
.hiw-tabs .hiw-slide.on { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }

/* ---------- Members ---------- */
#members { padding-top: clamp(48px, 8vw, 90px); padding-bottom: clamp(48px, 8vw, 90px); }
.hm-cmty {
  display: flex; align-items: center; gap: 16px;
  max-width: 720px; margin: 28px auto 44px; padding: 12px 24px 12px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  transition: border-color .25s var(--ease);
}
.hm-cmty:hover { border-color: var(--gold-line); }
.hm-cmty .cmty-avatars { flex: none; }
.hm-cmty .home-community-text { flex: 1; min-width: 0; font-size: 1rem; }
.hm-cmty .home-community-text small { margin-top: 1px; }
.hm-cmty-go { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.hm-cmty-go svg { width: 16px; height: 16px; }

/* ---------- Download card: Stripe reassurance folded in ---------- */
.cta-card .cta-safe {
  display: flex; align-items: flex-start; justify-content: center; gap: 10px;
  max-width: 560px; margin: 30px auto 0; padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.88rem; line-height: 1.55; text-align: left;
}
.cta-safe svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--gold-ink); }
.cta-safe b { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nw-grid { grid-template-columns: 1fr; }
  .nw-card, .nw-card.nw-wide { grid-column: auto; }
  .ia-grid { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 880px) {
  .hiw-tabs { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
  .hiw-steps { flex-direction: row; gap: 4px; max-width: 420px; justify-self: center; }
  .hiw-tab { grid-template-columns: 1fr; justify-items: center; gap: 6px; padding: 8px 2px; border-radius: 14px; text-align: center; }
  .hiw-tab.on { border-color: transparent; }
  .hiw-tab-h, .hiw-tab-p { display: none; }
  .hiw-tab-k { margin: 0; font-size: 10px; letter-spacing: 1.2px; }
}
@media (max-width: 620px) {
  .hm-cmty { flex-wrap: wrap; justify-content: center; border-radius: 24px; padding: 16px; text-align: center; }
  .hm-cmty .home-community-text { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .nw-grid { gap: 16px; margin-top: 36px; }
  .nw-card { padding: 8px 8px 22px; border-radius: 24px; }
  .nw-stage { min-height: 0; padding: 26px 10px; }
  .nw-copy { padding: 18px 10px 0; }
  .aw { padding: 12px; }
  .duo-side { gap: 8px; }
  .duo-side .aw-av { width: 30px; height: 30px; }
  .duo-days { gap: 2px; }
  .dd { width: 19px; height: 24px; border-radius: 6px; font-size: 9.5px; }
  .ia-grid { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .aw-live i, .duo-status i { animation: none; }
  .dd.pop, .jr-heart.pop svg { animation: none; }
  .hiw-tabs .hiw-slide { transform: none; transition: none; }
}
.nw-copy p + p { margin-top: 8px; }
.nw-copy p b { color: var(--text); font-weight: 700; }

/* ---------- /community ---------- */
.nw-card.nw-half { grid-column: span 6; }
.cm-jr { width: 100%; max-width: 400px; }
.cm-jr .jr-post { background: var(--surface); border: 1px solid var(--border); }
.cmty-banner, .cmty-activity { background: transparent; }
.cm-today { padding-bottom: 0; }
.cm-wall { padding-top: clamp(48px, 7vw, 72px); }
@media (max-width: 900px) { .nw-card.nw-half { grid-column: auto; } }

/* Wall rows + Today ticker: the app's Today list row (_ActivityRow) and its
   ActivityJournalCard ticker, rendered by main.js (cardHtml / activityLine). */
.cmty-page { gap: 10px; grid-auto-rows: auto; align-content: start; }
.cmty-card.cm-row { gap: 12px; padding: 10px 14px 10px 12px; border-radius: 18px; }
.cmty-card.cm-row:hover { transform: none; border-color: var(--gold-line); }
.cm-av { position: relative; flex: none; width: 38px; height: 38px; }
.cm-av .cmty-avatar { width: 38px; height: 38px; font-size: 0.78rem; }
.cm-pip {
  position: absolute; right: -2px; bottom: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); border: 2px solid var(--surface);
}
.cm-pip.is-done::after {
  content: ""; width: 6px; height: 3px;
  border-left: 1.6px solid #1E1E1E; border-bottom: 1.6px solid #1E1E1E;
  transform: translateY(-1px) rotate(-45deg);
}
.cm-pip.is-live { background: #34C759; }
.cm-pip.is-comeback { background: var(--surface); box-shadow: inset 0 0 0 2px var(--gold); }
.cm-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; text-align: left; }
.cm-row-name { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 14.5px; font-weight: 700; color: var(--text); }
.cm-name-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row-detail { margin-top: 1px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row-end { flex: none; font-size: 12.5px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.cmty-activity { display: block; max-width: 560px; min-height: 0; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: none; }
.cm-tick {
  display: flex; align-items: center; overflow: hidden;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
:root[data-theme="dark"] .cm-tick { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.cm-tick-person { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; animation: cmRoll .42s var(--ease) both; }
@keyframes cmRoll { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
.cm-tick-av { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.cm-ring { position: absolute; inset: 0; width: 46px; height: 46px; transform: rotate(-90deg); }
.cm-ring circle { fill: none; stroke: var(--border); stroke-width: 2; }
.cm-ring .cm-ring-fill { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 138.3; stroke-dashoffset: 138.3; animation: cmRing linear forwards; }
@keyframes cmRing { to { stroke-dashoffset: 0; } }
.cm-tick-sep { flex: none; width: 1px; height: 32px; margin: 0 14px; background: var(--border); }
.cm-tick-count { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.cm-tick-count b { font-family: var(--font-head); font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.cm-tick-count small { font-size: 12px; color: var(--text-muted); }
.cm-tick-empty { gap: 12px; }
.cm-tick-empty .cm-row-name, .cm-tick-empty .cm-row-detail { white-space: normal; }
.cm-bolt { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); }
.cm-bolt svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) {
  .cm-tick-person { animation: none; }
  .cm-ring .cm-ring-fill { animation: none; stroke-dashoffset: 0; }
}
.cmty-wall { padding-left: 0; padding-right: 0; }

/* Member banner: one compact outlined pill, the homepage's community pill,
   avatars ringed in the surface colour like the app's overlapping pairs. */
.cmty-banner-wrap { padding-top: 4px; }
.cmty-banner {
  flex-wrap: nowrap; gap: 14px;
  width: fit-content; max-width: 100%;
  padding: 10px 26px 10px 14px; border-radius: 999px;
  text-align: left;
}
.cmty-banner .cmty-avatars { padding-left: 8px; }
.cmty-banner .cmty-avatars .cmty-avatar {
  width: 34px; height: 34px; margin-left: -8px; font-size: 0.72rem;
  box-shadow: 0 0 0 2px var(--bg);
}
.cmty-banner-count { font-size: 1rem; line-height: 1.3; }
.cmty-banner-count small { display: block; margin-top: 1px; font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
@media (max-width: 560px) {
  .cmty-banner { flex-direction: column; gap: 8px; padding: 14px 22px; border-radius: 24px; text-align: center; }
}

/* Founder note: one quiet letter card, Journal-post header + contact row */
.cm-letter {
  max-width: 600px; margin: 32px auto 0; padding: 20px 22px 18px;
  border: 1px solid var(--border); border-radius: 22px; background: var(--surface);
}
.cm-letter-head { display: flex; align-items: center; gap: 12px; }
.cm-letter-av { width: 40px; height: 40px; font-size: 0.9rem; }
.cm-letter-body { margin: 14px 0 0; }
.cm-letter-body p { margin: 0 0 10px; font-size: 1rem; line-height: 1.6; color: var(--text); }
.cm-letter-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft);
  font-size: 0.88rem; color: var(--text-muted);
}
.cm-letter-links { display: flex; gap: 8px; }
.cm-letter-links a {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  font-weight: 700; font-size: 0.85rem; color: var(--text);
  transition: border-color .2s var(--ease);
}
.cm-letter-links a:hover { border-color: var(--gold-line); }

/* ---------- How it works: app-faithful step 2 (weekly / one day, window, today) ---------- */
.hiw-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hiw-seg-top { margin-bottom: 14px; }
.hiw-seg-opt {
  padding: 10px 4px; border: none; border-radius: 12px;
  background: var(--border); color: var(--text-muted);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
.hiw-seg-opt:active { transform: scale(0.97); }
.hiw-seg-opt.on { background: var(--gold); color: var(--on-gold); }
.hiw-seg-opt[disabled] { color: var(--text-dim); cursor: not-allowed; }
.hiw-seg-opt:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.hiw-status { font-size: 11px; line-height: 1.45; color: var(--text-muted); margin: 10px 0 0; }
.hiw-status.on { color: var(--gold-ink); font-weight: 600; }
.hiw-status.warn { color: var(--danger); font-weight: 600; }
.hiw-status-next { margin-top: 4px; color: var(--text); font-weight: 600; }
.hiw-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.hiw-time {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.hiw-time span { font-size: 10.5px; color: var(--text-muted); }
.hiw-time input {
  width: 100%; padding: 0; border: none; background: none;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--text);
  color-scheme: light dark;
}
.hiw-time input:focus { outline: none; }
.hiw-time:focus-within { border-color: var(--gold); }
.hiw-step-btn:disabled { opacity: .45; cursor: default; }
.hiw-track .gp-btn.is-blocked { filter: saturate(0.45) brightness(0.82); }
.hiw-shake { animation: hiwShake .42s var(--ease); }
@keyframes hiwShake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
.hiw-term-ic, .hiw-clause-ic { display: flex; flex-shrink: 0; color: var(--gold-ink); }
.hiw-clause-ic { margin-top: 2px; }
.hiw-rate .hiw-panel-label { margin-bottom: 8px; }
.hiw-rate .hiw-big { font-variant-numeric: tabular-nums; }
.hiw-rate-up { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--gold-ink); }
.hiw-seal-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
/* The pact writes itself, line by line, as step 5 opens */
.hiw-slide.on .hiw-clause { animation: hiwClauseIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes hiwClauseIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hiw-shake, .hiw-slide.on .hiw-clause { animation: none; }
}

/* ---------- Comeback: "Your comeback plan" card (RecoverySetupScreen._planCard) ---------- */
.cb-plan:not([hidden]) { animation: cbPlanIn .3s var(--ease); }
@keyframes cbPlanIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* .split p would grey these out; the app's title and plan date are textPrimary */
.split .cb-h1 { color: var(--text); }
.cb-card .cb-plan-done { font-family: var(--font-head); font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--text); margin: 2px 0 1px; }
.cb-card .cb-plan-spread { font-size: 10.5px; color: var(--text-muted); margin: 0 0 12px; }
.cb-dates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cb-date-col { text-align: center; min-width: 0; }
.cb-date {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0; border-radius: 11px; border: 1.5px solid transparent;
  background: rgba(255, 199, 56, 0.14);
}
.cb-date span { font-size: 8px; font-weight: 700; letter-spacing: .3px; color: var(--text-muted); }
.cb-date b { font-family: var(--font-head); font-weight: 800; font-size: 16px; line-height: 1.2; color: var(--text); }
.cb-date.is-today { background: var(--gold); }
.cb-date.is-today span, .cb-date.is-today b { color: var(--on-gold); }
.cb-date.is-last:not(.is-today) { border-color: rgba(184, 146, 0, 0.55); }
:root[data-theme="dark"] .cb-date.is-last:not(.is-today) { border-color: rgba(255, 208, 70, 0.55); }
.cb-date-n {
  display: inline-flex; align-items: center; gap: 2px; margin-top: 4px;
  font-size: 9.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap;
}
.cb-date-n.is-last { color: var(--gold-ink); }
.cb-date-n svg { width: 9px; height: 9px; }
.cb-plan-rule { height: 1px; background: var(--border); margin: 12px 0 2px; }
.cb-fact { display: flex; gap: 10px; margin-top: 10px; }
.cb-fact-ic {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(255, 199, 56, 0.16); color: var(--gold-ink);
}
.cb-fact-ic svg { width: 14px; height: 14px; }
.cb-fact-k, .cb-fact-n { display: block; font-size: 10px; line-height: 1.4; color: var(--text-muted); }
.cb-fact b { display: block; font-size: 11.5px; line-height: 1.35; font-weight: 700; color: var(--text); }
.cb-note {
  display: flex; gap: 8px; margin-top: 12px; padding: 9px 11px; border-radius: 11px;
  background: rgba(255, 199, 56, 0.10); border: 1px solid rgba(255, 199, 56, 0.30);
}
.cb-note-ic { display: flex; flex-shrink: 0; margin-top: 1px; color: var(--gold-ink); }
.cb-note-ic svg { width: 14px; height: 14px; }
.cb-note p { margin: 0; font-size: 10.5px; line-height: 1.4; font-weight: 600; color: var(--text); }
.cb-note.warn { background: rgba(255, 59, 48, 0.10); border-color: rgba(255, 59, 48, 0.30); }
.cb-note.warn .cb-note-ic, .cb-note-act { color: #FF3B30; }
.cb-note-act {
  margin-top: 6px; padding: 0; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 800;
}
/* Pinned like the app's bottom bar; scrolled content fades out behind it */
.cb-card-frame .cb-cta {
  position: sticky; bottom: 0; z-index: 2;
  box-shadow: 0 8px 20px -6px rgba(255, 208, 70, 0.5), 0 -14px 14px 8px var(--surface-2);
}
.cb-card-frame .cb-cta-disabled { box-shadow: 0 -14px 14px 8px var(--surface-2); }
.cb-cta-arrow { width: 14px !important; height: 14px !important; }
.cb-cta-disabled .cb-cta-arrow { display: none; }
.cb-snack {
  position: absolute; left: 50%; bottom: 84px; z-index: 3;
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  padding: 9px 14px; border-radius: 12px; white-space: nowrap;
  background: #1B1813; color: #FFFFFF; font-size: 11.5px; font-weight: 600;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.cb-snack.show { opacity: 1; transform: translate(-50%, 0); }
:root[data-theme="dark"] .cb-snack { background: #F0EFE9; color: #1B1813; }
@media (prefers-reduced-motion: reduce) { .cb-plan:not([hidden]) { animation: none; } }

/* ============================================================
   Hero "Who's showing up" (above the demo widget): faces, the member
   count and three all-time totals, each saying how it's measured. No chrome, like
   the banner it grew from; faces ringed in the page colour so each
   reads as its own person.
   ============================================================ */
.hero-pulse {
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  margin: 0 0 10px; color: var(--text); text-align: center;
  transition: transform .2s var(--ease);
}
.hero-pulse:hover { transform: translateY(-2px); }
.hero-pulse .cmty-avatar {
  width: 36px; height: 36px; font-size: 0.74rem;
  margin-left: -9px; box-shadow: 0 0 0 2.5px var(--bg);
}
.hero-pulse .cmty-avatar:first-child { margin-left: 0; }
.hp-copy { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hp-title {
  font-family: var(--font-head); font-size: 1.22rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
}
.hp-title strong { font-weight: 700; color: var(--gold-ink); }
/* One total per row, each centered under the title. */
/* One total per row, each centered under the title. */
.hp-rows {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.3;
}
.hp-row strong {
  font-family: var(--font-head); font-size: 0.92rem; font-weight: 700;
  letter-spacing: -0.01em; color: var(--text); font-variant-numeric: tabular-nums;
}
.hp-row > span { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }
/* "Live from the app · See them →": the whole block links to /community,
   where the people behind the numbers and their pacts are listed. */
.hp-proof {
  display: inline-flex; align-items: center; margin-top: 6px;
  font-size: 0.74rem; font-weight: 500; color: var(--text-muted);
}
.hp-proof i {
  width: 6px; height: 6px; margin-right: 6px; border-radius: 50%;
  background: var(--gold); animation: demoBlink 1.4s ease-in-out infinite;
}
.hp-sep { width: 3px; height: 3px; margin: 0 8px; border-radius: 50%; background: var(--text-dim); }
.hp-see { font-weight: 700; color: var(--gold-ink); }
.hero-pulse:hover .hp-see { text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .hp-proof i { animation: none; } }
/* Count-up (community-boot.js): a hidden copy of the target keeps each
   number's width while its digits grow, so the row stays put. */
.hp-count { display: inline-grid; justify-items: end; }
.hp-count > span { grid-area: 1 / 1; }
.hp-count > .hp-ghost { visibility: hidden; }
/* Phones: the demo stage brings 10px of its own padding. */
@media (max-width: 900px) { .hero-pulse { margin-bottom: 2px; } }
@media (max-width: 480px) { .hp-title { font-size: 1.12rem; } }
