/* Demo path, check-in insights and the live onboarding journey (owner request, 28 September 2026).
   Loaded last. Uses the palette tokens in theme.css; no new colours beyond soft tints of blue and cyan. */

/* Landing: one clear first action */
.landing-watch { gap: 10px; }
.landing-watch .icon { width: 18px; height: 18px; }
.landing-watch-note { margin-top: 14px; font-size: var(--text-base); color: var(--muted); line-height: 1.6; max-width: 420px; }

/* Riley's space: a quiet ribbon on every page */
.demo-ribbon { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--blue-tint); color: var(--ink-soft); font-size: var(--text-base); line-height: 1.5; }
.demo-ribbon > .icon { width: 17px; height: 17px; flex: none; color: var(--accent-ink); }
.demo-ribbon > span { flex: 1 1 260px; }
.demo-ribbon .text-link { margin-left: auto; font-weight: 600; }

/* End of Riley's conversation: where to go next */
.demo-explore { margin: 22px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(115deg, var(--white), var(--surface)); text-align: left; }
.demo-explore h2 { font-size: var(--text-2xl); letter-spacing: -0.3px; margin: 0; color: var(--navy); }
.demo-explore > p { margin: 8px 0 16px; color: var(--muted); font-size: var(--text-base); line-height: 1.6; max-width: 520px; }
.demo-explore .eyebrow { margin-bottom: 6px; }
.demo-explore-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.demo-explore-item { display: flex; align-items: flex-start; gap: 12px; min-height: 64px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.demo-explore-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.demo-explore-item > .icon:first-child { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--blue); }
.demo-explore-item > .icon:last-child { width: 16px; height: 16px; flex: none; margin: 3px 0 0 auto; color: #8aa3b5; }
.demo-explore-item b { display: block; color: var(--blue); font-weight: 600; font-size: var(--text-md); }
.demo-explore-item small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.demo-explore .demo-live-link { margin-top: 14px; }
@media (max-width: 700px) {
  .demo-explore { padding: 18px 16px; }
  .demo-explore-list { grid-template-columns: 1fr; }
}

/* Check-ins: why it matters, and what the check-ins show */
.icc-why { margin: 12px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-soft); font-size: var(--text-base); line-height: 1.6; max-width: 620px; }
.icc-why b { color: var(--navy); font-weight: 600; }
.icc-insights { padding: 24px 26px; margin-bottom: 35px; }
.icc-insights-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.icc-insights-head h2 { font-size: var(--text-2xl); margin: 0; }
.icc-insights-head .eyebrow { margin-bottom: 6px; }
.icc-confidence { font-size: var(--text-sm); color: var(--muted); }
.icc-insight-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.icc-insight { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.icc-insight b { display: block; color: var(--navy); font-weight: 600; font-size: var(--text-md); }
.icc-insight p { margin: 4px 0 0; color: var(--muted); font-size: var(--text-base); line-height: 1.6; }
.icc-insight-mark { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: var(--radius-circle); background: #9bb4c6; }
.icc-insight.tone-good .icc-insight-mark { background: var(--accent); }
.icc-insight.tone-care .icc-insight-mark { background: var(--blue); }
.icc-insight.tone-care { background: var(--bg); }
.icc-more-insights { margin-top: 10px; }
.icc-more-insights > summary { cursor: pointer; color: var(--blue); font-size: var(--text-base); font-weight: 600; padding: 8px 2px; min-height: 44px; display: flex; align-items: center; }
.icc-more-insights[open] > summary { margin-bottom: 6px; }
.icc-insight-note { margin: 14px 0 0; font-size: var(--text-sm); color: var(--muted); line-height: 1.55; }
.icc-preview .icc-question[disabled] { opacity: 1; }
.icc-preview .icc-choice input:disabled + span { cursor: default; }
@media (max-width: 700px) {
  .icc-insights { padding: 18px 16px; }
}
@media (max-width: 700px) {
  .demo-ribbon { padding: 9px 12px; margin-bottom: 16px; gap: 6px 10px; font-size: var(--text-sm); }
  .demo-ribbon .text-link { margin-left: 27px; min-height: 44px; padding: 0; }
}

/* Live onboarding journey */
.journey-card { margin: 18px 0 4px; padding: 14px 14px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(160deg, var(--white), var(--surface)); }
.journey-card-title { display: block; font-size: var(--text-base); font-weight: 600; line-height: 1.35; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-progress { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; }
.journey-bar { flex: 1; min-width: 0; height: 5px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.journey-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s ease; }
.journey-count { flex: none; font-size: var(--text-xs); line-height: 1; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.journey-next { display: block; width: 100%; padding: 8px 0 4px; border: 0; background: none; font: inherit; font-size: var(--text-base); font-weight: 600; line-height: 1.4; color: var(--blue); text-align: left; cursor: pointer; }
.journey-next > span:first-child { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.journey-next-end { white-space: nowrap; }
.journey-next .icon { width: 14px; height: 14px; vertical-align: -2px; }
.journey-all { font-size: var(--text-sm); margin-left: 0; }
@media (max-width: 1150px) { .journey-card { padding: 12px 11px 8px; } }
@media (max-width: 700px) { .journey-card { display: none; } }
@media (max-height: 750px) and (min-width: 701px) { .journey-card { margin-top: 12px; } }

.nav-item { position: relative; }
.nav-dot { position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: var(--radius-circle); background: var(--accent); box-shadow: 0 0 0 3px var(--white); }
.nav-item.journey-new .nav-label-full { font-weight: 600; }
@media (max-width: 700px) { .nav-dot { top: 5px; right: calc(50% - 22px); } }
@keyframes journeyPulse { 0% { box-shadow: 0 0 0 0 rgba(69, 184, 211, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(69, 184, 211, 0); } 100% { box-shadow: 0 0 0 0 rgba(69, 184, 211, 0); } }
.journey-pulse { animation: journeyPulse 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .journey-pulse { animation: none; outline: 2px solid var(--accent); outline-offset: 2px; } }

.journey-welcome .avatar-stack { justify-content: center; margin-bottom: 14px; }
.journey-welcome h2 { color: var(--navy); }
.journey-welcome p { max-width: 460px; }
.journey-welcome-note { display: flex; align-items: flex-start; gap: 8px; justify-content: center; max-width: 440px; margin: -6px auto 0 !important; font-size: 0.8125rem !important; color: var(--muted) !important; }
.journey-welcome-note .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent-ink); }

.side-tip { position: relative; margin: 0 14px 4px; padding: 11px 38px 11px 13px; border-radius: var(--radius-md); background: var(--blue-tint); border: 1px solid var(--line); font-size: var(--text-sm); line-height: 1.5; color: var(--ink-soft); }
.side-tip b { display: block; color: var(--navy); font-size: var(--text-base); margin-bottom: 3px; }
.side-tip p { margin: 0; }
.side-tip .icon-btn { position: absolute; top: 4px; right: 4px; }

.chat-guide { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(115deg, var(--white), var(--surface)); }
.chat-guide > .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent-ink); }
.chat-guide b { display: block; color: var(--navy); font-size: var(--text-md); }
.chat-guide p { margin: 4px 0 0; font-size: var(--text-base); line-height: 1.6; color: var(--muted); }
.chat-guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; }
.chat-guide.done { background: var(--bg); }

.setup-circle { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 10px; }
.setup-circle li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.setup-circle b { display: block; color: var(--navy); font-size: var(--text-lg); }
.setup-circle span { display: block; font-size: var(--text-sm); color: var(--muted); margin-top: 1px; }
.setup-circle small { display: block; font-size: var(--text-sm); color: var(--muted); margin-top: 4px; line-height: 1.45; }
.setup-circle-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: var(--text-sm); color: var(--muted); margin-bottom: 8px; }
.circle-summary .btn { margin-left: auto; }

