/* Shifty widget (2026-10-07). Sizes are px on purpose: the site's generated type scale
   multiplies inherited rem/em sizes by 1.4, and the widget must not inherit that. */
.shifty {
  --sh-paper: #F4EEE3; --sh-ink: #1A1714; --sh-brass: #B8863B; --sh-brass-dark: #8C6328;
  --sh-line: rgba(26, 23, 20, .14); --sh-shadow: 0 18px 48px rgba(26, 23, 20, .28);
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2147483000; font: 400 15px/1.5 'IBM Plex Sans', system-ui, sans-serif; color: var(--sh-ink);
}
.shifty *, .shifty *::before, .shifty *::after { box-sizing: border-box; }
.shifty [hidden] { display: none !important; }
.shifty .shifty-launcher {
  position: relative; width: 64px; height: 64px; padding: 0; border: 3px solid var(--sh-brass);
  border-radius: 50%; background: var(--sh-paper); box-shadow: var(--sh-shadow); cursor: pointer; overflow: hidden;
  transition: transform .2s ease;
}
.shifty .shifty-launcher img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shifty .shifty-launcher:hover { transform: translateY(-2px) rotate(-4deg); }
.shifty .shifty-launcher:focus-visible, .shifty button:focus-visible, .shifty textarea:focus-visible,
.shifty input:focus-visible, .shifty a:focus-visible { outline: 3px solid var(--sh-brass); outline-offset: 2px; }
.shifty .shifty-launcher::after {           /* the lens glint */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
  transform: translateX(-120%); animation: none;
}
@media (prefers-reduced-motion: no-preference) {
  .shifty .shifty-launcher::after { animation: shifty-glint 12s ease-in-out 3s infinite; }
  .shifty .shifty-bubble { animation: shifty-pop .35s cubic-bezier(.2, .9, .3, 1.3); }
}
@keyframes shifty-glint { 0%, 88% { transform: translateX(-120%); } 96%, 100% { transform: translateX(120%); } }
@keyframes shifty-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

.shifty .shifty-bubble {
  position: absolute; right: 0; bottom: 80px; width: 260px; padding: 14px 36px 14px 16px;
  background: var(--sh-ink); color: var(--sh-paper); border-radius: 16px 16px 4px 16px; box-shadow: var(--sh-shadow);
}
.shifty .shifty-bubble-text { all: unset; cursor: pointer; font: 500 15px/1.45 'IBM Plex Sans', system-ui, sans-serif; }
.shifty .shifty-bubble-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }

.shifty .shifty-panel {
  position: absolute; right: 0; bottom: 80px; width: 380px; height: 560px; max-height: calc(100dvh - 120px);
  display: flex; flex-direction: column; background: var(--sh-paper); border: 1px solid var(--sh-line);
  border-radius: 18px; box-shadow: var(--sh-shadow); overflow: hidden;
}
.shifty .shifty-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--sh-ink); color: var(--sh-paper); }
.shifty .shifty-head img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--sh-brass); }
.shifty .shifty-titles { flex: 1; min-width: 0; }
.shifty .shifty-title { margin: 0; font: 700 18px/1.1 Archivo, 'IBM Plex Sans', sans-serif; letter-spacing: .02em; color: inherit; }
.shifty .shifty-sub { margin: 2px 0 0; font-size: 13px; opacity: .8; }
.shifty .shifty-close { border: 0; background: none; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.shifty .shifty-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.shifty .shifty-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; }
.shifty .shifty-msg p, .shifty .shifty-msg li { margin: 0; font-size: 15px; line-height: 1.5; }
.shifty .shifty-msg p + p, .shifty .shifty-msg p + ul, .shifty .shifty-msg ul + p { margin-top: 6px; }
.shifty .shifty-msg ul { margin: 0; padding-left: 18px; }
.shifty .shifty-msg a { color: var(--sh-brass-dark); text-decoration: underline; }
.shifty .shifty-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--sh-line); border-bottom-left-radius: 4px; }
.shifty .shifty-msg--user { align-self: flex-end; background: var(--sh-ink); color: var(--sh-paper); border-bottom-right-radius: 4px; }
.shifty .shifty-msg.is-typing:empty::after { content: '\2026'; font-size: 18px; }
.shifty .shifty-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.shifty .shifty-chip { border: 1px solid var(--sh-brass); background: none; color: var(--sh-ink); border-radius: 999px; padding: 6px 12px; font: 500 13px/1.2 'IBM Plex Sans', sans-serif; cursor: pointer; }
.shifty .shifty-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--sh-line); }
.shifty .shifty-input { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 11px; border: 1px solid var(--sh-line); border-radius: 10px; font: 400 15px/1.4 'IBM Plex Sans', sans-serif; color: var(--sh-ink); background: #fff; }
.shifty .shifty-send { border: 0; border-radius: 10px; padding: 0 16px; background: var(--sh-brass); color: var(--sh-ink); font: 600 14px/1 'IBM Plex Sans', sans-serif; cursor: pointer; }
.shifty .shifty-send:disabled { opacity: .5; cursor: progress; }
.shifty .shifty-contact { display: grid; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--sh-line); }
.shifty .shifty-contact label { display: grid; gap: 3px; font-size: 13px; }
.shifty .shifty-contact input, .shifty .shifty-contact textarea { font: 400 15px/1.4 'IBM Plex Sans', sans-serif; padding: 7px 9px; border: 1px solid var(--sh-line); border-radius: 8px; background: #fff; color: var(--sh-ink); }
.shifty .shifty-contact .shifty-send { padding: 10px 16px; }
.shifty .shifty-contact-msg, .shifty .shifty-contact-done { margin: 0; font-size: 14px; }
.shifty .shifty-note { margin: 0; padding: 0 16px 10px; font-size: 11.5px; line-height: 1.4; opacity: .7; }
.shifty .shifty-note a { color: inherit; }
.shifty .shifty-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 600px) {
  .shifty.is-open .shifty-launcher { display: none; }
  .shifty .shifty-panel { position: fixed; inset: 0; width: auto; height: auto; max-height: none; border-radius: 0; border: 0; }
}
