/* Ask Oliver: floating button + chat panel (moved from app.css, 6 Nov 2026; loaded on every page). */
.ap-chat { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 60; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 50px -20px rgba(15, 42, 46, .35); display: flex; flex-direction: column; }
.ap-chat[hidden] { display: none; }
.ap-chat-hd { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ap-chat-hd img { border-radius: 50%; } .ap-chat-hd div { flex: 1; min-width: 0; } .ap-chat-hd b { display: block; font-size: 16px; } .ap-chat-hd span { font-size: 12.5px; color: var(--muted); }
.ap-chat-x { background: none; border: 0; padding: 6px; color: var(--ink); cursor: pointer; border-radius: 8px; } .ap-chat-x:hover { background: var(--tint); }
.ap-chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ap-msg { max-width: 92%; border-radius: 14px; padding: 10px 14px; font-size: 14.5px; line-height: 22px; }
.ap-msg p { margin: 0 0 8px; } .ap-msg p:last-child { margin: 0; } .ap-msg ul { margin: 0 0 8px; padding-left: 18px; }
.ap-msg.bot { background: var(--tint); color: var(--ink); align-self: flex-start; border-top-left-radius: 4px; }
.ap-msg.me { background: var(--deep); color: var(--on-deep); align-self: flex-end; border-top-right-radius: 4px; }
.ap-msg .typing { color: var(--muted); font-style: italic; } .ap-msg .err { color: var(--no-fg); }
.ap-msg .ref { color: var(--link); font-weight: 600; font-size: 11px; }
.ap-src { margin: 10px 0 0; padding: 10px 0 0 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 19px; } .ap-src li { margin-bottom: 4px; } .ap-src a { color: var(--link); }
.ap-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; } .ap-chat-chips button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 6px 12px; font: 500 13px/18px var(--ui); cursor: pointer; } .ap-chat-chips button:hover { background: var(--tint); }
.ap-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 18px 6px; border-top: 1px solid var(--line); }
.ap-chat-form textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; font: 400 15px/21px var(--ui); color: var(--ink); background: var(--surface); }
.ap-chat-form .btn { height: 44px; width: 44px; padding: 0; }
.ap-chat-note { margin: 0; padding: 4px 18px 14px; font-size: 11.5px; line-height: 16px; color: var(--faint); }
@media (max-width: 600px) { .ap-chat { width: 100vw; } }
.ap-fab { position: fixed; right: 24px; bottom: 24px; z-index: 45; display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 0; border-radius: 99px; background: var(--deep); color: var(--on-deep); font: 600 15px/20px var(--ui); cursor: pointer; box-shadow: 0 10px 28px -8px rgba(15, 42, 46, .45); }
.ap-fab img { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
.ap-fab:hover { filter: brightness(1.18); } .ap-fab[hidden], html.ap-chat-open .ap-fab { display: none; }
@media (max-width: 960px) { .ap-fab { right: 16px; bottom: 16px; } body:has(.ap-mbar) .ap-fab { bottom: 84px; } }
/* Public lesson player (signed out): same rule as the app player, so the button never covers the lesson's Next bar. */
@media (max-width: 640px) {
  body:not(.app):has(.pl-nav) .ap-fab { bottom: calc(108px + env(safe-area-inset-bottom)); padding: 6px; }
  body:not(.app):has(.pl-nav) .ap-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body:not(.app):has(.pl-nav) .ap-fab img { width: 44px; height: 44px; }
}
/* D2 reverse card (cross-site journeys): AML Buddy's skin, labelled as Oliver's suggestion. */
.ap-xs { margin-top: 12px; display: grid; gap: 6px; justify-items: start; padding: 14px 16px; border-radius: 12px; background: #0C0E0D; border: 1px solid #232726; color: #D3D8D6; font: 400 14px/20px var(--ui); }
.ap-xs-l { margin: 0; font: 600 12px/16px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: #00FCA3; }
.ap-xs a { color: #F2F4F3; font: 600 15px/22px var(--ui); text-decoration: underline; text-underline-offset: 3px; }
.ap-xs a:hover, .ap-xs a:focus-visible { color: #00FCA3; outline-color: #00FCA3; }
