/* Talia (chat button, arrival greeting, chat panel),
   Uses the brand tokens style.css declares on :root (--blue, --gold, --ink, --paper, --fs-*, --ease-out …).
   Moved out of style.css on 2026-09-25. */
[tabindex="-1"]:focus { outline: none; }        /* sections focused by an in-page link, not by the reader */
.ta-lock { overflow: hidden; }

/* ---------- Talia chat + fab ---------- */
/* pointer-events: the fab column is a fixed box over the page; only its
   buttons and cards take clicks, the gaps between them fall through */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; pointer-events: none; }
.fab > * { pointer-events: auto; }
.fab > a, .fab > button { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 0; box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); transition: transform .2s var(--ease); }
.fab > a:hover, .fab > button:hover { transform: scale(1.07); }
.fab .wa { background: #1faa55; }
.fab.chatting .wa { display: none; }
.fab .talia { background: var(--blue); position: relative; }
.fab .talia::after { content: ''; position: absolute; right: 3px; top: 3px; width: 13px; height: 13px; border-radius: 50%; background: #22b566; border: 2px solid #fff; }
.fab .talia.unread::after { content: '1'; right: -3px; top: -3px; width: 21px; height: 21px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.fab .i { width: 25px; height: 25px; }
/* 2026-10-31: WhatsApp and Talia are the same size (56px) and share one centre line, founder's call (the 2026-09-26 half-size
   Talia is gone). The chat panel sits above the column. */
.fab { align-items: center; }
.fab > a, .fab > button { width: 56px; height: 56px; padding: 0; flex: none; cursor: pointer; }
.fab .i { width: 26px; height: 26px; }
.fab .talia::after { right: 2px; top: 2px; width: 12px; height: 12px; border-width: 2px; }
.fab .talia.unread::after { right: -3px; top: -3px; width: 20px; height: 20px; font-size: 11px; }

/* A glint so visitors notice help is here: a light sweep across the WhatsApp
   and Talia buttons, a small hop and a soft ring. a.js adds .glint shortly
   after load and again every 3 minutes (2026-09-26). It never moves anything
   else on the page; style.css switches it off for reduced motion. */
.fab .wa, .fab .talia { position: relative; background-image: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%); background-size: 280% 100%; background-position: 140% 0; background-repeat: no-repeat; }
.fab .wa::before, .fab .talia::before { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.fab.glint .wa, .fab.glint .talia { animation: ta-glint 1.3s var(--ease-out) both, ta-hop .8s ease both; }
.fab.glint .talia { animation-delay: .35s; }
.fab.glint .wa::before { animation: ta-ring 1.2s ease-out both; color: rgba(31,170,85,.55); }
.fab.glint .talia::before { animation: ta-ring 1.2s ease-out .35s both; color: rgba(48,75,198,.55); }
@keyframes ta-glint { from { background-position: 140% 0; } to { background-position: -40% 0; } }
@keyframes ta-hop { 0%, 100% { transform: none; } 30% { transform: translateY(-5px) scale(1.06); } 55% { transform: translateY(0) scale(.98); } 75% { transform: translateY(-2px); } }
@keyframes ta-ring { from { box-shadow: 0 0 0 0 currentColor; } to { box-shadow: 0 0 0 14px transparent; } }

/* Talia's arrival greeting — once per visit, above the chat button */
.tl-hi { position: absolute; right: 0; bottom: calc(100% + 14px); width: 312px; max-width: calc(100vw - 44px); background: #fff; border-radius: 20px; padding: 14px 14px 13px; color: var(--ink); box-shadow: 0 28px 60px -24px rgba(19,41,71,.55), 0 0 0 1px rgba(19,41,71,.06); transform-origin: 100% 100%; opacity: 0; transform: translateY(12px) scale(.96); visibility: hidden; transition: opacity .3s var(--ease-out), transform .45s var(--ease-out), visibility 0s .45s; }
.tl-hi.show { opacity: 1; transform: none; visibility: visible; transition: opacity .35s var(--ease-out), transform .5s var(--ease-out), visibility 0s; }
.fab.chatting .tl-hi { display: none; }
.tl-hi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-right: 36px; }
.tl-hi-face { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); display: grid; place-items: center; font-weight: 700; font-size: 15px; position: relative; flex: none; }
.tl-hi-face::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22b566; border: 2px solid #fff; }
.tl-hi-top b { display: block; font-size: var(--fs-sm); line-height: 1.25; }
.tl-hi-top small { display: block; color: var(--muted); font-size: var(--fs-micro); line-height: 1.3; }
.tl-hi-x { position: absolute; top: 15px; right: 14px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--paper); color: var(--muted); display: grid; place-items: center; transition: background .2s, color .2s; }
.tl-hi-x:hover { background: var(--line); color: var(--ink); }
.tl-hi-x .i { width: 15px; height: 15px; }
.tl-hi-msg { display: block; cursor: pointer; background: var(--paper); border-radius: 16px 16px 16px 4px; padding: 11px 14px; color: var(--ink); font-size: var(--fs-ui); line-height: 1.45; min-height: 44px; }
.tl-hi-msg .typing { padding: 5px 0 0; }
.tl-hi-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tl-hi-chips button { border: 0; background: var(--blue-soft); color: var(--blue); border-radius: 99px; padding: 7px 12px; font-size: var(--fs-xs); font-weight: 500; transition: background .2s, color .2s; }
.tl-hi-chips button:hover { background: var(--blue); color: #fff; }

.chat { position: fixed; right: 22px; bottom: 90px; z-index: 90; width: 370px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 160px); background: #fff; border-radius: 22px; box-shadow: 0 30px 70px -20px rgba(19,41,71,.5); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; transition: transform .3s var(--ease), opacity .3s; }
.chat:not(.open) { transform: scale(.9) translateY(10px); opacity: 0; pointer-events: none; }
.chat header { background: var(--blue); color: #fff; padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.chat header .face { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); display: grid; place-items: center; font-weight: 700; }
.chat header b { display: block; }
.chat header small { opacity: .8; display: flex; gap: 6px; align-items: center; font-size: var(--fs-xs); }
.chat header small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #5eea9a; }
.chat header button { margin-left: auto; background: rgba(255,255,255,.15); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.chat header .i { width: 18px; height: 18px; }
.chat .log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: var(--fs-sm); line-height: 1.45; animation: pop .3s var(--ease); }
.msg.bot { background: #fff; color: var(--ink); border-bottom-left-radius: 4px; box-shadow: 0 2px 6px -2px rgba(19,41,71,.12); }
.msg.me { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg a { color: var(--blue); font-weight: 600; text-decoration: underline; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chat .quick { padding: 12px 14px; display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.chat .quick button { border: 0; background: var(--blue-soft); color: var(--blue); border-radius: 99px; padding: 7px 12px; font-size: var(--fs-xs); font-weight: 500; }
.chat .quick button:hover { background: var(--blue); color: #fff; }
.chat .mock { font-size: 11.5px; color: var(--muted); text-align: center; padding: 0 0 10px; }

@media (max-width: 900px) {
  .has-sticky .fab { bottom: 88px; }
  .has-sticky .chat { bottom: 156px; max-height: calc(100vh - 230px); }
}
@media (max-width: 600px) {
  .fab { right: 16px; bottom: 16px; }
  .fab > a, .fab > button { width: 54px; height: 54px; }
  /* on a phone the greeting is a compact bubble; the quick replies wait inside the chat */
  .tl-hi { display: flex; gap: 10px; align-items: flex-start; width: min(272px, calc(100vw - 32px)); padding: 12px 42px 12px 12px; border-radius: 18px 18px 4px 18px; }
  .tl-hi-top { margin: 0; padding: 0; }
  .tl-hi-top > div, .tl-hi-chips { display: none; }
  .tl-hi-face { width: 30px; height: 30px; font-size: 13.5px; }
  .tl-hi-msg { background: none; padding: 4px 0 0; min-height: 0; border-radius: 0; font-size: var(--fs-sm); }
  .tl-hi-x { top: 10px; right: 10px; width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

