/* Sia, the sales chat on every page: launcher bottom right, a compact chat window, in the site's neutral colours */
/* Sia, in the site's neutral colours */
.mia-dock, .mia { --bg: var(--cream); --panel: var(--paper); --mute: var(--muted); }
.mia-dock { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
body.mia-open .mia-dock { display: none; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); color: var(--ink); font: 800 14px Inter, sans-serif; flex: none; position: relative; }
.av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #3ccf7a; border: 2px solid var(--ink); }
.mia-launch { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; background: var(--ink); color: var(--paper); font: 650 15px Inter, sans-serif; padding: 7px 18px 7px 7px; border-radius: 999px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); transition: transform .15s; }
.mia-launch:hover { transform: translateY(-2px); }
.mia-launch .av { width: 34px; height: 34px; }
.mia-launch .sia-lt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; max-width: 220px; overflow: hidden; white-space: nowrap; transition: max-width .45s ease, opacity .3s ease; }
.mia-launch { transition: transform .15s, padding .45s ease, gap .45s ease; }
.mia-launch.tucked { padding: 7px; gap: 0; }
.mia-launch.tucked .sia-lt { max-width: 0; opacity: 0; }
.mia-launch.tucked:not(.pulse) { animation: siabreathe 6s ease-in-out infinite; }
@keyframes siabreathe { 0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(138, 136, 134, 0), 0 12px 30px -10px rgba(0, 0, 0, .45); } 80% { box-shadow: 0 0 0 9px rgba(138, 136, 134, .22), 0 12px 30px -10px rgba(0, 0, 0, .45); } }
.mia-launch .sia-lt small { font: 500 11.5px Inter, sans-serif; opacity: .72; }
.mia-launch.pulse { animation: siapulse 2.4s ease-out; }
@keyframes siapulse { 0% { box-shadow: 0 0 0 0 rgba(138, 136, 134, .6), 0 12px 30px -10px rgba(0, 0, 0, .45); transform: scale(1); } 15% { transform: scale(1.06); } 30% { transform: scale(1); } 45% { transform: scale(1.04); } 60% { transform: scale(1); } 100% { box-shadow: 0 0 0 22px rgba(138, 136, 134, 0), 0 12px 30px -10px rgba(0, 0, 0, .45); } }
.mia-tip { position: relative; max-width: 270px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px; padding: 12px 30px 12px 14px; font-size: 14px; line-height: 1.45; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); animation: tipin .35s ease; }
@keyframes tipin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mia-tipx { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.mia { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: none; }
.mia.on { display: block; }
.mia-card { width: 390px; max-width: 100%; height: min(620px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); overflow: hidden; color: var(--ink); }
.mia-card header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mia-card header .av { width: 38px; height: 38px; font-size: 16px; background: var(--ink); color: var(--paper); }
.mia-card header .av::after { border-color: var(--paper); }
.mia-card header b { display: block; font-size: 15.5px; }
.mia-card header small { font-size: 12.5px; color: var(--muted); }
.mia-x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.mia-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mm { max-width: 85%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; }
.mm.bot { align-self: flex-start; background: var(--cream); border-bottom-left-radius: 5px; }
.mm.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 5px; }
.mm.typing { color: var(--muted); letter-spacing: 3px; }
.mm.file { font-size: 13.5px; }
.mia-in { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: center; }
.mia-in input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 12px; padding: 11px 12px; font: 15px Inter, sans-serif; }
.mia-in .clip { border: 0; background: none; color: var(--muted); width: 36px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.mia-in .clip:hover { color: var(--ink); }
.mia-in .clip svg { width: 19px; height: 19px; }
.mia-in .send { border: 0; background: var(--ink); color: var(--paper); border-radius: 12px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mia-in .send svg { width: 18px; height: 18px; }
.mia-in.busy .send { opacity: .5; pointer-events: none; }
.mia-in.off { opacity: .45; pointer-events: none; }
.sumcard { align-self: stretch; background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; }
.sumcard b { display: block; font-size: 14px; margin-bottom: 6px; }
.sumcard ul { margin: 0; padding: 0; list-style: none; }
.sumcard li { padding: 4px 0; border-top: 1px solid var(--line); color: var(--muted); }
.sumcard li span { color: var(--ink); font-weight: 600; }
.gate { align-self: stretch; background: var(--cream); border-radius: 14px; padding: 14px; font-size: 14px; }
.gate p { margin: 0 0 10px; line-height: 1.45; }
.gate label { display: block; font-size: 12.5px; color: var(--muted); margin: 8px 0 4px; }
.gate input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 11px; font: 15px Inter, sans-serif; }
.gate input:focus { outline: 2px solid var(--sage); outline-offset: -1px; }
.gate .err { color: #D13438; font-size: 13px; margin: 8px 0 0; }
:root[data-theme="dark"] .gate .err { color: #ff8a7a; }
.gate .go, .sumcard .go { margin-top: 12px; width: 100%; border: 0; border-radius: 999px; padding: 11px; background: var(--ink); color: var(--paper); font: 650 14px Inter, sans-serif; cursor: pointer; }
.gate .go:disabled { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .mia-launch.pulse, .mia-launch.tucked { animation: none; } }
@media (max-width: 980px) {
  .mia-dock { right: 12px; bottom: 12px; }
  .mia-launch .sia-lt small { display: none; }
  .mia-launch { padding: 6px 14px 6px 6px; font-size: 14px; }
  .mia-launch.tucked { padding: 6px; }
  .mia { inset: 0; }
  .mia-card { width: 100%; height: 100%; border-radius: 0; }
  .mia-tip { max-width: 230px; }
}
@media (max-width: 760px) { .pb-pill { display: none; } }

/* Sia's chat window: compact, so it sits in the corner instead of taking over the right side */
.mia-card { width: 340px; height: min(470px, 64vh); min-height: 340px; border-radius: 16px; }
.mia-card header { padding: 10px 12px; gap: 10px; }
.mia-card header .av { width: 30px; height: 30px; font-size: 13px; }
.mia-card header .av::after { width: 8px; height: 8px; }
.mia-card header b { font-size: 13.5px; }
.mia-card header small { font-size: 11px; }
.mia-x { font-size: 20px; }
.mia-log { padding: 12px; gap: 8px; }
.mm { font-size: 13px; line-height: 1.45; padding: 8px 11px; border-radius: 14px; }
.mm.file { font-size: 12px; }
.mia-in { padding: 8px 10px; gap: 6px; }
.mia-in input { font-size: 13.5px; padding: 9px 10px; border-radius: 10px; }
.mia-in .clip { width: 30px; height: 34px; }
.mia-in .clip svg { width: 17px; height: 17px; }
.mia-in .send { width: 36px; height: 36px; border-radius: 10px; }
.mia-in .send svg { width: 16px; height: 16px; }
.gate { padding: 12px; font-size: 13px; }
.gate p { margin: 0 0 8px; }
.gate label { font-size: 11.5px; margin: 6px 0 3px; }
.gate input { font-size: 13.5px; padding: 8px 10px; border-radius: 9px; }
.gate .err { font-size: 12px; }
.gate .go, .sumcard .go { font-size: 13px; padding: 9px; margin-top: 10px; }
.sumcard { font-size: 12.5px; padding: 10px 12px; }
.sumcard b { font-size: 13px; }
@media (max-width: 980px) { .mia-card { width: 100%; height: 100%; border-radius: 0; } }
