/* ==========================================================================
   Satsang: static screen mockups v2 (onboarding, later Saved/Settings/legal).
   Visual reference only. Requires ../tokens.css + ../app.css. No logic.
   ========================================================================== */

/* ---------- Onboarding shell ---------- */
.onb { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.onb__top { flex: none; display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-top) + 6px) calc(16px + var(--safe-right)) 4px calc(16px + var(--safe-left)); min-height: calc(56px + var(--safe-top)); }
.onb__top .spacer { width: 44px; flex: none; }
.progress { flex: 1; display: flex; gap: 6px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--color-divider); }
.progress i.done, .progress i.current { background: var(--color-accent); }
.progress i.current { opacity: .55; }
.onb__body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px calc(24px + var(--safe-right)) 16px calc(24px + var(--safe-left)); }
.onb__body--center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.onb__foot { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px calc(24px + var(--safe-right)) calc(var(--safe-bottom) + 14px) calc(24px + var(--safe-left)); }
.btn--block { width: 100%; min-height: 52px; border-radius: 26px; font-size: 17px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .4; }   /* e.g. Continue before a choice is made */
.step { color: var(--color-accent); }
.onb-title { font: var(--text-title); letter-spacing: -.1px; margin: 8px 0 8px; text-wrap: balance; }
.onb-lede { font: var(--text-subheadline); color: var(--color-text-secondary); margin: 0 0 20px; text-wrap: pretty; }
.fine { font: var(--text-footnote); color: var(--color-text-tertiary); margin: 14px 4px 0; text-wrap: pretty; }
.fine a, .onb-lede a { color: var(--color-accent); font-weight: 600; text-decoration: none; }

/* Welcome */
.brandname { font: 600 40px/44px var(--font-serif); letter-spacing: .3px; margin-top: 10px; }
.tagline { font: var(--text-caption); letter-spacing: 3px; text-transform: uppercase; color: var(--color-text-secondary); margin-top: 8px; }
.welcome-head { font: var(--text-title2); margin: 26px 12px 22px; text-wrap: balance; }
.emblem--xl { width: 164px; height: 164px; }
.dots-pager { display: flex; gap: 7px; justify-content: center; margin-top: 18px; }
.dots-pager i { width: 7px; height: 7px; border-radius: 50%; background: var(--color-divider); }
.dots-pager i.on { width: 20px; border-radius: 4px; background: var(--color-accent); }

/* Row lists inside cards (points, features, settings rows) */
.rows { padding: 4px 0; text-align: left; }
.row { display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; }
.row + .row { border-top: 1px solid var(--color-divider); margin-left: 64px; padding-left: 0; }
.row + .row .well { margin-left: -48px; }
.row .well { flex: none; margin-top: 1px; }
.row__text { font: var(--text-subheadline); color: var(--color-text-primary); letter-spacing: -.15px; }
.row__text b { display: block; font: var(--text-headline); font-size: 16px; margin-bottom: 2px; letter-spacing: -.2px; }
.row__text span { color: var(--color-text-secondary); }

/* Age options */
.options { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.option { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 18px; border-radius: 20px;
  background: var(--color-surface); box-shadow: var(--shadow-card), inset 0 0 0 1px var(--card-stroke); cursor: pointer; }
.option b { display: block; font: var(--text-headline); }
.option span.sub { font: var(--text-footnote); color: var(--color-text-secondary); }
.radio { width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px var(--color-text-tertiary); display: grid; place-items: center; }
.option.selected { box-shadow: var(--shadow-card), inset 0 0 0 2px var(--color-accent); }
.option.selected .radio { background: var(--color-accent); box-shadow: none; color: var(--color-on-accent); }
.option.selected .radio .ic { width: 15px; height: 15px; stroke-width: 3; }

/* Consent flow diagram */
.flow { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 16px; gap: 6px; }
.flow__node { display: flex; flex-direction: column; align-items: center; gap: 8px; font: 600 12px/15px var(--font-ui); color: var(--color-text-secondary); letter-spacing: 0; width: 86px; text-align: center; }
.flow__node .well { width: 46px; height: 46px; }
.flow__node .well .ic { width: 22px; height: 22px; }
.flow__node--provider .well { background: var(--color-surface-elevated); color: var(--color-text-primary); box-shadow: inset 0 0 0 1.5px var(--color-divider); }
.flow__line { flex: 1; height: 0; border-top: 2px dashed color-mix(in srgb, var(--color-accent) 45%, transparent); margin-bottom: 22px; }
.provider-chip { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--color-accent-soft); color: var(--color-accent); font-weight: 700; }
.card + .card, .card + .fine + .card { margin-top: 14px; }
.onb .emblem { width: 156px; height: 156px; }

