/* Phone receptionist demo engine styles (assets/demo/call.js). Colours: only the layer-3 tokens (--c-*) of tokens.css, or
   color-mix() of them, so data-theme on #demo restyles everything. Fonts: --rc-display / --rc-text, set by call.js from data.fonts. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--c-page-bg); color: var(--c-page-ink); font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

/* ---- the demonstration banner (outside #demo: neutral root tokens) ---- */
.demo-bar { position: relative; z-index: 5; background: var(--c-band-bg); color: var(--c-band-ink); padding: 4px max(16px, env(safe-area-inset-left)); font-size: 14px; line-height: 1.35;
            display: flex; gap: 0 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.demo-bar b { font-weight: 600; }
.demo-bar__msg { flex: 1 1 260px; padding-block: 8px; }
.demo-bar a { color: var(--c-band-ink); min-height: 44px; display: inline-flex; align-items: center; }
html.dg-embed .demo-bar { display: none; }

/* ---- page ---- */
#demo {
  --rc-display: Georgia, "Times New Roman", serif; --rc-text: system-ui, -apple-system, "Segoe UI", sans-serif;
  --rc-accent-text: color-mix(in srgb, var(--c-link) 74%, var(--c-page-ink));
  --rc-line-2: color-mix(in srgb, var(--c-line) 62%, var(--c-page-ink));
  --rc-shadow: color-mix(in srgb, var(--c-page-ink) 16%, transparent);
  --rc-band-soft: color-mix(in srgb, var(--c-band-ink) 74%, transparent);
  --rc-ring: color-mix(in srgb, var(--c-highlight) 70%, var(--c-band-ink));
  background: var(--c-page-bg); color: var(--c-page-ink); font: 400 16px/1.5 var(--rc-text); overflow-x: clip;
}
#demo button { font: inherit; color: inherit; }
#demo a { color: var(--c-link); }
#demo :focus-visible { outline: 2px solid var(--rc-accent-text); outline-offset: 2px; }
.rc-wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.rc-fail { padding-block: 64px; }
.rc-main { padding-block: 32px 56px; }
.rc-stage { display: grid; gap: 28px; grid-template-areas: "intro" "call" "more"; }
.rc-intro { grid-area: intro; min-width: 0; } .rc-call { grid-area: call; } .rc-more { grid-area: more; min-width: 0; }
@media (min-width: 960px) {
  .rc-main { padding-block: 64px 88px; }
  .rc-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); grid-template-areas: "intro call" "more call"; grid-template-rows: auto 1fr; column-gap: 72px; row-gap: 32px; align-items: start; }
}
.rc-eyebrow { margin: 0 0 14px; font-size: 13px; line-height: 1.2; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rc-accent-text); }
.rc-h1 { font: 500 clamp(34px, 5vw, 56px)/1.06 var(--rc-display); letter-spacing: -.02em; margin: 0 0 18px; max-width: 16ch; text-wrap: balance; }
.rc-lede { margin: 0; max-width: 46ch; font-size: 18px; color: var(--c-muted); }
.rc-biz { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; max-width: 46ch; }
.rc-biz__mark { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--c-chip-bg); color: var(--rc-accent-text); }
.rc-biz__mark svg { width: 20px; height: 20px; }
.rc-biz__txt { display: grid; min-width: 0; line-height: 1.3; }
.rc-biz__txt b { font-weight: 600; overflow-wrap: anywhere; }
.rc-biz__txt > span { font-size: 14px; color: var(--c-muted); }

.rc-facts { display: grid; margin: 0 0 28px; padding: 0; list-style: none; border-top: 1px solid var(--c-line); max-width: 46ch; }
.rc-fact { position: relative; padding: 14px 0 14px 36px; border-bottom: 1px solid var(--c-line); }
.rc-fact__ic { position: absolute; left: 0; top: 14px; width: 24px; height: 24px; border-radius: 99px; border: 2px solid var(--rc-line-2); display: grid; place-items: center; color: transparent; transition: background .25s, border-color .25s, color .25s; }
.rc-fact.is-done .rc-fact__ic { background: var(--c-ok); border-color: var(--c-ok); color: var(--c-card-bg); }
.rc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1.5px solid var(--c-btn-2-line); background: var(--c-card-bg); color: var(--c-btn-2-ink) !important; font-weight: 500; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; }
.rc-btn--primary { background: var(--c-btn-bg); border-color: var(--c-btn-bg); color: var(--c-btn-ink) !important; font-weight: 600; }
.rc-btn:hover { filter: brightness(.95); }
.rc-cta-note { margin: 12px 0 0; font-size: 14px; color: var(--c-muted); }

/* ---- the call card ---- */
.rc-call { min-width: 0; border: 1px solid var(--c-line); border-radius: 20px; overflow: hidden; background: var(--c-card-bg); box-shadow: 0 1px 2px var(--rc-shadow), 0 18px 40px -24px var(--rc-shadow); }
.rc-call__head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--c-band-bg); color: var(--c-band-ink); }
.rc-call__mark { flex: none; width: 46px; height: 46px; border-radius: 99px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-band-ink) 12%, transparent); position: relative; }
.rc-call__mark::after { content: ""; position: absolute; inset: -4px; border-radius: 99px; border: 2px solid var(--rc-ring); opacity: 0; }
.rc-call[data-phase="idle"] .rc-call__mark::after { animation: rc-ring 1.8s ease-out infinite; }
.rc-call[data-phase="playing"] .rc-call__mark::after { opacity: 1; }
@keyframes rc-ring { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.25); } }
.rc-call__who { min-width: 0; flex: 1; }
.rc-call__name { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.rc-call__status { margin: 2px 0 0; font-size: 14px; color: var(--rc-band-soft); display: flex; align-items: center; gap: 8px; }
.rc-call__status::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--rc-band-soft); flex: none; }
.rc-call[data-phase="playing"] .rc-call__status::before { background: color-mix(in srgb, var(--c-ok) 55%, var(--c-band-ink)); }
.rc-call[data-phase="idle"] .rc-call__status::before { background: var(--rc-ring); }
.rc-call__timer { flex: none; font-weight: 500; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }

