/* The thread header: the one owner of the iOS 26 Messages header drawn above every demo thread. The contact's photo, its name in a glass
   capsule that overlaps the photo's bottom, and a FaceTime glass circle at the right. Every measure is the iOS 26 value in pt times
   --th-u, so a host sets only its size and its ink:
     --th-u    the length of one header point (the hero card: .656 of its pt; the use-case scenes: .74px; the phone: .205cqw)
     --th-ink  the name and FaceTime colour
     --th-bg   the screen colour, for the ring round overlapping group circles; --th-meta  the group sub line colour
   Markup: .th-head > .th-ph + .th-name.th-glass + .th-ft.th-glass. The photo is an <img> inside .th-ph; a contact with no photo takes
   .th-ph--initials and shows its initials on the iOS grey contact gradient. .th-ph--crop zooms an app icon whose corner marks would
   otherwise show (the hero's Calorie App pear).
   The header owns the clearance below it: it overlaps the thread by 10 u and leaves 22 u of air under the name capsule before the first
   bubble or timestamp, so a thread under it starts `padding-top: calc(32 * var(--th-u))` (the hosts below do). A thread that overflows
   slides its oldest bubbles up under the header, never against the capsule.
   Used by the homepage hero card (css/hero-sim.css), the use-case scenes (css/use-case-scenes.css) and the shared phone
   (css/phone-frame.css). On touch the glass is an opaque fill: live blur blanked areas during fast scrolls in Safari on iOS. */

.th-head {
  --th-glass: rgba(255,255,255,.62); --th-glass-edge: rgba(0,0,0,.13); --th-glass-hi: rgba(255,255,255,.95); --th-glass-shadow: 0 4px 16px rgba(0,0,0,.08); --th-chev: #a3a3a8;
  --th-glass-solid: rgba(255,255,255,.88);
  position: relative; display: grid; justify-items: center; padding-top: calc(14 * var(--th-u)); margin-bottom: calc(-10 * var(--th-u));
}
[data-theme="dark"] .th-head {
  --th-glass: rgba(44,44,46,.58); --th-glass-edge: rgba(255,255,255,.16); --th-glass-hi: rgba(255,255,255,.08); --th-glass-shadow: 0 4px 16px rgba(0,0,0,.4); --th-chev: #8e8e93;
  --th-glass-solid: rgba(44,44,46,.9);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .th-head {
    --th-glass: rgba(44,44,46,.58); --th-glass-edge: rgba(255,255,255,.16); --th-glass-hi: rgba(255,255,255,.08); --th-glass-shadow: 0 4px 16px rgba(0,0,0,.4); --th-chev: #8e8e93;
    --th-glass-solid: rgba(44,44,46,.9);
  }
}

.th-ph { display: grid; place-items: center; width: calc(57 * var(--th-u)); height: calc(57 * var(--th-u)); border-radius: 50%; overflow: hidden; }
.th-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th-ph--crop { background: #000; }
.th-ph--crop img { scale: 1.2; clip-path: circle(41.667%); }   /* the pear fills the circle; the icon's corner marks fall outside it */
.th-ph--initials {
  background: linear-gradient(180deg, #9ca0aa, #7c808b); color: #fff; font-size: calc(24 * var(--th-u)); font-weight: 600; letter-spacing: .01em; line-height: 1;
}

.th-ph--person { background: linear-gradient(180deg, #9ca0aa, #7c808b); color: #fff; align-items: end; }   /* a number with no contact card: the iOS silhouette */
.th-ph--person svg { width: 78%; height: 78%; display: block; }
.th-ph--group { width: auto; height: auto; overflow: visible; border-radius: 0; display: flex; justify-content: center; }   /* a group: up to three overlapping contact circles */
.th-av {
  display: grid; place-items: center; width: calc(48 * var(--th-u)); height: calc(48 * var(--th-u)); border-radius: 50%; color: #fff; font-size: calc(20 * var(--th-u)); font-weight: 600; line-height: 1;
  box-shadow: 0 0 0 calc(2.4 * var(--th-u)) var(--th-bg, #fff); background: linear-gradient(180deg, #9ca0aa, #7c808b);
}
.th-av + .th-av { margin-left: calc(-10 * var(--th-u)); }
.th-av:nth-child(2) { background: linear-gradient(180deg, #ffb35c, #f0861f); }
.th-av:nth-child(3) { background: linear-gradient(180deg, #6fdc8c, #34b856); }
.th-sub { margin-top: calc(4 * var(--th-u)); font-size: calc(12 * var(--th-u)); line-height: calc(14 * var(--th-u)); color: var(--th-meta, currentColor); text-align: center; }
.th-head--group { padding-bottom: calc(14 * var(--th-u)); }   /* its sub line under the capsule; a thread under it adds the same to its clearance */

.th-glass {
  background: var(--th-glass); -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 0 0 .6px var(--th-glass-hi), 0 0 0 .5px var(--th-glass-edge), var(--th-glass-shadow);
}
.th-name {
  margin-top: calc(-5 * var(--th-u)); display: inline-flex; align-items: center; gap: calc(5 * var(--th-u));
  padding: calc(8 * var(--th-u)) calc(13 * var(--th-u)) calc(8 * var(--th-u)) calc(16 * var(--th-u)); border-radius: calc(15 * var(--th-u));
  font-size: calc(17 * var(--th-u)); font-weight: 700; letter-spacing: -.02em; line-height: calc(20 * var(--th-u)); color: var(--th-ink); font-variation-settings: "opsz" 17;
}
.th-name svg { width: calc(7 * var(--th-u)); height: calc(12 * var(--th-u)); color: var(--th-chev); }
.th-ft {
  position: absolute; top: calc(14 * var(--th-u)); right: calc(16 * var(--th-u)); width: calc(44 * var(--th-u)); height: calc(44 * var(--th-u));
  border-radius: 50%; display: grid; place-items: center; color: var(--th-ink);
}
.th-ft svg { width: calc(27 * var(--th-u)); height: calc(18 * var(--th-u)); }
@media (hover: none), (pointer: coarse) {
  .th-glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--th-glass-solid); }
}
