/* Human Converter: the parts of the result that sit in the hero's AI card
   (result.js): the intro call, the share buttons, Rename and the hire / plan
   forms; also the salary calculator (salary.js), kept for later. The card's
   own layout is in landing.css.
   Ported from Result.dc.html, MobileResult.dc.html and Hire.dc.html.
   Tokens and shared components come from base.css. */

/* ---------- The call frame ---------- */

.cf {
  /* Set by call-frame.js every frame while the voice plays: loudness (0..1),
     the speaking ring (0..1) and the name tag's three bars. */
  --cf-level: 0;
  --cf-talk: 0;
  --cf-b1: 0;
  --cf-b2: 0;
  --cf-b3: 0;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
}
.cf-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cf-dot { background: var(--ink-border); transition: background-color .3s ease; }
.cf[data-phase="playing"] .cf-dot,
.cf[data-phase="paused"] .cf-dot,
.cf[data-phase="ended"] .cf-dot,
.cf[data-phase="ready"] .cf-dot { background: var(--orange); }
.cf-live {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-ink);
}
.cf-title {
  font-size: 14px;
  color: var(--on-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.cf-timer {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-ink-muted);
  font-variant-numeric: tabular-nums;
}
.cf[data-phase="joining"] .cf-timer { visibility: hidden; }

/* The stage is a size container, so the portrait and everything around it
   scale with the tile. --cf-face: the portrait's diameter, about half the
   tile's height, never so big that the line under it meets the name tag.
   call-frame.js measures the name tag (it wraps on narrow tiles) and sets
   --cf-tag-room to fit it. */
.cf-stage {
  --cf-tag-room: 96px;   /* the strip the name tag sits in */
  --cf-slot-room: 128px; /* the line (or button) under the portrait, and the same space above */
  --cf-slot-gap: 18px;
  --cf-lift: 0px;        /* narrow tiles: lift the portrait so the line under it fits */
  position: relative;
  aspect-ratio: 16 / 10;
  background: #17181B;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  container-type: size;
}
.cf-face,
.cf-play-anchor { --cf-face: 220px; }
@supports (width: 1cqh) {
  .cf-face,
  .cf-play-anchor { --cf-face: min(52cqh, 46cqw, calc(100cqh - var(--cf-tag-room) - var(--cf-slot-room) + var(--cf-lift))); }
}

.cf-media { position: absolute; inset: 0; }

/* ---------- The call tile: a participant with the camera off ---------- */

.cf-tile {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #2C2F35 0%, #17181B 72%);
}
.cf[data-look="video"] .cf-tile { display: none; }

/* The face's own photo, heavily blurred and darkened, so it reads as the room
   the person is in rather than a second picture. Oversized so the blur never
   shows a pale edge. */
.cf-backdrop {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  filter: blur(34px) saturate(1.25) brightness(.62);
  opacity: 0;
  transition: opacity .8s ease;
}
@supports (width: 1cqw) {
  .cf-backdrop { filter: blur(5cqw) saturate(1.25) brightness(.62); }
}
.cf-backdrop.is-loaded { opacity: 1; }

.cf-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 85% at 50% 42%, rgba(18, 19, 21, 0) 0%, rgba(18, 19, 21, .12) 65%, rgba(18, 19, 21, .45) 100%),
    linear-gradient(180deg, rgba(18, 19, 21, .12) 0%, rgba(18, 19, 21, 0) 26%, rgba(18, 19, 21, 0) 66%, rgba(18, 19, 21, .42) 100%);
}

/* The area above the name tag; the portrait sits in its middle. */
.cf-center {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--cf-tag-room);
  padding-bottom: var(--cf-lift);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-face {
  position: relative;
  flex: none;
  width: var(--cf-face);
  height: var(--cf-face);
}

.cf-disc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #3A3D43;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .26), 0 0 0 1px rgba(236, 237, 234, .14);
}
.cf-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.cf-portrait.is-loaded { opacity: 1; }
/* Only if the photo can't load: the first letter of the name, as calls show. */
.cf-initial { display: none; }
.cf-face.is-initial .cf-initial {
  display: block;
  font-stretch: 125%;
  font-weight: 800;
  font-size: calc(var(--cf-face) * .38);
  line-height: 1;
  color: var(--on-ink-2);
}

