/* Demo app: one phone-width column, three screens, inside the shared site header and footer.
   Kit tokens only (tokens.css + ca-sites-tokens.css + ca-sites.css), so it follows light/dark like every other page. */
.demo-main { display: flex; justify-content: center; padding: 8px var(--ca-gutter, 16px) 40px; }
.screen {
  width: min(430px, 100%); min-height: min(760px, calc(100dvh - 72px)); padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
}
.screen[hidden] { display: none; }
.dhead { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; }
.screen h1 { font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; margin-top: 4px; }
.screen h2 { font-size: 28px; letter-spacing: -0.015em; margin-top: 6px; }
.screen .lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); font-weight: 500; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* the yellow sticker moment, from --pop */
.sticker { display: inline-block; padding: 0 .18em; background: var(--pop); color: var(--on-pop); border-radius: 8px; }
.livetag { gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lead-text); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.choices { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  min-height: 88px; padding: 16px; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-raised);
}
.choice:hover { border-color: var(--line-strong); }
.choice[aria-pressed="true"] { background: var(--lead-soft); border-color: var(--lead-text); box-shadow: inset 0 0 0 1px var(--lead-text); }
.choice b { display: block; font-size: 17px; }
.choice small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.choice svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.more { display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--lead-text); }
.bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
/* Start stays in view on every screen size (Stuart 1 Dec: "connect should be visible not stuck at the bottom") */
#pick .bottom { position: sticky; bottom: 0; z-index: 5; background: var(--ground); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 16px -12px rgba(26,20,36,.18); }
.btn.big { width: 100%; }
.btn svg { width: 22px; height: 22px; }
.fine { margin: 0; font-size: 13px; line-height: 1.5; text-align: center; color: var(--muted); }

/* call */
.call-head b { display: block; font-size: 17px; }
.call-head small { color: var(--muted); font-size: 14px; }
.awake { align-self: flex-start; padding: 6px 12px; background: var(--pop); color: var(--on-pop); border-radius: 999px; font-size: 12px; font-weight: 700; }
.awake.off { background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1px var(--line); }
.orbwrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12px; }
.ring { width: 216px; height: 216px; border-radius: 999px; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; }
.ring2 { width: 168px; height: 168px; border-radius: 999px; background: var(--lead-soft); display: flex; align-items: center; justify-content: center; }
.orb { width: 116px; height: 116px; border-radius: 999px; background: var(--lead); display: flex; align-items: center; justify-content: center; gap: 5px; }
.orb i { display: block; width: 6px; background: var(--on-lead); border-radius: 3px; animation: wave 1.1s ease-in-out infinite; }
.orb i:nth-child(1){height:18px;animation-delay:0s} .orb i:nth-child(2){height:34px;animation-delay:.15s} .orb i:nth-child(3){height:48px;animation-delay:.3s} .orb i:nth-child(4){height:30px;animation-delay:.45s} .orb i:nth-child(5){height:16px;animation-delay:.6s}
@keyframes wave { 50% { transform: scaleY(.45); } }
.orb.quiet i { animation-play-state: paused; transform: scaleY(.35); }
.state { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.captions { display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.captions p { margin: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
.captions p.me { align-self: flex-end; text-align: right; max-width: 85%; }
.captions p.agent.now { color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.controls { margin-top: auto; display: flex; justify-content: center; align-items: flex-start; gap: 28px; }
.controls > div { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 84px; font-size: 13px; font-weight: 600; }
.round { width: 56px; height: 56px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round:active { transform: scale(.96); }
.round svg { width: 22px; height: 22px; }
.round[aria-pressed="true"] { background: var(--pop); color: var(--on-pop); border-color: var(--pop); }
/* fixed red in both modes: white on #B42318 is 6.5:1 */
.round.end { width: 72px; height: 72px; background: #B42318; border-color: #B42318; color: #fff; }
.round.end svg { width: 28px; height: 28px; }
.typebar { display: flex; gap: 8px; }
.typebar[hidden] { display: none; }
.typebar input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font: inherit; font-size: 16px; border: 1px solid var(--line-strong); border-radius: var(--ca-radius-btn, 12px); background: var(--surface); color: var(--ink); }
.typebar .btn { min-height: 48px; padding: 0 18px; }

/* notes */
.banner { padding: 16px 18px; background: var(--lead); color: var(--on-lead); border-radius: var(--radius-card); }
.banner b { display: block; font-size: 17px; }
.banner span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.4; }
.ticket2 { margin: 0; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-raised); }
.ticket2 div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ticket2 div:last-child { border-bottom: 0; }
.ticket2 dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.ticket2 dd { margin: 4px 0 0; font-weight: 600; line-height: 1.4; }
.ticket2 dd .mono { color: var(--muted); display: block; margin-top: 2px; }
.badge { display: inline-block; padding: 4px 10px; background: var(--pop); color: var(--on-pop); border-radius: 999px; font-size: 13px; font-weight: 800; }
.simtag { margin: 0; padding: 10px 14px; background: var(--lead-soft); color: var(--ink); border-radius: 12px; font-size: 14px; line-height: 1.45; box-shadow: inset 0 0 0 1px var(--line); }
.simtag a { color: var(--lead-text); font-weight: 700; white-space: nowrap; }
.simtag[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .orb i, .live-dot { animation: none; } }

/* Business-type categories, then the demos (Stuart 1 Dec). Only categories with a demo are shown. */
.cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 4px; margin: 0 -2px; }
.cats button { flex: none; white-space: nowrap; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cats button[aria-pressed="true"] { background: var(--lead); color: var(--on-lead); border-color: var(--lead); }
.choice[hidden] { display: none; }
.choice .cat { display: block; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lead-text); margin-bottom: 3px; white-space: nowrap; }
@media (min-width: 900px) {
  #pick { width: min(880px, 100%); }
  #pick .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
  #pick .bottom { flex-direction: row; flex-wrap: wrap; }
  #pick .bottom .btn.big { flex: 1 1 0; width: auto; }
  #pick .bottom .fine { flex-basis: 100%; }
}
