/* Billy: an accessible, compact help panel styled for the BillUp brand. */
.billy-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 43px; border: 0; border-radius: 14px; padding: 10px 13px;
  background: #eaf0f6; color: #172d43; font: inherit; font-weight: 800;
  font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}
.billy-trigger:hover,.billy-trigger[aria-expanded="true"] { background: #dfeafa; }
.billy-trigger:hover { transform: translateY(-1px); }
.billy-trigger svg { width: 21px; height: 21px; }
.billy-trigger-mobile { display: none; }
.billy-panel[hidden] { display: none !important; }
.billy-panel {
  position: fixed; top: 116px; right: max(25px,calc((100vw - 1180px) / 2));
  z-index: 90; width: min(472px,calc(100vw - 28px));
  max-height: min(730px,calc(100dvh - 134px)); min-height: 440px;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #dbe5ee; border-radius: 28px;
  background: #fff; box-shadow: 0 22px 80px rgba(12,38,65,.23);
  color: #16293e;
}
.billy-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 22px 4px; }
.billy-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.billy-avatar { width: 54px; height: 54px; flex: 0 0 54px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(150deg,#e4f5ff,#d6e9ff); }
.billy-avatar img { display: block; width: 38px; height: 38px; object-fit: contain; }
.billy-identity strong { font-size: 21px; font-weight: 850; letter-spacing: -.04em; display: block; }
.billy-status { display: flex; align-items: center; gap: 7px; color: #627588; font-size: 12px; font-weight: 670; white-space: nowrap; }
.billy-status > span { width: 8px; height: 8px; background: #39b981; border-radius: 50%; box-shadow: 0 0 0 3px #e0f7eb; }
.billy-close { display: grid; place-items: center; flex: 0 0 43px; width: 43px; height: 43px; padding: 0; border: 0; border-radius: 50%; background: #f1f5f9; color: #23394f; font: inherit; font-size: 29px; line-height: 1; cursor: pointer; }
.billy-close:hover { background: #e5edf5; }
.billy-conversation { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 23px 15px; min-height: 0; }
.billy-intro h2 { color: #13283f; letter-spacing: -.055em; font-weight: 860; font-size: clamp(27px,3.1vw,35px); line-height: 1.12; margin: 7px 0 17px; }
.billy-intro h2 span { color: #5f7184; }
.billy-intro > p { color: #496176; font-size: 16px; line-height: 1.63; margin: 0 0 17px; }
.billy-panel.has-messages .billy-intro { display: none; }
.billy-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.billy-suggestions button { font: inherit; font-size: 13px; font-weight: 760; line-height: 1.3; color: #21374e; padding: 11px 14px; background: #f0f4f8; border: 0; border-radius: 30px; cursor: pointer; text-align: left; transition: background .2s; }
.billy-suggestions button:hover { background: #dbeafa; }
.billy-messages { display: grid; gap: 13px; }
.billy-message { max-width: 93%; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 17px; padding: 13px 15px; }
.billy-message.user { margin-left: auto; background: #e1f1ff; color: #133c60; border-bottom-right-radius: 5px; }
.billy-message.assistant { margin-right: auto; background: #f1f5f8; color: #243b52; border-bottom-left-radius: 5px; }
.billy-message.assistant a { color: #116da9; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.billy-message.assistant a:hover { color: #063f73; }
.billy-message.assistant a:focus-visible { outline: 2px solid #1982c4; outline-offset: 3px; border-radius: 3px; }
.billy-message.thinking { color: #728398; font-style: italic; }
.billy-form { display: flex; align-items: flex-end; gap: 9px; border: 2px solid #1a354e; border-radius: 22px; padding: 8px; margin: 2px 22px 0; background: #fff; }
.billy-form:focus-within { box-shadow: 0 0 0 3px rgba(54,166,225,.14); }
.billy-form textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 112px; resize: none; border: 0; outline: 0; box-shadow: none; background: transparent; padding: 11px 6px 8px; color: #19344c; font: inherit; font-size: 14px; line-height: 1.35; }
.billy-form textarea::placeholder { color: #8b9caf; }
.billy-form button { width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #1b74cc; color: #fff; cursor: pointer; flex: 0 0 44px; }
.billy-form button:disabled { background: #e9eff5; color: #9fafc0; cursor: not-allowed; }
.billy-form button svg { width: 21px; height: 21px; }
.billy-privacy-note { color: #76899b; font-size: 10px; line-height: 1.4; text-align: center; margin: 9px 18px 12px; }
.billy-privacy-note a { text-decoration: underline; text-underline-offset: 2px; }
.billy-contact { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #e7edf3; gap: 8px; padding: 16px 18px; }
.billy-contact a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #314b63; font-size: 12px; line-height: 1.3; font-weight: 720; overflow-wrap: anywhere; }
.billy-contact a:hover { color: #1678c3; }
.billy-contact svg { width: 17px; height: 17px; flex: 0 0 17px; }
.billy-trigger:focus-visible,.billy-close:focus-visible,.billy-suggestions button:focus-visible,.billy-form button:focus-visible,.billy-contact a:focus-visible { outline: 3px solid #39a9ea; outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 1120px) and (min-width: 851px) { .billy-trigger { padding: 10px 11px; } .nav-auth-actions { gap: 9px; } }
@media (max-width: 850px) { .billy-trigger-mobile { display: inline-flex; margin-left: auto; margin-right: 8px; } .site-header .menu-button { margin-left: 0; } .billy-panel { top: 82px; right: 14px; max-height: calc(100dvh - 95px); } }
@media (max-width: 510px) { .billy-trigger-mobile span { display: none; } .billy-trigger-mobile { width: 42px; height: 42px; padding: 8px; } .billy-panel { left: 9px; right: 9px; width: auto; top: 75px; max-height: calc(100dvh - 84px); border-radius: 23px; } .billy-panel-head { padding: 17px 16px 4px; } .billy-conversation { padding: 14px 18px; } .billy-intro h2 { font-size: 28px; } .billy-intro > p { font-size: 14px; } .billy-form { margin: 2px 15px 0; } .billy-contact { padding: 13px 7px; gap: 3px; } .billy-contact a { font-size: 10.5px; gap: 4px; } .billy-contact svg { width: 15px; height: 15px; flex-basis: 15px; } }
@media (prefers-reduced-motion: reduce) { .billy-trigger,.billy-suggestions button,.billy-trigger:hover { transition: none; transform: none; } }

/* Refined Billy appearance, using the transparent original BillUp symbol. */
.billy-trigger { gap: 8px; border: 1px solid #dce9f5; background: linear-gradient(135deg,#f2f8fe,#e8f3fd); box-shadow: 0 3px 10px rgba(22,95,160,.06); }
.billy-trigger:hover,.billy-trigger[aria-expanded="true"] { background: #dcefff; border-color: #bad9f6; }
.billy-trigger-symbol { display: block; width: 20px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(11,62,135,.1)); }
.billy-panel {
  width: min(530px,calc(100vw - 28px));
  max-height: min(780px,calc(100dvh - 132px));
  border: 1px solid rgba(194,216,235,.9); border-radius: 30px;
  background: linear-gradient(170deg,#fbfdff 0%,#fff 28%,#fff 100%);
  box-shadow: 0 32px 90px rgba(19,55,86,.22),0 5px 18px rgba(37,88,127,.09);
  transform-origin: 80% 0;
  animation: billy-enter .28s cubic-bezier(.2,.8,.2,1) both;
}
.billy-panel-head { padding: 25px 27px 8px; background: linear-gradient(115deg,rgba(235,247,255,.72),rgba(255,255,255,0) 73%); }
.billy-identity { gap: 15px; }
.billy-avatar {
  width: 64px; height: 64px; flex-basis: 64px;
  border-radius: 20px; border: 1px solid #cfe7fa;
  background: linear-gradient(145deg,#f1faff 5%,#e2f1ff 96%);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.9),0 6px 16px rgba(29,103,170,.08);
}
.billy-avatar img { width: 47px; height: 55px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(13,57,117,.14)); }
.billy-identity strong { font-size: 23px; letter-spacing: -.045em; }
.billy-status { font-size: 13px; margin-top: 3px; }
.billy-close { width: 47px; height: 47px; flex-basis: 47px; background: #eef4fa; transition: background .2s; }
.billy-close:hover { background: #e0edfa; }
.billy-conversation { padding: 19px 29px 18px; }
.billy-intro h2 { margin: 10px 0 19px; font-size: clamp(32px,3.5vw,39px); line-height: 1.12; letter-spacing: -.06em; }
.billy-intro h2 span { color: #61778c; }
.billy-intro > p { color: #536e82; font-size: 17px; margin-bottom: 23px; line-height: 1.58; }
.billy-suggestions { gap: 9px; }
.billy-suggestions button { background: #eef3f8; border: 1px solid #e6eef6; font-size: 13px; padding: 12px 15px; border-radius: 40px; transition: background .2s,transform .2s,border-color .2s; }
.billy-suggestions button:hover { background: #e0effc; border-color: #c2ddf3; transform: translateY(-1px); }
.billy-messages { gap: 15px; }
.billy-message { padding: 14px 16px; border-radius: 18px; box-shadow: 0 1px 2px rgba(21,56,91,.03); }
.billy-form { margin: 2px 27px 0; border: 2px solid #254c70; border-radius: 24px; box-shadow: 0 0 0 4px rgba(58,141,203,.09); }
.billy-form:focus-within { border-color: #1878cf; box-shadow: 0 0 0 4px rgba(54,166,225,.16); }
.billy-form button:not(:disabled) { background: linear-gradient(135deg,#2489dd,#116ab8); box-shadow: 0 3px 9px rgba(18,112,197,.25); }
.billy-form button:not(:disabled):hover { background: #0f61ac; }
.billy-privacy-note { margin: 13px 21px 16px; font-size: 10.5px; }
.billy-contact { background: #f8fbfe; border-color: #e5eef5; padding: 20px 22px; gap: 10px; }
.billy-contact a { color: #2f536f; font-size: 12.5px; }
@keyframes billy-enter { from { opacity: 0; transform: translateY(-10px) scale(.965); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 850px) { .billy-panel { max-height: calc(100dvh - 98px); } }
@media (max-width: 510px) {
  .billy-trigger-mobile .billy-trigger-symbol { width: 18px; height: 22px; }
  .billy-panel { max-height: calc(100dvh - 85px); min-height: min(440px,calc(100dvh - 85px)); border-radius: 24px; }
  .billy-panel-head { padding: 17px 18px 7px; }
  .billy-avatar { width: 55px; height: 55px; flex-basis: 55px; border-radius: 17px; }
  .billy-avatar img { width: 39px; height: 48px; }
  .billy-identity { gap: 11px; }
  .billy-identity strong { font-size: 20px; }
  .billy-status { font-size: 11px; }
  .billy-conversation { padding: 13px 20px 15px; }
  .billy-intro h2 { font-size: clamp(26px,7.3vw,31px); margin: 9px 0 16px; }
  .billy-intro > p { font-size: 14px; margin-bottom: 18px; }
  .billy-suggestions { gap: 7px; }
  .billy-suggestions button { font-size: 12px; padding: 10px 12px; }
  .billy-form { margin: 2px 17px 0; }
  .billy-privacy-note { font-size: 9.5px; margin: 10px 14px 11px; }
  .billy-contact { padding: 14px 8px; gap: 4px; }
  .billy-contact a { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) { .billy-panel { animation: none; } .billy-close,.billy-suggestions button { transition: none; } .billy-close:hover,.billy-suggestions button:hover { transform: none; } }
