/* ============================================================
   Channel demos: the phone and the five app screens (WhatsApp, Instagram DM,
   Messenger, a Facebook post and an Instagram post with comments), the hero channel rail and the
   "how it works" section. Everything inside the phone is a replica of another
   company's UI, so it uses the phone's own system font and the apps' own
   colours, not ours. All selectors carry the dm- prefix (see
   CHAT_MOCK_SELECTOR_TOKENS in test_web_surfaces.py).
   ============================================================ */

/* box-sizing is set here, not inherited: the reel player has no global
   border-box, and a content-box body came out 22px too wide, so the screen sat
   off-centre in its bezel (Gene, 2026-11-04). */
.dm-dev, .dm-body, .dm-screen { box-sizing: border-box; }
.dm-dev { --w: 375px; --h: 812px; --k: 1; position: relative; flex: none;
  width: calc((var(--w) + 22px) * var(--k)); height: calc((var(--h) + 22px) * var(--k)); }
.dm-body { position: absolute; inset: 0; transform-origin: 0 0; transform: scale(var(--k));
  width: calc(var(--w) + 22px); height: calc(var(--h) + 22px); border-radius: 62px; background: #1b1720; padding: 11px;
  box-shadow: 0 0 0 1.5px #3a3340, 0 0 0 4px #0c0a0e, 0 50px 90px -20px rgba(9, 4, 14, .75), 0 30px 50px -30px rgba(0, 0, 0, .6); }
.dm-screen { position: relative; width: var(--w); height: var(--h); border-radius: 52px; overflow: hidden; background: #fff; color: #000; isolation: isolate;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.dm-island { position: absolute; top: 11px; left: 50%; width: 122px; height: 35px; margin-left: -61px; background: #000; border-radius: 20px; z-index: 50; }
.dm-sbar { position: absolute; top: 0; left: 0; right: 0; height: 50px; display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 44px; font-size: 16px; font-weight: 600; z-index: 40; }
.dm-sbar__ri { display: flex; gap: 6px; align-items: center; }
.dm-sbar__ri svg { fill: currentColor; }
.dm-homebar { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #000; z-index: 40; }

.dm-app { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff;
  transition: transform .5s cubic-bezier(.32, .72, 0, 1), opacity .5s; box-shadow: -8px 0 24px rgba(0, 0, 0, .08); }
.dm-app.is-off { transform: translateX(100%); }
.dm-app.is-under { transform: translateX(-28%); opacity: .5; }
.dm-app.is-gone { display: none; }
.dm-app.is-instant { transition: none; }
.dm-hd { flex: none; height: 104px; padding: 50px 14px 0 10px; display: flex; align-items: center; gap: 10px; }
.dm-gap { width: 12px; flex: none; }
.dm-nm { flex: 1; min-width: 0; line-height: 1.15; }
.dm-nm b, .dm-nm small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-nm b { font-size: 16.5px; font-weight: 600; }
.dm-nm small { font-size: 12.5px; }
.dm-thread { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 10px 10px; gap: 2px; }
.dm-row { display: flex; align-items: flex-end; gap: 7px; margin-top: 2px; animation: dm-pop .32s cubic-bezier(.16, 1, .3, 1) both; }
.dm-row--first { margin-top: 10px; }
.dm-row--me { justify-content: flex-end; }
.dm-bub { max-width: 76%; font-size: 16px; line-height: 1.3; padding: 8px 13px; overflow-wrap: anywhere; }
.dm-bub--dots { padding: 10px 14px; }
.dm-spacer { width: 28px; flex: none; }
.dm-composer { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px 34px; }
.dm-field { flex: 1; display: flex; align-items: center; font-size: 16px; }
.dm-ph { flex: 1; }
.dm-ic { width: 26px; height: 26px; flex: none; display: block; }
.dm-av { border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; color: #fff; background: linear-gradient(140deg, #e7b7a7, #9b5a6b); }
.dm-av--biz { background: #34233a; color: #ead9a8; font-family: "Cormorant Garamond", Georgia, serif; }
.dm-prof { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: auto 0 18px; font-size: 13px; }
.dm-prof b { font-size: 17px; font-weight: 600; margin-top: 8px; }
.dm-prof__btn { margin-top: 10px; font-weight: 600; font-size: 13.5px; padding: 7px 14px; border-radius: 8px; }
.dm-seen { align-self: flex-end; font-size: 12px; margin: 3px 6px 0; }
.dm-dots { display: inline-flex; gap: 4px; padding: 3px 2px; }
.dm-dots i { width: 8px; height: 8px; border-radius: 50%; background: #8e8e93; animation: dm-blink 1.2s infinite both; }
.dm-dots i:nth-child(2) { animation-delay: .18s; }
.dm-dots i:nth-child(3) { animation-delay: .36s; }
.dm-caret { display: inline-block; width: 2px; height: 19px; vertical-align: -3px; margin-left: 1px; animation: dm-caret 1s steps(1) infinite; }
.dm-tap { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(0, 0, 0, .18); z-index: 60; pointer-events: none; animation: dm-tap .6s ease-out forwards; }
@keyframes dm-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes dm-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes dm-caret { 50% { opacity: 0; } }
@keyframes dm-tap { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* WhatsApp (iOS, light) */
.dm-wa { background: #efe7de; }
.dm-wa__wall { position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .05) 1.5px, transparent 2px), radial-gradient(circle at 70% 60%, rgba(0, 0, 0, .045) 1.2px, transparent 1.8px);
  background-size: 36px 36px, 28px 28px; }
.dm-wa .dm-hd { background: rgba(246, 246, 246, .96); border-bottom: .5px solid rgba(0, 0, 0, .12); }
.dm-wa .dm-nm small { color: #667781; }
.dm-wa .dm-bub { border-radius: 8px; padding: 6px 8px 7px 9px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); color: #111b21; }
.dm-wa .dm-row--them .dm-bub { background: #fff; }
.dm-wa .dm-row--me .dm-bub { background: #d9fdd3; }
.dm-wa .dm-row--first.dm-row--them .dm-bub { border-top-left-radius: 0; }
.dm-wa .dm-row--first.dm-row--me .dm-bub { border-top-right-radius: 0; }
.dm-wa__t { float: right; font-size: 11px; color: #667781; margin: 9px 0 -4px 10px; display: inline-flex; gap: 3px; align-items: center; }
.dm-tick { width: 16px; height: 11px; }
.dm-wa__chip { align-self: center; background: #fff; color: #54656f; font-size: 12.5px; font-weight: 500; padding: 5px 11px; border-radius: 8px; margin: 6px 0 10px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.dm-wa .dm-composer { background: rgba(246, 246, 246, .96); border-top: .5px solid rgba(0, 0, 0, .08); }
.dm-wa .dm-field { min-height: 34px; border-radius: 18px; background: #fff; border: .5px solid rgba(0, 0, 0, .12); padding: 6px 12px; color: #111b21; }
.dm-wa__send { width: 34px; height: 34px; border-radius: 50%; background: #1daa61; display: grid; place-items: center; }

/* Instagram DM (iOS, light) */
.dm-ig .dm-hd { border-bottom: .5px solid #dbdbdb; }
.dm-ig .dm-nm b { font-size: 16px; }
.dm-ig .dm-nm small, .dm-ig .dm-prof, .dm-ig .dm-seen { color: #737373; }
.dm-ig .dm-prof b { color: #000; }
.dm-ig .dm-prof__btn { background: #efefef; color: #000; }
.dm-ig .dm-bub { border-radius: 22px; }
.dm-ig .dm-row--them .dm-bub { background: #efefef; }
.dm-ig .dm-row--me .dm-bub { color: #fff; background: linear-gradient(170deg, #8a3ffc 0%, #5b51d8 45%, #3797f0 100%); }
.dm-ig .dm-composer { padding-top: 6px; }
.dm-ig .dm-field { height: 44px; border-radius: 22px; background: #efefef; gap: 10px; padding: 0 6px 0 5px; }
.dm-ig .dm-ph { color: #737373; }
.dm-ig__cam { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(140deg, #8a3ffc, #3797f0); display: grid; place-items: center; flex: none; }
.dm-ig__tools { display: flex; gap: 12px; align-items: center; padding-right: 8px; }
.dm-ig__send { color: #0095f6; font-weight: 600; font-size: 15.5px; padding-right: 10px; }

/* Messenger (iOS, light) */
.dm-ms .dm-hd { border-bottom: .5px solid rgba(0, 0, 0, .1); }
.dm-ms .dm-nm small, .dm-ms .dm-prof, .dm-ms .dm-ph { color: #65676b; }
.dm-ms .dm-prof b { color: #050505; }
.dm-ms .dm-prof__btn { background: #e4e6eb; color: #050505; }
.dm-ms__avw { position: relative; }
.dm-ms__avw::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #31a24c; border: 2px solid #fff; }
.dm-ms .dm-bub { border-radius: 19px; }
.dm-ms .dm-row--them .dm-bub { background: #f0f0f0; }
.dm-ms .dm-row--me .dm-bub { background: #0a7cff; color: #fff; }
.dm-ms__tools { display: flex; gap: 12px; }
.dm-ms .dm-field { height: 38px; border-radius: 19px; background: #f0f0f0; padding: 0 12px; }

/* Facebook post + comments (iOS, light) */
.dm-fb .dm-hd { border-bottom: .5px solid #ced0d4; gap: 14px; }
.dm-fb__title { font-size: 17px; font-weight: 600; flex: 1; }
.dm-fb__scroll { flex: 1; overflow: hidden; scroll-behavior: smooth; }
.dm-fb__post { padding-top: 10px; }
.dm-fb__by { display: flex; gap: 9px; align-items: center; padding: 0 14px; }
.dm-fb__by b { font-size: 15px; font-weight: 600; display: block; }
.dm-fb__by small { font-size: 12.5px; color: #65676b; display: flex; gap: 4px; align-items: center; }
.dm-fb__txt { padding: 9px 14px 10px; font-size: 15px; line-height: 1.35; color: #050505; margin: 0; }
.dm-fb__img { width: 100%; height: 250px; object-fit: cover; display: block; }
.dm-fb__meta { display: flex; justify-content: space-between; padding: 9px 14px; font-size: 13.5px; color: #65676b; border-bottom: .5px solid #ced0d4; }
.dm-fb__acts { display: flex; justify-content: space-around; padding: 9px 0; font-size: 14px; font-weight: 600; color: #65676b; border-bottom: .5px solid #ced0d4; }
.dm-fb__cmts { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 12px; }
.dm-fb__cm { display: flex; gap: 8px; animation: dm-pop .32s cubic-bezier(.16, 1, .3, 1) both; }
.dm-fb__cm--reply { margin-left: 44px; }
.dm-fb__cb { background: #f0f2f5; border-radius: 18px; padding: 8px 12px; font-size: 15px; line-height: 1.3; color: #050505; }
.dm-fb__cb b { font-size: 13.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.dm-fb__badge { font-size: 11px; font-weight: 600; color: #0866ff; background: #e7f0ff; padding: 1px 6px; border-radius: 5px; }
.dm-fb__cl { font-size: 12.5px; color: #65676b; font-weight: 600; display: flex; gap: 14px; margin: 4px 0 0 12px; }
.dm-fb .dm-composer { border-top: .5px solid #ced0d4; padding-top: 9px; }
.dm-fb .dm-field { height: 38px; border-radius: 19px; background: #f0f2f5; padding: 0 14px; font-size: 15.5px; }
.dm-fb .dm-ph { color: #65676b; }
.dm-ph.is-typed { color: #050505; }

/* Instagram post + comments (iOS, light) */
.dm-igp .dm-hd { border-bottom: .5px solid #dbdbdb; }
.dm-igp__title { text-align: center; }
.dm-igp__title small { color: #737373; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.dm-igp__title b { font-size: 16.5px; }
.dm-igp__sp { width: 26px; flex: none; }
.dm-igp__by { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; }
.dm-igp__by b { flex: 1; font-weight: 600; }
.dm-igp__img { width: 100%; height: 330px; object-fit: cover; display: block; }
.dm-igp__acts { display: flex; gap: 16px; align-items: center; padding: 10px 12px 6px; }
.dm-igp__acts i { flex: 1; }
.dm-igp__likes, .dm-igp__cap, .dm-igp__all { margin: 0; padding: 0 12px; font-size: 14px; line-height: 1.35; color: #000; }
.dm-igp__likes { font-weight: 600; }
.dm-igp__cap { margin-top: 4px; }
.dm-igp__cap b, .dm-igp__cb b { font-weight: 600; }
.dm-igp__all { color: #737373; margin-top: 5px; }
.dm-igp__cmts { padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 14px; }
.dm-igp__cm { align-items: flex-start; }
.dm-igp__cm > .dm-ic { margin-top: 6px; }
.dm-igp__cb { flex: 1; min-width: 0; }
.dm-igp__cb p { margin: 0; font-size: 14px; line-height: 1.35; color: #000; overflow-wrap: anywhere; }
.dm-igp__cl { font-size: 12px; color: #737373; font-weight: 600; display: flex; gap: 14px; margin-top: 4px; }
.dm-igp .dm-composer { border-top: .5px solid #dbdbdb; padding-top: 9px; }
.dm-igp .dm-field { height: 40px; border-radius: 20px; border: .5px solid #dbdbdb; padding: 0 6px 0 14px; font-size: 15px; }
.dm-igp .dm-ph { color: #737373; }

/* iOS notification banner + thread note */
.dm-banner { position: absolute; left: 9px; right: 9px; top: 54px; z-index: 70; display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 22px;
  background: rgba(245, 245, 247, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transform: translateY(-140%); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.dm-banner.is-in { transform: none; }
.dm-banner img { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 4px; flex: none; }
.dm-banner div { flex: 1; min-width: 0; }
.dm-banner p { margin: 0; font-size: 14.5px; line-height: 1.3; color: #111; }
.dm-banner p:first-child { display: flex; justify-content: space-between; font-size: 13px; color: #6b6b70; }
.dm-banner b { font-weight: 600; color: #111; }
.dm-note { align-self: center; font-size: 12px; color: #65676b; margin: 6px 0 8px; text-align: center; }

/* ── hero: phone + channel rail ─────────────────────────────────────── */
.ch-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.ch-phone { display: flex; justify-content: center; width: 100%; }
.ch-rail { display: flex; gap: 8px; width: 100%; max-width: 360px; margin-top: 16px; padding: 0; list-style: none; }
.ch-rail li { flex: 1; }
.ch-rail button { width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; color: rgba(245, 241, 234, .72); font: 600 13px/1 var(--sans); transition: color .3s; }
.ch-rail button::before { content: ""; display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(245, 241, 234, .16); }
.ch-rail button.is-done::before, .ch-rail button.is-on::before { background: var(--paper); }
.ch-rail button.is-on { color: var(--paper); }
.ch-rail button:focus-visible { outline: 2px solid var(--gold-warm); outline-offset: 4px; border-radius: 6px; }
.ch-rail span { display: inline-flex; gap: 7px; align-items: center; }
/* Meta's minimum is 16px; keep the glyphs whole and unaltered. */
.ch-rail img { width: 18px; height: 18px; opacity: .8; transition: opacity .3s; }
.ch-rail button.is-on img { opacity: 1; }

/* ── how it works ──────────────────────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
/* minmax(0) + min-width: 0 break the loop where the phone sizes the column and
   the column sizes the phone (it pushed the copy 7px past the screen). */
.how__stage, .ch-stage, .how__phone, .ch-phone { min-width: 0; }
.how__stage { display: flex; flex-direction: column; align-items: center; }
.how__phone { display: flex; justify-content: center; width: 100%; }
.how__steps { list-style: none; margin: 0; padding: 0; display: none; }
.how__steps li { display: flex; gap: 14px; opacity: .8; transition: opacity .4s; }
.how__steps li.is-on { opacity: 1; }
.how__n, .how__cap-n { font-family: var(--serif); font-size: 38px; line-height: .9; color: var(--gold-warm); min-width: 26px; }
.how__steps b { display: block; font-size: 16px; font-weight: 600; color: var(--paper); }
.how__steps span span { font-size: 14px; color: var(--paper-dim); line-height: 1.45; }
.how__cap { width: 100%; max-width: 380px; min-height: 64px; margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; }
.how__cap-t { font-size: 15px; line-height: 1.4; color: var(--paper); }
.how__cap-t small { display: block; color: var(--paper-dim); font-size: 13px; margin-top: 2px; }

/* which network the comment demo is playing */
.how__via { display: flex; gap: 8px; justify-content: center; margin: 0 0 14px; padding: 0; list-style: none; }
.how__via li { display: inline-flex; gap: 7px; align-items: center; padding: 6px 12px; border-radius: 999px; font: 600 13px/1 var(--sans);
  color: rgba(245, 241, 234, .6); border: 1px solid rgba(245, 241, 234, .14); transition: color .3s, border-color .3s, background .3s; }
.how__via li.is-on { color: var(--paper); border-color: rgba(245, 241, 234, .4); background: rgba(245, 241, 234, .06); }
.how__via img { width: 16px; height: 16px; opacity: .75; }
.how__via li.is-on img { opacity: 1; }

/* ── mobile CTA bar ────────────────────────────────────────────────── */
.cta-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  padding: 8px 8px 8px 18px; border-radius: 999px; background: rgba(29, 18, 38, .94); border: 1px solid var(--gold-line);
  box-shadow: var(--sc-edge), 0 18px 40px var(--sc-shadow-ink); font-size: 13.5px; color: var(--paper-dim);
  transform: translateY(140%); transition: transform .45s var(--ease); }
.cta-bar.is-visible { transform: none; }
/* On phones the bar is the call to action; the round WhatsApp button would sit on it. */
@media (max-width: 880px) { .wa-float { display: none; } }
.cta-bar .btn { padding: 11px 18px; font-size: 14px; }

@media (min-width: 881px) {
  .ch-rail { max-width: 380px; }
  .how-grid { grid-template-columns: 1fr .95fr 1fr; align-items: center; gap: 48px; }
  .how__steps { display: flex; flex-direction: column; gap: 18px; }
  .how__cap { display: none; }
  .cta-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-row, .dm-fb__cm, .dm-dots i, .dm-caret { animation: none; }
  .dm-app, .cta-bar, .ch-rail button, .how__steps li, .how__via li { transition: none; }
  .dm-fb__scroll { scroll-behavior: auto; }
  .dm-banner { transition: none; }
}

/* ── hero layout: headline, live demo, then copy (phone order) ────────── */
.hero--channels .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-areas: "head stage" "rest stage"; row-gap: 0; align-items: end; }
.hero--channels .hero__head { grid-area: head; }
.hero--channels .ch-stage { grid-area: stage; align-self: center; }
.hero--channels .hero__rest { grid-area: rest; align-self: start; }
.hero--channels .display { margin-bottom: 22px; }
.hero--channels .phone-halo { z-index: -1; }
@media (max-width: 880px) {
  .hero--channels { padding-top: 92px; }
  .hero--channels .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "rest"; row-gap: 22px; }
  .hero--channels .hero__brand { display: none; }
  .hero--channels .display { margin-bottom: 0; }
  .hero--channels .hero__meta { margin-top: 28px; }
}