/* The speaking indicator: a soft orange glow that swells with the voice and a
   crisp ring that shows while it is speaking (calm on purpose: no flicker,
   nothing spins). Only opacity and transform change, so it stays smooth. */
.cf-glow {
  position: absolute;
  inset: -28%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 110, 50, .62) 60%, rgba(255, 110, 50, .2) 78%, rgba(255, 110, 50, 0) 100%);
  mix-blend-mode: screen; /* adds light to the room behind, never darkens it */
  opacity: calc(var(--cf-level) * .85);
  transform: scale(calc(.9 + var(--cf-level) * .16));
  pointer-events: none;
  will-change: transform, opacity;
}
.cf-ring {
  position: absolute;
  inset: -10px;
  border: 3px solid var(--orange);
  border-radius: 50%;
  opacity: var(--cf-talk);
  transform: scale(calc(1 + var(--cf-level) * .035));
  pointer-events: none;
  will-change: transform, opacity;
}

/* The line under the portrait: "BobAI is joining the call" or the no-audio note. */
.cf-face-slot {
  position: absolute;
  top: calc(100% + var(--cf-slot-gap));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 92cqw;
  text-align: center;
}
.cf-joining {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-ink);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
}
.cf-joining-dots { display: inline-flex; gap: 4px; }
.cf-joining-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--on-ink);
  opacity: .45;
}
.cf-note {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(18, 19, 21, .66);
  border: 1px solid rgba(236, 237, 234, .12);
  font-size: 14px;
  color: var(--on-ink);
}

/* ---------- Video mode (a talking-head video, when INTRO_MODE=video) ---------- */

/* Part two is framed as a second camera: a quick cut (no transition) to a
   tighter, slightly off-centre shot. scale(1.25) about 80% 20% puts the centre
   of the new frame at 56% across and 44% down, the same centre as the
   server's ffmpeg crop of part two's video (server/config/intro.json
   part2Crop). Only the media layer moves; the name tag and buttons stay. */
.cf[data-look="video"] .cf-stage.is-cam2 .cf-media {
  transform: scale(1.25);
  transform-origin: 80% 20%;
}

/* Part one's last frame, held while part two loads (or for all of part two
   when there is no part two video). Sits over the video, framed the same way. */
.cf-freeze,
.cf-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 30%;
  background: var(--ink-3);
}

/* ---------- Name tag: "BobAI, AI Marketing Coordinator / CONVERTED FROM A HUMAN ROLE" ---------- */

.cf-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  max-width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid rgba(236, 237, 234, .1);
  border-radius: 12px;
  background: rgba(18, 19, 21, .76);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.cf-tag-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cf-tag-name { min-width: 0; font-size: 16px; font-weight: 600; color: var(--on-ink); line-height: 1.3; }
.cf-tag-from {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-light);
}

/* Three small bars that move with the voice, as call apps show beside the
   person speaking. */
.cf-bars {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
  opacity: var(--cf-talk);
}
.cf-bars span {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--orange-light);
  transform: scaleY(calc(.22 + var(--cf-b1) * .78));
}
.cf-bars span:nth-child(2) { transform: scaleY(calc(.22 + var(--cf-b2) * .78)); }
.cf-bars span:nth-child(3) { transform: scaleY(calc(.22 + var(--cf-b3) * .78)); }
.cf[data-look="video"] .cf-bars,
.cf[data-mode="captions"] .cf-bars { display: none; }

/* ---------- "Start the call" / "Replay" ---------- */

/* The whole tile is the button; what shows is a pill under the portrait, in
   the same place as the "joining" line, so the face stays in view. */
