#idg-ai-handoff {
  --idg-ink: #214c45;
  --idg-accent: #28675b;
  --idg-ai-bottom: 16px;
  --idg-ai-edge-bottom: max(var(--idg-ai-bottom), calc(12px + env(safe-area-inset-bottom, 0px)));
  --idg-ai-available-height: calc(100dvh - 32px);
  color: var(--idg-ink);
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
  overflow-wrap: anywhere;
}
#idg-ai-handoff *, #idg-ai-handoff *::before, #idg-ai-handoff *::after { box-sizing: border-box; }
#idg-ai-handoff [hidden], #idg-ai-handoff dialog:not([open]) { display: none !important; }
/* Hide only page-top, only while this page has a successfully enabled launcher. */
body:has(#idg-ai-handoff[data-idg-ai-initialized="true"] #idg-ai-launcher:not([hidden])) #pagetop { display: none !important; }
#idg-ai-handoff p { margin: 0; padding: 0; }
#idg-ai-handoff button { appearance: none; -webkit-appearance: none; font: inherit; cursor: pointer; box-shadow: none; }
#idg-ai-handoff .idg-ai__launcher {
  position: fixed; z-index: 99; right: 20px;
  /* Lift the body so the speech tail also clears the fixed footer. */
  bottom: calc(var(--idg-ai-edge-bottom) + 10px);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 7px 18px 7px 10px; margin: 0;
  border: 1px solid #bbd9cd; border-radius: 999px; background: #fffefa;
  color: var(--idg-ink); font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 18px #173e4926, 0 1px 3px #173e4912;
  transition: box-shadow .18s ease, transform .18s ease;
}
#idg-ai-handoff .idg-ai__launcher:hover { background: #f1f8f2; box-shadow: 0 6px 22px #173e4930; transform: translateY(-2px); }
#idg-ai-handoff .idg-ai__launcher::after {
  content: ""; position: absolute; right: 24px; bottom: -6px;
  width: 16px; height: 16px; background: inherit;
  border-right: 1px solid #bbd9cd; border-bottom: 1px solid #bbd9cd;
  transform: skewX(-25deg) rotate(45deg); pointer-events: none;
}
#idg-ai-handoff .idg-ai__launcher[aria-expanded=true] { visibility: hidden; }
#idg-ai-handoff .idg-ai__mascot { display: block; flex: 0 0 36px; }
#idg-ai-handoff .idg-ai__launcher-label { position: relative; z-index: 1; display: grid; gap: 1px; line-height: 1.25; text-align: center; white-space: nowrap; }
#idg-ai-handoff .idg-ai__launcher-lead { font-size: 11px; font-weight: 600; }
#idg-ai-handoff .idg-ai__panel {
  position: fixed; z-index: 99; inset: auto 20px var(--idg-ai-edge-bottom) auto;
  width: min(400px, calc(100vw - 40px)); max-width: none;
  /* Extra device safe-area space must also reduce the panel's available height. */
  max-height: min(660px, calc(var(--idg-ai-available-height) + var(--idg-ai-bottom) - var(--idg-ai-edge-bottom)));
  margin: 0; padding: 0; border: 1px solid #c8ddcf; border-radius: 22px;
  background: #fffefa; color: var(--idg-ink); overflow: hidden;
  box-shadow: 0 18px 65px #153b4933; text-align: left;
}
#idg-ai-handoff .idg-ai__panel[open] { display: flex; flex-direction: column; }
#idg-ai-handoff .idg-ai__panel::backdrop { background: #173e4933; }
#idg-ai-handoff .idg-ai__panel-head { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 16px 14px 15px 18px; border-bottom: 1px solid #e0eadf; background: #edf5e9; }
#idg-ai-handoff .idg-ai__head-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 14px; background: #fffefa; }
#idg-ai-handoff .idg-ai__head-icon img { display: block; width: 32px; height: 32px; object-fit: contain; }
#idg-ai-handoff .idg-ai__head-copy { flex: 1; min-width: 0; }
#idg-ai-handoff .idg-ai__eyebrow { font-size: 10px; letter-spacing: .06em; color: #577466; }
/* The article theme uses !important heading margins; keep every override scoped. */
#idg-ai-handoff h2 { margin: 2px 0 0 !important; padding: 0; border: 0; background: none; box-shadow: none; color: var(--idg-ink); font-size: 19px; font-weight: 700; line-height: 1.4; }
#idg-ai-handoff h2::before, #idg-ai-handoff h2::after,
#idg-ai-handoff h3::before, #idg-ai-handoff h3::after { content: none; }
#idg-ai-handoff .idg-ai__close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: #527168; font-size: 27px; line-height: 1; }
#idg-ai-handoff .idg-ai__close:hover { background: #dcebdc; }
#idg-ai-handoff .idg-ai__panel-body { min-height: 0; padding: 16px 18px 14px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#idg-ai-handoff .idg-ai__intro { margin-bottom: 16px; color: #5d736a; font-size: 12px; }
#idg-ai-handoff fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
#idg-ai-handoff legend { width: 100%; margin: 0 0 8px; padding: 0; font-size: 12px; font-weight: 700; }
#idg-ai-handoff .idg-ai__questions label { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0; padding: 9px 6px; border: 1px solid #dce4da; border-radius: 10px; background: #fff; color: #577168; cursor: pointer; font-size: 12px; line-height: 1.55; text-align: center; }
#idg-ai-handoff .idg-ai__questions label:has(input:checked) { border-color: #649c85; background: #eaf4eb; color: #214c45; }
#idg-ai-handoff input[type=radio] { appearance: auto; -webkit-appearance: radio; position: static; width: 14px; height: 14px; flex-shrink: 0; margin: 0; padding: 0; opacity: 1; accent-color: var(--idg-accent); }
#idg-ai-handoff .idg-ai__input > label { display: block; margin: 0 0 7px; font-size: 12px; font-weight: 700; }
#idg-ai-handoff .idg-ai__input > label > .idg-ai__optional { font-weight: 400; color: #637b71; }
#idg-ai-handoff .idg-ai__step { display: inline-block; margin-right: 3px; color: var(--idg-accent); font-size: 17px; font-weight: 700; line-height: 1.2; vertical-align: -1px; }
#idg-ai-handoff textarea { display: block; width: 100%; max-width: 100%; min-height: 76px; margin: 0; padding: 10px 12px; border: 1px solid #b8cec1; border-radius: 10px; background: #fff; color: #284b43; font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; }
#idg-ai-handoff textarea::placeholder { color: #80938a; opacity: 1; }
#idg-ai-handoff .idg-ai__input-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 10px; color: #637b71; }
#idg-ai-handoff .idg-ai__counter { white-space: nowrap; font-variant-numeric: tabular-nums; }
#idg-ai-handoff h3.idg-ai__providers-title { margin: 18px 0 9px !important; padding: 0; border: 0; background: none; box-shadow: none; color: var(--idg-ink); font-size: 13px; line-height: 1.6; font-weight: 700; }
#idg-ai-handoff .idg-ai__providers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
#idg-ai-handoff .idg-ai__providers button { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 56px; margin: 0; padding: 9px 5px; border: 1px solid var(--idg-accent); border-radius: 11px; background: var(--idg-accent); color: #fff; }
#idg-ai-handoff .idg-ai__providers button:hover { background: #205447; }
#idg-ai-handoff .idg-ai__providers button:disabled { opacity: .6; cursor: wait; }
#idg-ai-handoff .idg-ai__provider-name { font-size: 13px; font-weight: 700; line-height: 1.3; white-space: normal; word-break: keep-all; overflow-wrap: normal; text-align: center; }
#idg-ai-handoff .idg-ai__provider-arrow { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff24; font-size: 14px; line-height: 1; }
#idg-ai-handoff .idg-ai__note { margin-top: 10px; font-size: 10px; color: #637b71; line-height: 1.7; }
#idg-ai-handoff .idg-ai__status { margin-top: 10px; color: #365e51; font-size: 12px; }
#idg-ai-handoff .idg-ai__status:empty { display: none; }
#idg-ai-handoff .idg-ai__recovery { margin-top: 14px; padding: 12px; border: 1px solid #d8c5a3; border-radius: 10px; background: #fff9ec; }
#idg-ai-handoff .idg-ai__recovery label { display: block; margin-bottom: 7px; font-size: 12px; }
#idg-ai-handoff .idg-ai__recovery a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; color: var(--idg-accent); text-decoration: underline; font-size: 12px; }
#idg-ai-handoff :is(a, button, summary, input, textarea):focus-visible { outline: 3px solid #b77449; outline-offset: 3px; }
#idg-ai-handoff details { margin: 0; padding: 0; border: 0; background: none; }
#idg-ai-handoff summary { display: list-item; padding: 7px 0; cursor: pointer; font-size: 10px; }
#idg-ai-handoff .idg-ai__debug { border-top: 1px dashed #d8e1d4; margin-top: 15px; padding-top: 6px; color: #637b71; font-size: 11px; }
#idg-ai-handoff pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow: auto; padding: 10px; border-radius: 6px; background: #f3f7f0; color: #284b43; font-size: 10px; line-height: 1.5; }
@media (max-width: 767px) {
  #idg-ai-handoff { --idg-ai-bottom: 82px; --idg-ai-available-height: calc(100dvh - 94px); }
  #idg-ai-handoff .idg-ai__launcher { right: 12px; min-height: 50px; padding: 6px 15px 6px 8px; font-size: 13px; }
  #idg-ai-handoff .idg-ai__panel { right: 12px; width: min(400px, calc(100vw - 24px)); border-radius: 20px; }
}
@media (max-width: 360px) {
  #idg-ai-handoff .idg-ai__panel-head { padding: 12px 8px 12px 13px; gap: 7px; }
  #idg-ai-handoff h2 { font-size: 17px; }
  #idg-ai-handoff .idg-ai__panel-body { padding: 13px; }
  #idg-ai-handoff .idg-ai__questions label { font-size: 11px; }
  #idg-ai-handoff .idg-ai__provider-name { font-size: 12px; }
  #idg-ai-handoff .idg-ai__provider-arrow { flex-basis: 18px; width: 18px; height: 18px; font-size: 13px; }
  #idg-ai-handoff .idg-ai__providers button { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  #idg-ai-handoff .idg-ai__launcher { transition: none; }
  #idg-ai-handoff .idg-ai__launcher:hover { transform: none; }
}
