.v2-handoff {
  padding: clamp(68px, 8vw, 120px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.handoff-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(26px, 4vw, 52px);
}

.handoff-heading h2 {
  margin: 0 0 18px;
  font-size: var(--type-section);
  line-height: 1.06;
  font-weight: 400;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .handoff-gradient-client, .handoff-gradient-team {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }
  .handoff-gradient-client { background-image: linear-gradient(100deg, #9cb4ff, #7181fc); }
  .handoff-gradient-team { background-image: linear-gradient(100deg, #d0ef43, #8dd8a4); }
}

.handoff-heading p { margin: 0; max-width: 56ch; color: var(--muted); }
.handoff-heading .v2-home-link { flex: none; }
.handoff-demo { --handoff-green: #49d790; }
.handoff-stage {
  display: grid;
  grid-template-columns: minmax(285px, .8fr) 58px minmax(0, 1.55fr);
  align-items: start;
}

.handoff-client, .handoff-team { min-width: 0; }
.handoff-perspective {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--muted);
  font: 600 .72rem/1.35 var(--font-body);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.handoff-perspective::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}

.handoff-team .handoff-perspective::before { background: var(--violet); }
.handoff-seam {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 14px;
  padding: 37px 0 18px;
}

.handoff-seam i { width: 1px; flex: 1; background: var(--line); }
.handoff-seam img { display: block; width: 16px; height: 24px; }
.handoff-phone-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 506px;
  perspective: 1100px;
}

.handoff-phone-stage::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(90%, 376px);
  aspect-ratio: 1;
  border: 1px solid #44ce8930;
  border-radius: 50%;
  background: radial-gradient(circle, #44ce8910, transparent 46%, #44ce891b 46.2%, transparent 46.6%);
}

.handoff-phone {
  position: relative;
  width: 222px;
  height: 459px;
  padding: 6px;
  border: 1px solid #555a5a;
  border-radius: 32px;
  background: #080a0b;
  box-shadow: inset 0 0 0 1px #212524, 3px 2px 0 #282e2c, 6px 3px 0 #101313, 15px 18px 26px #000a;
  transform: rotateZ(9deg) rotateY(-10deg) rotateX(5deg);
}

.handoff-screen {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #242929;
  border-radius: 26px;
  background: #131516;
}

.handoff-phone-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 25px;
  padding: 2px 13px 0;
  background: #171b1c;
  color: #c0c5c4;
  font-size: 10px;
}

.handoff-phone-status svg { width: 28px; height: 11px; }
.handoff-phone-status i {
  position: absolute;
  top: 7px;
  left: calc(50% - 33px);
  width: 66px;
  height: 11px;
  border-radius: 10px;
  background: #080a09;
}

.handoff-contact {
  display: flex;
  flex: none;
  align-items: center;
  min-height: 46px;
  gap: 8px;
  padding: 5px 12px;
  border-bottom: 1px solid #272b2a;
  background: #0c0f10;
  font-size: 11px;
}

.handoff-contact strong, .handoff-contact small { display: block; }
.handoff-contact strong span { font-weight: 400; color: var(--muted); }
.handoff-contact small { margin-top: 2px; color: #71dca2; font-size: 9px; }
.handoff-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--handoff-green);
  color: #0a2017;
  font: 14px/1 var(--font-display);
}

.handoff-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 13px 10px 10px;
  margin: 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: none;
}
.handoff-messages::-webkit-scrollbar { display: none; }

.handoff-message {
  display: flex;
  flex: none;
  align-items: end;
  gap: 6px;
  color: #e0e4e2;
  font-size: 11px;
  line-height: 1.42;
}

.handoff-message > div {
  min-width: 0;
  max-width: 100%;
  padding: 8px 9px 5px;
  border: 1px solid transparent;
  border-radius: 12px 12px 12px 4px;
  background: linear-gradient(#202321, #202321) padding-box,
    linear-gradient(125deg, var(--blue), var(--violet) 40%, var(--coral) 73%, var(--lime)) border-box;
}

.handoff-message time {
  display: block;
  margin-top: 3px;
  color: #a0aaa3;
  font-size: 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.handoff-message.is-client { align-self: end; max-width: 90%; }
.handoff-message.is-client > div { border-color: #3b604e; border-radius: 12px 12px 4px 12px; background: #234236; }
.handoff-message .handoff-avatar {
  width: 17px;
  height: 17px;
  border: 1px solid #638c75;
  background: #274638;
  color: #9ae7bd;
  font-size: 10px;
}
.handoff-message.is-team > div {
  background: linear-gradient(#1c242e, #1c242e) padding-box,
    linear-gradient(125deg, #5264ed, #5598f3 55%, #82d7f4) border-box;
}
.handoff-message.is-team .handoff-avatar { border-color: #776291; color: #ddc8fa; background: #322745; }
.handoff-message.is-event { justify-content: center; text-align: center; color: #d1bfec; font-size: 9px; }
.handoff-composer {
  display: flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: space-between;
  margin: 0 7px 3px;
  padding: 0 4px 0 11px;
  border: 1px solid #292f2c;
  border-radius: 16px;
  background: #0b0e0f;
  color: #a6b2ad;
  font-size: 10px;
}
.handoff-composer span:last-child {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--handoff-green);
  color: #0a2017;
}
.handoff-composer svg { width: 14px; height: 14px; }
.handoff-phone-home {
  flex: 0 0 13px;
  display: grid;
  place-items: center;
}
.handoff-phone-home::after { content: ''; width: 67px; height: 2px; border-radius: 2px; background: #959b99; }

/* A aparência e os efeitos vêm de demo/operation.css. Aqui só ajustamos o encaixe no palco. */
.handoff-board .op-toolbar h4 {
  margin: 0 0 7px;
  font: 400 22px/1.15 var(--font-display);
  letter-spacing: -.025em;
}
.handoff-board-stages { display: grid; }
.handoff-board-stages > .op-stage { grid-area: 1 / 1; min-height: 0; }
.handoff-board-stages > .op-stage-sizing { visibility: hidden; }
.handoff-board .op-lane + .op-lane { margin-top: 24px; }
/* As fileiras mantêm as três colunas da orquestração, mesmo com vagas livres. */
.handoff-board .op-card { min-height: 130px; }
.handoff-board .op-card-summary { margin: 7px 0; }
.handoff-board .op-card-carla { z-index: 1; }
.handoff-board .op-card-carla.is-highlighted { --op-mood: var(--lime); }
.handoff-board .op-card-carla.with-team .op-context { margin-top: 8px; padding: 6px 8px; }
.handoff-board .op-card-carla.with-team .op-context p { margin: 4px 0 0; }
.handoff-board .op-view-switch > span, .handoff-board .op-channels > span {
  display: grid;
  place-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--op-muted);
  font-size: 10px;
}
.handoff-board .op-view-switch > .is-selected, .handoff-board .op-channels > .is-selected {
  color: var(--white);
  background: color-mix(in srgb, var(--lime) 16%, var(--op-card));
  border-color: color-mix(in srgb, var(--lime) 35%, var(--op-card));
}
@container (max-width: 539px) {
  .handoff-board .op-team-cards,
  .handoff-board .op-ai-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handoff-board .op-card-summary { font-size: 11px; }
}

.handoff-views, .handoff-views[hidden], .handoff-controls[hidden], .handoff-controls svg[hidden] { display: none; }
.handoff-controls {
  --op-line: color-mix(in srgb, var(--white) 13%, transparent);
  --op-muted: var(--muted);
  margin-top: 22px;
  background: var(--black);
}
.handoff-views button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 500 12px/1.25 var(--font-body);
  cursor: pointer;
}
.handoff-views button:hover { color: var(--white); }
.handoff-views button[aria-pressed="true"] {
  background: #20291a;
  border-color: #5b6e39;
  color: var(--white);
}
.handoff-demo :focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

@media (max-width: 860px) {
  .handoff-heading { align-items: start; flex-direction: column; gap: 8px; }
  .handoff-heading .v2-home-link { margin-top: 0; }
  .handoff-stage { display: block; }
  .handoff-seam { display: none; }
  .handoff-views:not([hidden]) { display: flex; gap: 8px; margin-bottom: 18px; }
  .handoff-views button { flex: 1; }
  .handoff-demo:has(.handoff-views:not([hidden])) .handoff-stage { min-height: 478px; }
  .handoff-demo[data-view="client"]:has(.handoff-views:not([hidden])) .handoff-team,
  .handoff-demo[data-view="team"]:has(.handoff-views:not([hidden])) .handoff-client { display: none; }
  .handoff-phone-stage { min-height: 453px; }
  .handoff-phone { transform: rotateZ(4deg) rotateY(-6deg) rotateX(3deg) scale(.92); }
}

@media (max-width: 480px) {
  .handoff-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; padding-inline: 4px; }
  .handoff-controls .op-progress, .handoff-controls .op-playback { gap: 0; }
  .handoff-controls .op-step-label { grid-column: 1 / -1; grid-row: 2; padding: 0 8px 8px; }
}