.cf-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 0 calc(var(--cf-tag-room) + var(--cf-lift));
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--on-ink);
  font-family: inherit;
  cursor: pointer;
}
.cf-play-anchor {
  position: relative;
  flex: none;
  width: var(--cf-face);
  height: var(--cf-face);
}
.cf-play-pill {
  position: absolute;
  top: calc(100% + var(--cf-slot-gap) - 6px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 20px 6px 6px;
  border: 1px solid rgba(236, 237, 234, .16);
  border-radius: 999px;
  background: rgba(18, 19, 21, .74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.cf-play-circle {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  transition: background-color .15s ease, transform .15s ease;
}
.cf-play-circle svg { width: 18px; height: 18px; }
.cf-play-label { font-size: 15px; font-weight: 700; }
.cf-play:hover .cf-play-pill { background: rgba(18, 19, 21, .9); border-color: rgba(236, 237, 234, .3); }
.cf-play:hover .cf-play-circle { background: #ff6d33; transform: scale(1.04); }
.cf-play:focus-visible { box-shadow: none; }
.cf-play:focus-visible .cf-play-pill { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--on-ink); }

/* Video mode keeps the big round button in the middle of the picture. */
.cf[data-look="video"] .cf-play { padding: 0; background: rgba(18, 19, 21, .3); }
.cf[data-look="video"] .cf-play-anchor { width: auto; height: auto; }
.cf[data-look="video"] .cf-play-pill {
  position: static;
  transform: none;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.cf[data-look="video"] .cf-play-circle { width: 88px; height: 88px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.cf[data-look="video"] .cf-play-circle svg { width: 38px; height: 38px; }
.cf[data-look="video"] .cf-play-label { padding: 6px 14px; border-radius: 999px; background: rgba(18, 19, 21, .85); }
.cf[data-look="video"] .cf-play:hover .cf-play-pill { background: none; }
.cf[data-look="video"] .cf-play:focus-visible { box-shadow: inset 0 0 0 3px var(--orange); border-radius: 16px; }
.cf[data-look="video"] .cf-play:focus-visible .cf-play-pill { box-shadow: none; }
.cf[data-look="video"] .cf-play:focus-visible .cf-play-circle { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--on-ink); }

/* Pause / resume */
.cf-pause {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(236, 237, 234, .22);
  border-radius: 50%;
  background: rgba(18, 19, 21, .6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--on-ink);
  cursor: pointer;
}
.cf-pause svg { width: 18px; height: 18px; }
.cf-pause:hover { background: var(--ink); border-color: var(--on-ink-2); }
.cf-pause:focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--on-ink); border-radius: 50%; }

/* Captions */
.cf-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(2.9em + 28px);
  margin: 0;
  padding: 14px 18px;
  background: #000000;
  border-radius: 12px;
  color: #FFFFFF;
  font-size: 18px;
  line-height: 1.45;
  text-align: center;
}
.cf-caption.is-idle { color: var(--on-ink-muted); font-size: 15px; }

/* ---------- Share buttons ---------- */

.share { display: flex; flex-direction: column; gap: 8px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-pair { display: flex; gap: 10px; }
.share-btn { gap: 8px; }
.share-btn svg { width: 18px; height: 18px; }
.share-copy.is-copied { border-color: var(--orange-dark); color: var(--orange-dark); }
.share-status { font-size: 14px; color: var(--text-3); }
.share-status:empty { display: none; }

/* The face's real photo, small and round, beside the name and role. */

/* "Rename your AI employee": a visible outlined button under the role line. */
.result-rename-area { margin-top: 10px; }
.result-rename {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.result-rename svg { flex: none; width: 16px; height: 16px; }
.result-rename:hover { background: var(--ink); color: var(--on-ink); }
.result-rename[hidden] { display: none; }

.result-rename-form { display: flex; flex-direction: column; gap: 8px; margin: 0 0 6px; }
.result-rename-form[hidden] { display: none; }
.result-rename-note { margin: 0; font-size: 14px; color: var(--text-2); }
.result-rename-label { font-size: 14px; font-weight: 600; }
.result-rename-row { display: flex; flex-wrap: wrap; gap: 8px; }
.result-rename-input { flex: 1 1 180px; width: auto; min-width: 0; }
.result-rename-save, .result-rename-cancel { min-height: 48px; }

/* ---------- The salary calculator (salary.js) ---------- */

.sal { display: flex; flex-direction: column; gap: 22px; }
.sal-fields { display: flex; flex-wrap: wrap; gap: 14px; }
.sal-field-currency { flex: 0 1 140px; }
.sal-field-salary { flex: 1 1 220px; }
.sal .field label { font-size: 14px; }
.sal-input { font-variant-numeric: tabular-nums; }
.sal-hint { margin: 0; }
.sal-error { margin: 0; }

.sal-outputs { display: flex; flex-wrap: wrap; gap: 20px; }
.sal-out {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sal-out--converted { border-top: 3px solid var(--orange); }
.sal-out-label, .sal-out-unit { font-size: 15px; color: var(--text-3); }
.sal-out-unit { line-height: 1.35; } /* the human side's unit runs to two or three lines on phones */
.sal-out-value {
  font-stretch: 125%;
  font-weight: 800;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.sal-out--converted .sal-out-value { color: var(--orange-dark); }

/* "The AI version starts at $1,000 a month." */
.sal-limit { margin: -8px 0 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.sal-limit[hidden] { display: none; }

/* "Average US base salary for a marketing coordinator, Indeed, October 2026" */
.sal-source { margin: -8px 0 0; font-size: 13px; color: var(--muted); }
.sal-source[hidden] { display: none; }
.sal-source a { color: inherit; text-underline-offset: 3px; }
.sal-source a:hover { color: var(--orange-dark); }

/* Ink theme (the result's dark card) */
.sal--ink .field label { color: var(--on-ink-2); font-weight: 500; }
.sal--ink .sal-out { border-top-color: var(--ink-line); }
.sal--ink .sal-out--converted { border-top-color: var(--orange); }
.sal--ink .sal-out-label, .sal--ink .sal-out-unit { color: var(--on-ink-2); }
.sal--ink .sal-out-value { color: var(--on-ink); }
.sal--ink .sal-out--converted .sal-out-value { color: var(--orange-light); }
.sal--ink .sal-limit { color: var(--on-ink); }
.sal--ink .sal-source { color: var(--on-ink-muted); }
.sal--ink .sal-source a:hover { color: var(--orange-light); }
.sal--ink .field-error { color: var(--orange-light); }
.sal--ink .input[aria-invalid="true"] { border-color: var(--orange-light); }
.sal--ink .input:focus-visible, .sal--ink .select:focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--orange-light); }

/* ---------- The hire and plan dialog (hire-form.js) ---------- */

html.hc-lead-open { overflow: hidden; }

dialog.lead-dialog { overscroll-behavior: contain; }
dialog.lead-dialog.is-thanks { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.lead-panel {
  position: relative;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lead-form { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.lead-head { display: flex; align-items: flex-start; gap: 14px; padding-right: 48px; }
.lead-face {
  flex: none;
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ground);
}
.lead-face:empty { display: none; }
.lead-face img { display: block; width: 52px; height: 52px; object-fit: cover; }
.lead-head-text { display: flex; flex-direction: column; min-width: 0; }
.lead-title { font-size: 30px; line-height: 1.1; }
.lead-sub { font-size: 15px; color: var(--text-3); }

.lead-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.lead-grid--single { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
/* In the dialog the fields run the full width, like the button under them. */
.lead-dialog .lead-grid--single { max-width: none; }
.lead-field .input, .lead-field .select { min-height: 46px; }
.lead-field .select:invalid { color: var(--muted); }
.lead-field .select option { color: var(--ink); }

.lead-consent { font-size: 14px; color: var(--text-3); }
.lead-error { margin: 0; }
.lead-submit { min-height: 56px; font-size: 18px; }

.lead-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lead-close svg { width: 22px; height: 22px; }
.lead-close:hover { background: var(--ground); }
.lead-close:focus-visible { border-radius: 50%; }
.lead-close--light { color: var(--on-ink); }
.lead-close--light:hover { background: var(--ink-2); }
.lead-close--light:focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--on-ink); }

/* Thank-you */
.lead-panel--thanks { min-height: 360px; }
.lead-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
}
.lead-check svg { width: 28px; height: 28px; stroke-width: 2.6; }
.lead-thanks-text { display: flex; flex-direction: column; gap: 10px; padding-right: 40px; }
.lead-thanks-title { font-size: 32px; line-height: 1.08; }
/* Focus lands on the heading so screen readers read it; it isn't a control, so no ring. */
.lead-dialog .lead-thanks-title:focus,
.lead-dialog .lead-thanks-title:focus-visible { outline: none; box-shadow: none; }
.lead-thanks-text p { color: var(--on-ink-2); }
.lead-booking { align-self: flex-start; min-height: 52px; font-size: 17px; }
.lead-dialog.is-thanks .btn-outline { color: var(--on-ink); border-color: var(--on-ink); }
.lead-dialog.is-thanks .btn-outline:hover { background: var(--ink-2); color: var(--on-ink); }
.lead-dialog.is-thanks :focus-visible { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--orange-light); }
.lead-another {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-ink);
  font-size: 15px;
  text-underline-offset: 4px;
}
.lead-another:hover { color: var(--orange-light); }
/* The pay button on the hire thank-you (Phase 2 step 1), above the booking page. */
.lead-pay { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lead-pay-button { min-height: 52px; font-size: 17px; }
.lead-pay-small { margin: 0; max-width: 560px; font-size: 14px; color: var(--on-ink-2); }
.lead-pay-error { margin: 0; color: var(--orange-light); font-weight: 600; }
.lead-thanks-sub { font-size: 22px; line-height: 1.15; margin-top: 8px; }
/* The Calendly booking page, when BOOKING_URL is a Calendly link (hire-form.js). */
.lead-calendar { border-radius: 14px; overflow: hidden; background: #fff; }
.lead-calendar iframe { display: block; width: 100%; height: min(700px, calc(100dvh - 120px)); min-height: 480px; border: 0; }
@media (max-width: 600px) {
  /* Calendly wants at least 320px: use the panel's side padding too. */
  .lead-calendar { margin-inline: -20px; border-radius: 0; }
}

.lead-inline {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px 28px;
}
.lead-inline .lead-form { gap: 18px; }
.lead-inline-head { display: flex; flex-direction: column; gap: 6px; }
.lead-inline-title { font-size: 26px; line-height: 1.1; }
.lead-inline-title:focus,
.lead-inline-title:focus-visible { outline: none; box-shadow: none; }
.lead-grid--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lead-inline .lead-submit { align-self: flex-start; width: auto; min-width: 240px; }

.lead-inline.is-done { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.lead-inline-done { display: flex; align-items: flex-start; gap: 16px; }
.lead-inline-done .lead-check { flex: none; width: 48px; height: 48px; }
.lead-inline-done .lead-check svg { width: 24px; height: 24px; }
.lead-inline-done-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lead-inline-done-text p { color: var(--on-ink-2); }

@media (max-width: 900px) {
  .lead-grid--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-grid--inline .lead-field-company { grid-column: 1 / -1; }
}

/* Never printed (the offer letter prints this page). */
@media print {
  .lead-inline { display: none !important; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Joining: the ring breathes slowly, the dots after the name follow each other. */
  .cf[data-phase="joining"] .cf-ring { animation: cf-ring-breathe 2.8s ease-in-out infinite; }
  .cf[data-phase="joining"] .cf-joining-dots span { animation: cf-dot 1.4s ease-in-out infinite; }
  .cf[data-phase="joining"] .cf-joining-dots span:nth-child(2) { animation-delay: .2s; }
  .cf[data-phase="joining"] .cf-joining-dots span:nth-child(3) { animation-delay: .4s; }
  .lead-inline { animation: lead-in .45s ease both; }
}
/* Reduced motion: the ring and bars still show who is speaking, without moving. */
@media (prefers-reduced-motion: reduce) {
  .cf-glow, .cf-ring { transform: none; }
  .cf-bars span, .cf-bars span:nth-child(2), .cf-bars span:nth-child(3) { transform: scaleY(.6); }
  .cf[data-phase="joining"] .cf-ring { opacity: .35; }
}
@keyframes lead-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes cf-dot {
  0%, 100% { opacity: .3; }
  40% { opacity: 1; }
}
@keyframes cf-ring-breathe {
  0%, 100% { opacity: .14; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.03); }
}

/* ---------- Phones (MobileResult.dc.html, 390px) ---------- */

@media (max-width: 600px) {

  .cf { border-radius: var(--radius); padding: 10px; gap: 10px; }
  .cf-bar { padding: 4px 6px; }
  .cf-bar-left { gap: 8px; }
  .cf-dot { width: 8px; height: 8px; }
  .cf-live, .cf-timer { font-size: 11px; }
  .cf-title { display: none; }
  .cf-stage {
    --cf-tag-room: 80px;
    --cf-slot-room: 112px;
    --cf-slot-gap: 14px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
  }
  .cf-face, .cf-play-anchor { --cf-face: 150px; }
  @supports (width: 1cqh) {
    .cf-face, .cf-play-anchor { --cf-face: min(48cqh, 60cqw, calc(100cqh - var(--cf-tag-room) - var(--cf-slot-room) + var(--cf-lift))); }
  }
  .cf-ring { inset: -7px; border-width: 2.5px; }
  .cf-tag { left: 10px; right: 10px; bottom: 10px; max-width: none; border-radius: 10px; padding: 8px 12px; gap: 0; }
  .cf-tag-name { font-size: 15px; }
  .cf-tag-from { font-size: 10px; }
  .cf-joining { font-size: 14px; }
  .cf-note { font-size: 13px; padding: 5px 12px; }
  .cf-pause { top: 10px; right: 10px; }
  .cf-play-pill { min-height: 44px; padding: 5px 16px 5px 5px; }
  .cf-play-circle { width: 34px; height: 34px; }
  .cf-play-label { font-size: 14px; }
  .cf[data-look="video"] .cf-play-circle { width: 76px; height: 76px; }
  .cf[data-look="video"] .cf-play-circle svg { width: 32px; height: 32px; }
  .cf-caption { padding: 12px 14px; border-radius: 10px; font-size: 16px; }
  .cf-caption.is-idle { font-size: 14px; }

  .share-row { flex-direction: column; gap: 8px; }
  .share-btn { min-height: 48px; width: 100%; white-space: normal; text-align: center; }
  .share-pair { gap: 8px; }
  .share-partner { flex: 1 1 auto; width: auto; }
  /* Copy link becomes a square icon button beside "Send to my business partner". */
  .share-copy { flex: none; width: 48px; padding: 0; }
  .share-copy span {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }

  .sal { gap: 16px; }
  .sal-fields { gap: 12px; }
  .sal-field-currency { flex: 0 0 104px; }
  .sal-field-salary { flex: 1 1 160px; }
  .sal-outputs { flex-wrap: nowrap; gap: 14px; }
  .sal-out { flex: 1 1 0; padding-top: 10px; gap: 0; }
  .sal-out-label, .sal-out-unit { font-size: 13px; }
  .sal-out-value { font-size: 26px; line-height: 1.1; }

  .lead-panel { padding: 20px; gap: 18px; }
  .lead-form { gap: 18px; }
  .lead-head { padding-right: 40px; }
  .lead-title { font-size: 24px; }
  .lead-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .lead-close { top: 10px; right: 10px; }
  .lead-thanks-title { font-size: 26px; }
  .lead-thanks-text { padding-right: 32px; }
  .lead-booking { align-self: stretch; white-space: normal; text-align: center; }

  .result-rename { width: 100%; justify-content: center; }
  .lead-inline { padding: 20px; border-radius: var(--radius); }
  .lead-inline-title { font-size: 22px; line-height: 1.15; }
  .lead-grid--inline { grid-template-columns: minmax(0, 1fr); }
  .lead-inline .lead-submit { align-self: stretch; width: 100%; min-width: 0; }
  .lead-inline-done { gap: 12px; }
  .lead-inline-done .lead-check { width: 40px; height: 40px; }
}

@media (max-width: 360px) {
  .sal-outputs { flex-wrap: wrap; }
  .sal-out { flex: 1 1 100%; }
}

/* ---------- Narrow call tiles (the offer letter on phones) ---------- */

/* Last, so it wins over the phone sizes above. The portrait moves up a little
   so the line or button under it never meets the name tag. */
@container (max-width: 320px) {
  .cf-center, .cf-play, .cf-face, .cf-play-anchor { --cf-lift: 36px; }
  .cf-tag-name { font-size: 14px; }
  .cf-joining, .cf-play-label { font-size: 13px; }
  /* A long label ("Hear MaximilianoAI's introduction") wraps inside the tile
     instead of running off both edges. The explicit width keeps the centred
     pill from shrinking to half the portrait's width. */
  .cf-play-pill { width: max-content; max-width: calc(100cqw - 16px); gap: 8px; padding-right: 14px; white-space: normal; }
  .cf-play-label { line-height: 1.15; overflow-wrap: anywhere; }
}