.rc-call__body { position: relative; background: var(--c-card-alt-bg); height: 440px; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px 8px; }
@media (max-width: 599px) { .rc-call__body { height: 400px; padding-inline: 14px; } }
.rc-call__empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px; text-align: center; }
.rc-call__empty p { margin: 0; color: var(--c-muted); font-size: 15px; max-width: 30ch; }
.rc-play { width: 84px; height: 84px; border-radius: 99px; border: 0; background: var(--c-btn-bg); color: var(--c-btn-ink) !important; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -10px var(--rc-shadow); transition: transform .15s ease; }
.rc-play:hover { transform: scale(1.04); }
.rc-play svg { margin-left: 5px; }
.rc-play-label { font-weight: 600; font-size: 17px; line-height: 1.2; }

.rc-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rc-line { display: grid; gap: 4px; justify-items: start; max-width: 86%; min-width: 0; animation: rc-rise .28s ease-out both; }
.rc-line--c { justify-self: end; justify-items: end; }
.rc-line--still, .rc-summary--still { animation: none; }
.rc-who { font-size: 12px; line-height: 1.2; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.rc-line--r .rc-who, .rc-typing--r .rc-who { color: var(--rc-accent-text); }
.rc-bubble { margin: 0; padding: 11px 15px; border-radius: 16px 16px 16px 4px; background: var(--c-card-bg); border: 1px solid var(--c-line); font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.rc-line--c .rc-bubble { background: var(--c-band-bg); border-color: var(--c-band-bg); color: var(--c-band-ink); border-radius: 16px 16px 4px 16px; }
@keyframes rc-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rc-typing { display: grid; gap: 4px; justify-items: start; margin-top: 14px; }
.rc-typing--c { justify-items: end; }
.rc-dots { display: inline-flex; gap: 5px; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: var(--c-card-bg); border: 1px solid var(--c-line); }
.rc-typing--c .rc-dots { background: var(--c-band-bg); border-color: var(--c-band-bg); border-radius: 16px 16px 4px 16px; }
.rc-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--rc-line-2); animation: rc-blink 1.1s ease-in-out infinite; }
.rc-typing--c .rc-dots i { background: var(--rc-band-soft); }
.rc-dots i:nth-child(2) { animation-delay: .15s; } .rc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes rc-blink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.rc-call__end { margin: 18px 0 6px; text-align: center; font-size: 13px; color: var(--c-muted); display: flex; align-items: center; gap: 12px; }
.rc-call__end::before, .rc-call__end::after { content: ""; flex: 1; height: 1px; background: var(--rc-line-2); }

.rc-call__foot { padding: 14px 18px 18px; border-top: 1px solid var(--c-line); display: grid; gap: 12px; }
.rc-progress { display: grid; gap: 6px; }
.rc-progress__bar { height: 4px; border-radius: 99px; background: var(--c-line); overflow: hidden; }
.rc-progress__fill { height: 100%; width: 0; background: var(--c-btn-bg); transition: width .3s ease; }
.rc-progress__text { font-size: 13px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.rc-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.rc-controls .rc-btn { flex: 1 1 140px; }
.rc-rm { margin: 0; font-size: 14px; color: var(--c-muted); }

/* ---- the text message summary ---- */
.rc-summary { margin: 16px 18px 18px; border: 1px solid var(--c-line); border-left: 4px solid var(--c-ok); border-radius: 14px; padding: 16px 18px; background: var(--c-card-bg); animation: rc-rise .3s ease-out both; }
.rc-summary__title { margin: 0 0 2px; font-weight: 600; font-size: 16px; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.rc-summary__ic { color: var(--c-ok); display: inline-flex; }
.rc-summary__sub { margin: 0 0 12px; font-size: 14px; color: var(--c-muted); }
.rc-summary dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.rc-summary dt { color: var(--c-muted); }
.rc-summary dd { margin: 0; font-weight: 500; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 399px) { .rc-summary { margin-inline: 12px; padding-inline: 14px; } .rc-summary dl { gap: 8px 12px; } }
.rc-chip { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px; background: var(--c-card-alt-bg); color: var(--c-muted); }

.rc-foot { border-top: 1px solid var(--c-line); padding-block: 28px 96px; color: var(--c-muted); font-size: 14px; }
.rc-foot p { margin: 0; line-height: 1.6; }
.rc-foot a { display: inline-block; padding-block: 12px; margin-block: -12px; }

/* ---- embedded (the funnel's live preview): the call card alone, filling the frame ---- */
html.dg-embed .rc-intro, html.dg-embed .rc-more, html.dg-embed .rc-foot { display: none; }
html.dg-embed .rc-main { padding: 0; }
html.dg-embed .rc-stage { display: block; width: 100%; }
html.dg-embed .rc-call { border: 0; border-radius: 0; box-shadow: none; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
html.dg-embed .rc-call__body { flex: 1 1 auto; height: auto; min-height: 0; }
html.dg-embed .rc-summary { flex: none; }

@media (prefers-reduced-motion: reduce) {
  #demo *, #demo *::before, #demo *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rc-call__body { height: auto; overflow: visible; }
  html.dg-embed .rc-call { height: auto; min-height: 100vh; }
}
