.ai-handoff { --ai-handoff-accent: #176840; --ai-handoff-accent-hover: #11522f; --ai-handoff-tint: #e5f3e9; color: #222324; text-align: start; }
.calculators .ai-handoff { --ai-handoff-accent: #15803d; --ai-handoff-accent-hover: #166534; --ai-handoff-tint: #ecfdf3; }
.ai-handoff .ai-handoff__title { margin: 0 0 8px; color: #222324; font-size: 22px; font-weight: 700; line-height: 30px; text-wrap: balance; }
.ai-handoff .ai-handoff__desc { margin: 0 0 16px; color: #5b5f66; font-size: 15px; line-height: 22px; text-wrap: pretty; }
.ai-handoff__form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.ai-handoff .ai-handoff__label { margin: 0; color: #222324; font-size: 14px; font-weight: 700; line-height: 20px; }
.ai-handoff__input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 10px; color: #222324; background: #fff; font: inherit; font-size: 16px; }
.ai-handoff__input:focus { border-color: var(--ai-handoff-accent); outline: 3px solid #0f4c22; outline-offset: 1px; }
.ai-handoff__input[aria-invalid="true"] { border-color: #b91c1c; }
.ai-handoff .ai-handoff__error { margin: 0; color: #b91c1c; font-size: 14px; line-height: 20px; }
.ai-handoff__primary, .ai-handoff__secondary { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px 20px; border: 1px solid var(--ai-handoff-accent); border-radius: 10px; font: inherit; font-size: 16px; font-weight: 700; line-height: 22px; cursor: pointer; transition: background-color .15s ease-out, border-color .15s ease-out; }
.ai-handoff__primary { margin-block-start: 4px; color: #fff; background: var(--ai-handoff-accent); }
.ai-handoff__primary:hover { border-color: var(--ai-handoff-accent-hover); background: var(--ai-handoff-accent-hover); }
.ai-handoff__secondary { margin-block-start: 10px; color: var(--ai-handoff-accent); background: #fff; }
.ai-handoff__secondary:hover { background: var(--ai-handoff-tint); }
.ai-handoff__primary:focus-visible, .ai-handoff__secondary:focus-visible { outline: 3px solid #0f4c22; outline-offset: 2px; }
/* The site's global button:focus ring also shows after a tap; keep it for the keyboard only. */
:is(.ai-handoff, .ai-handoff-dialog) button:focus:not(:focus-visible) { outline: none; }
.ai-handoff .ai-handoff__status { margin: 12px 0 0; color: #222324; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.ai-handoff .ai-handoff__status:empty { display: none; }
.ai-handoff__qr { display: flex; align-items: center; gap: 16px; margin-block-start: 20px; padding-block-start: 20px; border-block-start: 1px solid #e5e7eb; }
.ai-handoff__qr img { flex: none; display: block; width: 96px; height: 96px; }
.ai-handoff .ai-handoff__qr p { margin: 0; color: #5b5f66; font-size: 14px; line-height: 20px; text-wrap: pretty; }
.ai-handoff-dialog { box-sizing: border-box; width: min(420px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: auto; overscroll-behavior: contain; }
.ai-handoff-dialog::backdrop { background: rgba(15, 23, 42, .55); }
/* Bootstrap 4 reboot gives every <dialog> display: block, which would show this one closed at the end of the page. */
.ai-handoff-dialog:not([open]) { display: none; }
.ai-handoff-dialog__body { position: relative; padding: 28px 24px 24px; }
.ai-handoff-dialog .ai-handoff__title { padding-inline-end: 36px; font-size: 20px; line-height: 28px; }
.ai-handoff-dialog__close { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: #5b5f66; background: transparent; cursor: pointer; }
.ai-handoff-dialog__close:hover { color: #222324; background: #f3f4f6; }
.ai-handoff-dialog__close:focus-visible { outline: 3px solid #0f4c22; outline-offset: 1px; }
html:has(.ai-handoff-dialog[open]) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .ai-handoff__primary, .ai-handoff__secondary { transition: none; } }