.setup-consent { border: 0; margin: 0 0 8px; padding: 0; }
.setup-consent legend { font-weight: 600; color: var(--navy); font-size: var(--text-lg); margin-bottom: 10px; padding: 0; }
.setup-consent-intro { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface); font-size: var(--text-base); line-height: 1.6; color: var(--ink-soft); }
.setup-consent-intro .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--accent-ink); }
.setup-consent-intro p { margin: 0; }
.choice-card { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); cursor: pointer; }
.choice-card:has(input:checked) { border-color: #8fc3e0; background: var(--blue-tint); }
.choice-card input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.choice-card b { display: block; color: var(--navy); font-size: var(--text-md); }
.choice-card small { display: block; margin-top: 3px; font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }

.story-form-heading { margin: 22px 0 10px; font-size: var(--text-lg); color: var(--navy); }
.story-form-heading:first-of-type { margin-top: 4px; }
.story-form-lead { margin: 0 0 8px; font-size: var(--text-base); color: var(--muted); }
.story-invite { display: flex; gap: 14px; align-items: flex-start; padding: 22px; margin-bottom: 22px; background: linear-gradient(115deg, var(--white), var(--surface)); }
.story-invite h2 { font-size: var(--text-2xl); margin: 0; }
.story-invite p { margin: 8px 0 14px; color: var(--muted); font-size: var(--text-base); line-height: 1.6; }
.story-invite .welcome-symbol { flex: none; }

.icc-consent { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 24px; border-color: var(--line); background: linear-gradient(115deg, var(--white), var(--surface)); }
.icc-consent h2 { font-size: var(--text-2xl); margin: 0; }
.icc-consent p { margin: 8px 0 0; font-size: var(--text-base); line-height: 1.6; color: var(--muted); max-width: 560px; }
.icc-consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.icc-privacy .text-link { display: inline-flex; min-height: 0; padding: 12px 4px; margin: -12px 0 -12px 2px; font-size: inherit; }

.journey-steps { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; gap: 10px; }
.journey-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.journey-steps li.done { background: var(--bg); }
.journey-steps li > div { flex: 1; }
.journey-steps b { display: block; color: var(--navy); font-size: var(--text-md); }
.journey-steps p { margin: 3px 0 0; font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }
.journey-step-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-circle); background: var(--blue-tint); color: var(--blue); font-weight: 600; font-size: var(--text-base); }
.journey-steps li.done .journey-step-mark { background: var(--accent); color: var(--white); }
.journey-step-mark .icon { width: 15px; height: 15px; }
.journey-step-done { font-size: var(--text-sm); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 700px) { .journey-steps li { flex-wrap: wrap; } .icc-consent { padding: 18px 16px; } .story-invite { padding: 18px 16px; } }

