/* ════════════════════════════════════════════════════════════════════════
   reader-funnel.css — the "You" reward loop surface
   Mobile-first; tap targets ≥44px; non-sticky inline; AA contrast on #101820.
   The one CDO risk (dimmed-dial-behind-sheet @375px) is tuned hard below.
   ════════════════════════════════════════════════════════════════════════ */

/* ── reader-ink law: the "You" needle is HOLLOW-Volt + dashed (a solid Volt
   needle is a SOURCED expert). The .rdl-reader class restyles the existing
   needle parts without forking the geometry. ───────────────────────────── */
.rdl-reader .rdl-needle-blade { fill: none; stroke: var(--color-volt); stroke-width: 1.2; opacity: 0.9; }
.rdl-reader .rdl-needle-spine { stroke: var(--color-volt); stroke-dasharray: 5 4; opacity: 0.95; }
.rdl-reader .rdl-needle-tail  { fill: none; stroke: rgba(206,255,0,0.7); stroke-width: 1.1; }
.rdl-reader .rdl-need-chip    { fill: var(--color-volt); }
.rdl-reader .rdl-need-chip-box{ fill: rgba(16,24,32,0.94); stroke: var(--color-volt); stroke-dasharray: 3 2; }

/* ── the survey sheet: a translucent overlay dimming the live dial to ~40% ──
   anchored over .rdl__stage (position:relative is set on it below). ──────── */
.rdl__stage { position: relative; }
.rf-sheet {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  /* the dimmed-dial-behind-sheet composition — blur + dark wash, tuned so the
     dial reads ~40% behind the sheet without going muddy at 375px. */
  background: rgba(16, 24, 32, 0.62);
  backdrop-filter: blur(3px) saturate(0.7);
  -webkit-backdrop-filter: blur(3px) saturate(0.7);
  padding: 16px;
  animation: rf-sheet-in 0.28s var(--ease, ease) both;
}
.rf-reduced .rf-sheet, .rf-sheet.rf-reduced { animation: none; }
@keyframes rf-sheet-in { from { opacity: 0; } to { opacity: 1; } }

.rf-sheet.rf-dissolve { animation: rf-sheet-out 0.38s var(--ease, ease) both; }
@keyframes rf-sheet-out { from { opacity: 1; } to { opacity: 0; } }
.rf-sheet.rf-gone { display: none; }

/* ── MOBILE: the "You" overlay is a TRUE viewport-centered modal (fix 2). ──
   On desktop the sheet is position:absolute over the (short) .rdl__stage and
   centers fine. On mobile the .rdl__stage is the tall mobile-flow gauge stage,
   so an absolute sheet centers in that TALL box — far above the tapped "You"
   button, off-screen. position:fixed pins it to the VIEWPORT (robust against
   the iOS dynamic toolbar), so the questionnaire appears centered where the
   reader tapped. The .rdl__stage stays position:relative for the desktop case;
   fixed positioning ignores it on mobile by design. */
@media (max-width: 640px) {
  .rf-sheet {
    position: fixed;
    inset: 0;
    /* iOS dynamic-toolbar-safe height: dvh when supported, vh fallback. */
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    /* a touch more wash so the page behind reads as backgrounded, not adjacent */
    background: rgba(16, 24, 32, 0.74);
    padding: 18px;
  }
}