/* ==========================================================================
   v2: Saved, Settings, legal & support pages
   ========================================================================== */
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page .scroll { -webkit-mask-image: none; mask-image: none; padding-top: calc(var(--safe-top) + 10px); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 4px 4px 14px; }
.page-head h1 { font: var(--text-large-title); letter-spacing: .2px; margin: 0; }
.page-head .count { font: var(--text-footnote); color: var(--color-text-tertiary); margin-bottom: 6px; }

/* Pushed-page nav bar (back + centred title) */
.navbar { flex: none; position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 6px) calc(16px + var(--safe-right)) 6px calc(16px + var(--safe-left)); min-height: calc(56px + var(--safe-top)); }
.navbar__title { position: absolute; left: 0; right: 0; bottom: 6px; height: 44px; display: grid; place-items: center; font: var(--text-headline); pointer-events: none; }
.navbar .spacer { width: 44px; }
.page .scroll.scroll--under-nav { padding-top: 4px; }

/* Search + segmented control */
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--card-stroke); color: var(--color-text-tertiary); font: var(--text-body); }
.search .ic { width: 18px; height: 18px; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--color-text-tertiary) 14%, transparent); margin: 12px 0 16px; }
.seg span { flex: 1; height: 32px; border-radius: 9px; display: grid; place-items: center; font: 500 14px/1 var(--font-ui); color: var(--color-text-primary); letter-spacing: -.1px; }
.seg span.on { background: var(--color-surface-elevated); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.08), inset 0 0 0 .5px var(--card-stroke); }

/* Saved items */
.saved-list { display: flex; flex-direction: column; gap: 12px; }
.saved-item { padding: 14px 16px 15px; display: block; color: inherit; text-decoration: none; }
.saved-item__meta { display: flex; align-items: center; gap: 8px; }
.saved-item__meta .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.saved-item__meta .eyebrow .ic { width: 14px; height: 14px; stroke-width: 2; color: var(--color-accent); }
.saved-item__meta time { margin-left: auto; font: var(--text-footnote); color: var(--color-text-tertiary); }
.saved-item__meta .star { width: 18px; height: 18px; color: var(--color-accent); fill: currentColor; }
.saved-item__text { font: 400 16px/24px var(--font-serif); color: var(--color-text-primary); margin: 8px 0 0; letter-spacing: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-height: 72px; }
.saved-item__text--quote { font-style: italic; }
.saved-item__q { font: var(--text-footnote); color: var(--color-text-secondary); margin: 6px 0 0; }
/* swipe-to-delete state */
.swipe { position: relative; display: flex; gap: 8px; }
.swipe__action { order: 2; flex: none; width: 84px; border-radius: var(--radius-card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--color-destructive); color: #fff; font: 600 13px/1 var(--font-ui); letter-spacing: 0; }
.dark .swipe__action, :root[data-theme="dark"] .swipe__action { color: #1A120A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .swipe__action { color: #1A120A; } }
.swipe__action .ic { width: 20px; height: 20px; }
.swipe .saved-item { flex: 1; min-width: 0; }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 20px 0; }
.empty-state__icon { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; color: var(--color-accent);
  background: radial-gradient(circle, rgba(var(--color-glow-rgb), calc(var(--emblem-glow) * .7)) 0%, rgba(var(--color-glow-rgb), 0) 70%); }
.empty-state__icon .ic { width: 44px; height: 44px; stroke-width: 1.4; }
.empty-state h2 { font: var(--text-title2); margin: 14px 0 8px; }
.empty-state p { font: var(--text-subheadline); color: var(--color-text-secondary); margin: 0 0 22px; max-width: 300px; }
.empty-state .actions-col { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 280px; }

/* Grouped settings */
.group { margin-bottom: 22px; }
.group > .eyebrow { margin: 0 16px 8px; display: block; }
.group .card { overflow: hidden; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; color: var(--color-text-primary); text-decoration: none; }
.cell + .cell { border-top: 1px solid var(--color-divider); margin-left: 56px; padding-left: 0; }
.cell + .cell .tile { margin-left: -40px; }
.tile { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); }
.tile .ic { width: 17px; height: 17px; stroke-width: 2; }
.tile--sage { background: color-mix(in srgb, var(--color-secondary-accent) 16%, transparent); color: var(--color-secondary-accent); }
.tile--red { background: color-mix(in srgb, var(--color-destructive) 14%, transparent); color: var(--color-destructive); }
.cell__label { flex: 1; font: var(--text-body); letter-spacing: -.3px; }
.cell__label small { display: block; font: var(--text-footnote); color: var(--color-text-secondary); letter-spacing: 0; margin-top: 2px; }
.cell__value { font: var(--text-body); color: var(--color-text-tertiary); letter-spacing: -.2px; }
.cell .chev { width: 16px; height: 16px; color: var(--color-text-tertiary); stroke-width: 2.4; }
.cell--destructive .cell__label { color: var(--color-destructive); }
.cell--stack { flex-wrap: wrap; }
.cell--stack .seg { width: 100%; margin: 4px 0 8px; }
.group-foot { font: var(--text-footnote); color: var(--color-text-tertiary); margin: 8px 16px 0; text-wrap: pretty; }
.toggle { width: 51px; height: 31px; border-radius: 16px; flex: none; position: relative; background: color-mix(in srgb, var(--color-text-tertiary) 30%, transparent); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); }
.toggle.on { background: var(--color-accent); }
.toggle.on::after { left: 22px; }
.about-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 20px; }
.about-foot img { height: 44px; }
.about-foot span { font: var(--text-footnote); color: var(--color-text-tertiary); }
.wm-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wm-light { display: none; } :root:not([data-theme="light"]) .wm-dark { display: block; } }
:root[data-theme="dark"] .wm-light { display: none; } :root[data-theme="dark"] .wm-dark { display: block; }