/* Every phone control is at least 44 by 44 px */
@media (max-width: 700px) {
  .chat-guide .btn, .journey-steps .btn, .icc-consent .btn, .setup-circle-actions .btn, .circle-summary .btn, .story-invite .btn, .icc-today .btn { min-height: 44px; }
  .journey-all, .chat-guide .text-link { min-height: 44px; }
}

/* Codes: the landing link, and group codes in the share window (owner request, 29 September 2026) */
.landing-code { font-size: var(--text-base); }
.share-note { margin: -4px 0 12px; font-size: var(--text-base); line-height: 1.55; color: var(--muted); }
.group-codes { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 10px; }
.group-code { padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.group-code.status-off, .group-code.status-expired { background: var(--bg); }
.group-code-main > b { display: block; color: var(--navy); font-size: var(--text-md); }
.group-code-main > span { display: block; margin-top: 4px; font-size: var(--text-sm); color: var(--muted); }
.group-code-value { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: var(--radius-sm); background: var(--blue-tint); color: var(--navy); font: 600 1rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; user-select: all; }
.group-code-value.big { display: block; width: max-content; max-width: 100%; margin: 10px 0; font-size: var(--text-2xl); }
.group-code.status-off .group-code-value, .group-code.status-expired .group-code-value { background: var(--soft); color: #6a7c8b; text-decoration: line-through; }
@media (max-width: 700px) { .landing-code { min-height: 44px; } }

/* Share window choices (owner report, 29 September 2026): every option is a visible button, like the check-in answers,
   instead of a drop-down menu that opened over the field on a Mac. */
.share-choice-field { container-type: inline-size; min-width: 0; margin: 0 0 12px; }
.share-choice-label { display: block; margin-bottom: 8px; font-size: var(--text-base); color: var(--muted); }
.share-choices { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.share-choice { position: relative; min-width: 0; cursor: pointer; }
.share-choices .share-choice input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; }
.share-choice > span { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 46px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--muted); font-size: var(--text-base); line-height: 1.3; text-align: center; }
.share-choice:hover > span { background: var(--surface); }
.share-choice input:checked + span { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); font-weight: 600; }
.share-choice input:focus-visible + span { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.share-choice-note { margin: 6px 0 0; font-size: var(--text-sm); line-height: 1.45; color: var(--muted); }
@container (max-width: 420px) { .share-choices.pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