.rf-sheet.rf-advance .rf-card { animation: rf-slide 0.14s var(--ease, ease) both; }
@keyframes rf-slide { from { transform: translateX(10px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* the floating card */
.rf-card {
  width: 100%; max-width: 360px;
  background: rgba(16, 24, 32, 0.96);
  border: 1px solid rgba(206, 255, 0, 0.22);
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  color: var(--color-text, #e8ecf2);
}

/* RUNG 0 — promise */
.rf-kicker, .rf-qkick {
  font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 600;
  text-transform: lowercase; letter-spacing: 0.14em; color: var(--color-volt);
  margin-bottom: 8px;
}
.rf-h { font-family: var(--font-editorial, sans-serif); font-weight: 700; font-size: 24px; line-height: 1.15; margin: 0 0 10px; color: #fff; }
.rf-sub { font-size: 14px; line-height: 1.5; color: var(--color-text-secondary, #b8c0cc); margin: 0 0 18px; }

.rf-begin {
  display: block; width: 100%; min-height: 48px;
  background: var(--color-volt); color: #101820;
  font-family: var(--font-editorial, sans-serif); font-weight: 700; font-size: 16px;
  border: none; border-radius: 8px; cursor: pointer;
  transition: filter var(--dur-fast, 0.15s) var(--ease, ease);
}
.rf-begin:hover { filter: brightness(1.08); }
.rf-begin:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.rf-skiplink {
  display: inline-block; margin-top: 12px; background: none; border: none;
  color: var(--color-text-tertiary, #8a93a6); font-size: 13px; cursor: pointer;
  font-family: var(--font-mono, monospace); padding: 6px;
}
.rf-skiplink:hover { color: var(--color-text-secondary, #b8c0cc); }

/* RUNG 1 — question screen */
.rf-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rf-dots { display: flex; gap: 6px; }
.rf-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.rf-dot.on { background: var(--color-volt); }
.rf-qtext { font-family: var(--font-editorial, sans-serif); font-weight: 600; font-size: 20px; line-height: 1.25; margin: 0 0 8px; color: #fff; }
.rf-frame { font-size: 13px; line-height: 1.45; color: var(--color-text-tertiary, #8a93a6); margin: 0 0 18px; }

.rf-opts { display: flex; flex-direction: column; gap: 10px; }
.rf-opt {
  width: 100%; min-height: 48px; padding: 12px 16px; text-align: left;
  background: rgba(255,255,255,0.04); color: var(--color-text, #e8ecf2);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 8px;
  font-family: var(--font-editorial, sans-serif); font-size: 15px; font-weight: 500; cursor: pointer;
  transition: border-color var(--dur-fast, 0.15s) var(--ease, ease), background var(--dur-fast, 0.15s) var(--ease, ease);
}
.rf-opt:hover { border-color: rgba(206,255,0,0.4); }
.rf-opt:focus-visible { outline: 2px solid var(--color-volt); outline-offset: 1px; }
.rf-opt.sel { border-color: var(--color-volt); background: rgba(206,255,0,0.08); }

.rf-back { margin-top: 16px; background: none; border: none; color: var(--color-text-tertiary, #8a93a6); font-size: 13px; cursor: pointer; padding: 6px 0; }
.rf-back:hover { color: var(--color-text-secondary, #b8c0cc); }
.rf-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* per-answer quiet fill: a brief tint over the stage behind the sheet */
.rdl__stage.rf-fill-a::after,
.rdl__stage.rf-fill-d::after,
.rdl__stage.rf-fill-s::after {
  content: ""; position: absolute; inset: 0; z-index: 25; pointer-events: none;
  animation: rf-fill 0.36s var(--ease, ease) both;
}
.rdl__stage.rf-fill-a::after { background: radial-gradient(circle at 50% 60%, rgba(206,255,0,0.12), transparent 60%); }
.rdl__stage.rf-fill-d::after { background: radial-gradient(circle at 50% 60%, rgba(255,107,107,0.12), transparent 60%); }
.rdl__stage.rf-fill-s::after { background: radial-gradient(circle at 50% 60%, rgba(138,147,166,0.10), transparent 60%); }
@keyframes rf-fill { from { opacity: 0; } 40% { opacity: 1; } to { opacity: 0; } }

/* ── THE REWARD caption card (below the dial) ── */
.rf-reward {
  max-width: 520px; margin: 14px auto 0; padding: 18px 20px;
  background: rgba(16,24,32,0.6); border: 1px solid rgba(206,255,0,0.22);
  border-radius: 10px; text-align: center;
  animation: rf-reward-in 0.4s var(--ease, ease) both;
}
.rf-reduced .rf-reward, .rf-sheet.rf-reduced ~ .rf-reward { animation: none; }
@keyframes rf-reward-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rf-reward-kick { font-family: var(--font-mono, monospace); font-size: 11px; text-transform: lowercase; letter-spacing: 0.14em; color: var(--color-volt); }
/* the caveat LEADS the card (before the scenario name): the read is a mapping
   of the reader's answers, not a verdict — the framing arrives first. */
.rf-reward-caveat { font-size: 13px; line-height: 1.5; color: var(--color-text-secondary, #b8c0cc); margin: 6px 0 6px; }
/* co-equal with the body copy, NOT a crowned verdict headline (was 22px —
   the biggest element on the card, which read as a result being awarded). */
.rf-reward-name { font-family: var(--font-editorial, sans-serif); font-weight: 700; font-size: 16px; color: #fff; margin: 0 0 8px; }
.rf-reward-gloss { font-size: 14px; line-height: 1.5; color: var(--color-text-secondary, #b8c0cc); margin: 0 0 8px; }
.rf-reward-surface { font-size: 13px; line-height: 1.5; color: var(--color-volt); opacity: 0.92; margin: 0 0 8px; }
.rf-reward-foot { font-size: 12px; line-height: 1.5; color: var(--color-text-tertiary, #8a93a6); margin: 0; }
.rf-reward:focus-visible { outline: 2px solid var(--color-volt); outline-offset: 2px; }

/* cohort-band fallback (first-class path; rendered as a dashed-Volt arc on the
   same dial via the reader arm — the .rf-band class would be applied to the
   wedge layer when place() falls back to cohort-match; the needle path is the
   default, this is the hedge). */
.rdl-reader.rf-band .rdl-needle-blade,
.rdl-reader.rf-band .rdl-needle-tail { display: none; }

@media (prefers-reduced-motion: reduce) {
  .rf-sheet, .rf-sheet.rf-advance .rf-card, .rf-reward { animation: none !important; }
  .rdl__stage.rf-fill-a::after, .rdl__stage.rf-fill-d::after, .rdl__stage.rf-fill-s::after { display: none; }
}

/* mobile-first: the card already fits 375px; widen breathing room on desktop */
@media (min-width: 760px) {
  .rf-card { max-width: 400px; padding: 26px 24px; }
  .rf-h { font-size: 28px; }
}

/* ════ WAVE 2: server cohort (who-agrees/disagrees) + the SAVE step ════ */
.rf-cohort { margin: 12px 0 4px; }
.rf-cohort-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.rf-cohort-col {}
.rf-cohort-h {
  font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-text-tertiary, #8a93a6); margin-bottom: 4px;
}
.rf-cohort-col ul, .rf-cohort-col li { list-style: none; margin: 0; padding: 0; }
.rf-cohort-row { font-size: 13px; line-height: 1.5; color: var(--color-text-secondary, #b8c0cc); }
/* the "(N of 5 shared)" overlap annotation — muted, so the figure name leads
   and the shared-question count reads as a quiet legibility note, not a score. */
.rf-cohort-overlap {
  font-family: var(--font-mono, monospace); font-size: 11px;
  color: var(--color-text-tertiary, #8a93a6); white-space: nowrap;
}

.rf-savewrap { margin-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; }
/* SECONDARY save/share disclosure (operator 2026-07-01): the read lands on the dial,
   so Save/Share is a quiet, collapsed <details> — the summary is a demoted link, not a
   Volt CTA; expanding it reveals the (still-Volt) save action + share + erase. */
.rf-savewrap--secondary { }
.rf-save-summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--color-text-secondary, #b8c0cc);
  padding: 4px 0; user-select: none;
}
.rf-save-summary::-webkit-details-marker { display: none; }
.rf-save-summary::before {
  content: "＋"; font-weight: 400; color: var(--color-text-tertiary, #8a93a6);
}
.rf-savewrap--secondary[open] .rf-save-summary::before { content: "－"; }
.rf-save-summary:hover { color: var(--color-text, #E8E6E1); }
.rf-savewrap--secondary[open] .rf-save-summary { margin-bottom: 12px; }
.rf-consent {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
  font-size: 13px; line-height: 1.45; color: var(--color-text-secondary, #b8c0cc); margin-bottom: 10px;
}
.rf-consent-cb { margin-top: 2px; accent-color: var(--color-volt); }
.rf-save {
  display: block; width: 100%; min-height: 48px;
  background: var(--color-volt); color: #101820;
  font-family: var(--font-editorial, sans-serif); font-weight: 700; font-size: 15px;
  border: none; border-radius: 8px; cursor: pointer;
  transition: filter var(--dur-fast, 0.15s) var(--ease, ease);
}
.rf-save:hover { filter: brightness(1.08); }
.rf-save:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rf-erase-link {
  display: inline-block; margin-top: 8px; background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--color-text-tertiary, #8a93a6); text-decoration: underline; padding: 4px 0;
}
.rf-erase-link:hover { color: var(--color-text-secondary, #b8c0cc); }

/* ── post-OAuth-success "saved to your account" state (popup return) ── */
.rf-saved {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 8px;
  background: rgba(159, 230, 79, 0.10);
  border: 1px solid rgba(159, 230, 79, 0.30);
}
.rf-saved-check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-volt); color: #101820;
  font-weight: 800; font-size: 14px; line-height: 22px; text-align: center;
}
.rf-saved-msg { font-size: 13px; line-height: 1.45; color: var(--color-text-secondary, #b8c0cc); }
.rf-saved-msg strong { color: var(--color-text-primary, #f2f5fa); }
/* quiet, non-blocking note for cancel / error (read left intact) */
.rf-claim-note {
  margin-top: 10px; font-size: 12px; line-height: 1.45;
  color: var(--color-text-tertiary, #8a93a6);
}

/* ── onward affordance after a save: route to the Readers view (the readers'
   own distribution / the honest "too few readers yet" empty-state). Filled
   Volt to read as the primary next step, distinct from the outline Share. ── */
.rf-readers-cta {
  display: block; width: 100%; min-height: 46px; margin-top: 12px;
  background: var(--color-volt); color: #101820;
  font-family: var(--font-editorial, sans-serif); font-weight: 700; font-size: 14px;
  border: none; border-radius: 8px; cursor: pointer;
  transition: filter var(--dur-fast, 0.15s) var(--ease, ease);
}
.rf-readers-cta:hover { filter: brightness(1.08); }
.rf-readers-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── share my view (opt-in public card) ── */
.rf-share {
  display: block; width: 100%; min-height: 44px; margin-top: 8px;
  background: transparent; color: var(--color-volt);
  font-family: var(--font-editorial, sans-serif); font-weight: 600; font-size: 14px;
  border: 1px solid var(--color-volt); border-radius: 8px; cursor: pointer;
  transition: background var(--dur-fast, 0.15s) var(--ease, ease), color var(--dur-fast, 0.15s) var(--ease, ease);
}
.rf-share:hover { background: rgba(206,255,0,0.10); }
.rf-share:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rf-share[disabled] { opacity: 0.6; cursor: default; }
.rf-share-out { margin-top: 10px; }
.rf-share-out:empty { margin-top: 0; }

/* ── re-take the questionnaire (shown when You is re-selected after a saved
   completion; a secondary outline CTA under the read) ── */
.rf-retakewrap { margin-top: 12px; }
.rf-retake {
  display: block; width: 100%; min-height: 44px;
  background: transparent; color: var(--color-volt);
  font-family: var(--font-editorial, sans-serif); font-weight: 600; font-size: 14px;
  border: 1px solid var(--color-volt); border-radius: 8px; cursor: pointer;
  transition: background var(--dur-fast, 0.15s) var(--ease, ease), color var(--dur-fast, 0.15s) var(--ease, ease);
}
.rf-retake:hover { background: rgba(206,255,0,0.10); }
.rf-retake:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rf-share-note { font-size: 12px; line-height: 1.5; color: var(--color-text-secondary, #b8c0cc); margin: 0 0 6px; }
.rf-share-row { display: flex; gap: 6px; align-items: stretch; }
.rf-share-url {
  flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 10px;
  background: rgba(255,255,255,0.04); color: var(--color-text, #e8ecf2);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 6px;
  font-family: var(--font-mono, monospace); font-size: 12px;
}
.rf-share-copy {
  flex: 0 0 auto; min-height: 40px; padding: 0 12px;
  background: var(--color-volt); color: #101820;
  font-family: var(--font-editorial, sans-serif); font-weight: 700; font-size: 13px;
  border: none; border-radius: 6px; cursor: pointer;
}
.rf-share-copy:hover { filter: brightness(1.08); }
.rf-share-copy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (min-width: 760px) {
  .rf-cohort-grid { grid-template-columns: 1fr 1fr; }
}