/* Static confirmation sheet (destructive action) */
.scrim { position: absolute; inset: 0; z-index: 70; background: rgba(20, 14, 8, .38); }
.action-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 71; border-radius: 28px 28px 0 0; background: var(--color-surface-elevated);
  padding: 10px 22px calc(var(--safe-bottom) + 18px); box-shadow: var(--shadow-floating); text-align: center; }
.action-sheet .sheet__grabber { margin-bottom: 18px; }
.action-sheet .tile { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 12px; }
.action-sheet .tile .ic { width: 26px; height: 26px; }
.action-sheet h2 { font: var(--text-title2); margin: 0 0 8px; }
.action-sheet p { font: var(--text-subheadline); color: var(--color-text-secondary); margin: 0 12px 20px; }
.action-sheet .stack { display: flex; flex-direction: column; gap: 8px; }
.btn--destructive { background: var(--color-destructive); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--destructive { color: #1A120A; } }
:root[data-theme="dark"] .btn--destructive { color: #1A120A; }

/* Legal / long-form pages */
.legal { padding: 4px 4px 28px; }
.legal .updated { font: var(--text-footnote); color: var(--color-text-tertiary); margin: 0 0 14px; }
.legal .summary { padding: 16px 18px; margin-bottom: 22px; }
.legal .summary .eyebrow { display: block; margin-bottom: 8px; }
.legal .summary ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.legal .summary li { display: flex; gap: 10px; font: var(--text-subheadline); }
.legal .summary li .ic { width: 18px; height: 18px; color: var(--color-secondary-accent); stroke-width: 2.4; flex: none; margin-top: 1px; }
.legal h2 { font: var(--text-title3); font-size: 18px; margin: 22px 0 6px; letter-spacing: -.2px; }
.legal p, .legal li { font: 400 16px/24px var(--font-ui); color: var(--color-text-secondary); letter-spacing: -.15px; }
.legal p { margin: 0 0 10px; }
.legal ul.plain { margin: 0 0 10px; padding-left: 20px; }
.legal a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.legal .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.legal .toc span { padding: 6px 12px; border-radius: 999px; background: var(--color-accent-soft); color: var(--color-accent); font: 600 13px/1.2 var(--font-ui); letter-spacing: 0; }

/* Support */
.contact { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.contact__row { display: flex; align-items: center; gap: 12px; }
.contact__row .well { width: 44px; height: 44px; }
.contact__row b { display: block; font: var(--text-headline); }
.contact__row span { font: var(--text-footnote); color: var(--color-text-secondary); }
.faq .cell { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.faq .cell__label b { display: block; font: var(--text-headline); font-size: 16px; letter-spacing: -.2px; }
.faq .cell__label small { font: var(--text-subheadline); color: var(--color-text-secondary); margin-top: 4px; }
.faq .cell .chev { margin-top: 3px; }
.crisis-card { padding: 16px 18px; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--color-secondary-accent) 10%, var(--color-surface)); }
.crisis-card b { display: block; font: var(--text-headline); }
.crisis-card span { font: var(--text-footnote); color: var(--color-text-secondary); }
.crisis-card .btn { margin-left: auto; min-height: 40px; padding: 0 14px; font-size: 15px; flex: none; }

.faq .cell + .cell { margin-left: 16px; }
.flow { padding: 14px 18px 12px; }
.option.agree { min-height: 0; padding: 10px 14px; border-radius: 16px; gap: 12px; margin-bottom: 4px; }
.option.agree .row__text { font-size: 14px; line-height: 19px; }
.option.agree .radio { width: 22px; height: 22px; }
