/* The phone in the hero of English pages. Plan and accuracy rules: tasks/todo-hero-phones-2026-10-31.md.
   Mobile first. Upright so text stays sharp. Flat: no shadow, no gradient. The rim lifts it off a black hero. */
html body .cfph {
  --cfph-blue: #3797f0;
  --cfph-bub: #efefef;
  --cfph-t2: #5c5c5c;
  --cfph-hair: #e6e6e6;
  --cfph-rim: #55555a;
  position: relative;
  display: block;
  width: min(320px, 100%);
  margin: 0 auto;
  container: cfph / inline-size;
  color: #0a0a0a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -.005em;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
html body .cfph *, html body .cfph *::before, html body .cfph *::after { box-sizing: border-box; }
html body .cfph img { display: block; max-width: none; margin: 0; }
html body .cfph svg { display: block; flex: none; }

html body .cfph-dev { position: relative; padding: 9px; border: 2px solid var(--cfph-rim); border-radius: 54px; background: #000; }
html body .cfph-dev__btn { position: absolute; width: 3px; border-radius: 2px; background: var(--cfph-rim); }
html body .cfph-dev__btn--a { left: -5px; top: 112px; height: 26px; }
html body .cfph-dev__btn--b { left: -5px; top: 160px; height: 50px; }
html body .cfph-dev__btn--c { left: -5px; top: 220px; height: 50px; }
html body .cfph-dev__btn--d { right: -5px; top: 176px; height: 78px; }
html body .cfph-scr { position: relative; display: flex; flex-direction: column; min-height: 580px; border-radius: 43px; background: #fff; overflow: hidden; }
html body .cfph-isl { position: absolute; z-index: 3; top: 10px; left: 50%; width: 88px; height: 25px; margin-left: -44px; border-radius: 14px; background: #000; }
html body .cfph-st { display: flex; flex: none; align-items: center; justify-content: space-between; height: 46px; padding: 8px 24px 0 28px; font-size: 15px; font-weight: 600; letter-spacing: 0; }
html body .cfph-st__sys { display: inline-flex; align-items: center; gap: 5px; }

html body .cfph-head { display: flex; flex: none; align-items: center; gap: 9px; height: 52px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--cfph-hair); }
html body .cfph-head__av { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
html body .cfph-head__who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.2; }
html body .cfph-head__who b { overflow: hidden; font-size: 14.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
html body .cfph-head__who span { font-size: 11.5px; color: var(--cfph-t2); }
html body .cfph-head__acts { display: inline-flex; flex: none; gap: 14px; }

html body .cfph-thread { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 12px 12px 8px; }
html body .cfph-intro { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 auto; padding-bottom: 12px; font-size: 14px; }
html body .cfph-intro img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
html body .cfph-intro b { font-weight: 600; }
html body .cfph-intro span { margin-top: 6px; padding: 5px 12px; border-radius: 8px; background: var(--cfph-bub); font-size: 13px; font-weight: 600; }
html body .cfph-stamp { align-self: center; margin-bottom: 8px; font-size: 11.5px; font-weight: 500; color: var(--cfph-t2); }
html body .cfph-line { display: flex; align-items: flex-end; gap: 7px; margin-bottom: 5px; }
html body .cfph-line__av { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

html body .cfph-b { max-width: 80%; padding: 8px 12px; border-radius: 20px; overflow-wrap: anywhere; text-wrap: pretty; white-space: pre-line; }
html body .cfph-note { align-self: center; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: #d1fe17; color: #000; font-size: 12px; font-weight: 600; }
html body .cfph-b--in { background: var(--cfph-bub); color: #000; border-bottom-left-radius: 5px; }
html body .cfph-b--out { align-self: flex-end; background: var(--cfph-blue); color: #fff; border-bottom-right-radius: 5px; }
html body .cfph-kw { display: inline-block; padding: 0 5px; border-radius: 5px; background: #d1fe17; color: #000; font-weight: 600; }

html body .cfph-ctx { display: flex; align-items: center; gap: 9px; max-width: 88%; padding: 7px 12px 7px 7px; border-radius: 18px; border-bottom-left-radius: 5px; background: var(--cfph-bub); }
html body .cfph-ctx__th { flex: none; width: 40px; height: 54px; border-radius: 9px; object-fit: cover; }
html body .cfph-ctx__txt { display: block; min-width: 0; font-size: 14px; line-height: 1.3; }
html body .cfph-ctx__lbl { display: block; font-size: 12px; color: var(--cfph-t2); }

html body .cfph-dm { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin-bottom: 5px; }
html body .cfph-card { width: 80%; overflow: hidden; border: 1px solid var(--cfph-hair); border-radius: 16px; border-top-right-radius: 5px; background: #fff; }
html body .cfph-card__img { width: 100%; height: 132px; object-fit: cover; object-position: center 35%; }
/* A step before the DM makes the thread longer, so the picture gives way and the phone keeps its shape. */
html body .cfph--gate .cfph-card__img { height: 92px !important; }
html body .cfph-card__btn { display: block; padding: 9px 8px; border-top: 1px solid var(--cfph-hair); font-size: 13.5px; font-weight: 600; color: var(--cfph-blue); text-align: center; }
html body .cfph-card__btn:first-child { border-top: 0; }
html body .cfph-sent { align-self: flex-end; margin: -2px 2px 7px; font-size: 12px; color: var(--cfph-t2); }
html body .cfph-sent b { font-weight: 600; color: #0a0a0a; }

html body .cfph-input { display: flex; flex: none; align-items: center; gap: 8px; height: 42px; margin: 2px 10px 22px; padding: 0 11px 0 5px; border-radius: 21px; background: var(--cfph-bub); color: #000; }
html body .cfph-input__cam { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cfph-blue); color: #fff; }
html body .cfph-input__ph { flex: 1; min-width: 0; font-size: 14px; color: var(--cfph-t2); }
html body .cfph-home { position: absolute; z-index: 3; left: 50%; bottom: 7px; width: 112px; height: 4px; margin-left: -56px; border-radius: 3px; background: #000; }

/* The hero column around the phone: full width on a phone, no glow, no tilt. */
html body:not(#_) .cf-solution-hero__visual:has(> .cfph) { width: 100% !important; max-width: 340px !important; transform: none !important; }
html body:not(#_) .cf-solution-hero__visual:has(> .cfph)::before,
html body:not(#_) .cf-solution-hero__visual:has(> .cfph)::after { content: none !important; display: none !important; }

html body:not(#_) .example-detail__mockup:has(> .cfph) { width: 100% !important; max-width: none !important; }

@media (max-width: 767px) {
  /* The examples hero pads its column by 24px. The phone uses part of that, so it matches the other pages. */
  html body:not(#_) .example-detail__mockup:has(> .cfph) { width: calc(100% + 30px) !important; margin-inline: -15px !important; }
}

/* Homepage: its stage was a fixed height that cut the old phone. Show the whole phone and drop the glow under it. */
html body:not(#_) .cf-home-hero__visual:has(> .cfph) { height: auto !important; padding: 0 !important; perspective: none !important; }
html body:not(#_) .cf-home-hero__visual:has(> .cfph)::before,
html body:not(#_) .cf-home-hero__visual:has(> .cfph)::after { content: none !important; display: none !important; }
html body:not(#_) .cf-home-hero:has(.cfph) { padding-bottom: clamp(28px, 4vw, 56px) !important; }
html body .cf-home-hero__visual > .cfph { flex: none; }

/* /for and /industries: the old phone was cut off by the hero. Show the whole phone, next to the reel on desktop. */
html body.fp-body .fp-stage > .cfph { flex: none; }
html body:not(#_) .ix-hero__phone:has(> .cfph) { width: min(340px, 100%) !important; height: auto !important; overflow: visible !important; }
html body.fp-body .fp-stage:has(> .cfph) { padding-bottom: 28px; }
html body:not(#_) .ix-hero__phone:has(> .cfph) { margin-bottom: 8px; }

/* Kit pages: the stage is a row of comment card and phone. */
html body#cf-home .a-hero__stage > .cfph { flex: none; margin: 0; }
@media (min-width: 1024px) {
  html body#cf-home .k-hero .a-hero__stage:has(> .cfph) { display: flex !important; align-items: center; justify-content: center; gap: 32px; }
  html body#cf-home .k-hero .a-hero__stage:has(> .cfph) > .k-hc { position: static !important; flex: none; margin: 0 !important; transform: none !important; }
}

/* On a very narrow phone the status bar and message bar lose one icon, so nothing touches. */
@container cfph (max-width: 300px) {
  html body .cfph-st__sys svg:first-child, html body .cfph-input > svg:last-child { display: none; }
}
@media (min-width: 1024px) {
  html body .cfph { width: min(340px, 100%); }
  html body .cfph-card__img { height: 142px; }
}
