/* Lefi website assistant. All selectors are scoped to the widget. */
#lefi-widget {
  --lefi-green: #07573e;
  --lefi-turquoise: #0f9ead;
  --lefi-top: 112px;
  --lefi-right: 20px;
  --lefi-launcher-width: 132px;
  --lefi-launcher-height: 164px;
  position: fixed;
  top: var(--lefi-top);
  right: var(--lefi-right);
  width: var(--lefi-launcher-width);
  height: var(--lefi-launcher-height);
  z-index: 1100;
  font-family: inherit;
  color: #173b31;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}
#lefi-widget *, #lefi-widget *::before, #lefi-widget *::after { box-sizing: border-box; }
#lefi-widget [hidden] { display: none !important; }
#lefi-widget button, #lefi-widget a { font: inherit; }
#lefi-widget button { -webkit-tap-highlight-color: transparent; }
#lefi-widget button:focus-visible, #lefi-widget a:focus-visible, #lefi-widget .lefi-guide-title:focus-visible {
  outline: 3px solid #139fae;
  outline-offset: 4px;
}
#lefi-widget .lefi-launcher {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 240ms ease, transform 240ms ease;
}
#lefi-widget .lefi-launcher::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 27%;
  width: 46%;
  height: 8px;
  border-radius: 50%;
  background: rgba(15, 72, 52, .13);
  filter: blur(4px);
  z-index: -1;
}
#lefi-widget .lefi-idle {
  display: block;
  width: 164px;
  height: 164px;
  max-width: none;
  margin-left: -16px;
  object-fit: contain;
  filter: drop-shadow(0 6px 5px rgba(18, 68, 52, .10));
  animation: lefi-breathe 4.5s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}
#lefi-widget .lefi-launcher:hover { transform: translateY(-3px); }
#lefi-widget .lefi-launcher:active { transform: scale(.97); }
#lefi-widget[data-state='flying'] .lefi-launcher,
#lefi-widget[data-state='loading'] .lefi-launcher {
  opacity: 0;
  pointer-events: none;
}
#lefi-widget .lefi-balloon {
  position: absolute;
  top: 23px;
  right: calc(100% + 10px);
  width: 244px;
  background: #fff;
  border: 1px solid rgba(12, 89, 64, .13);
  border-radius: 20px 20px 4px 20px;
  box-shadow: 0 12px 36px rgba(13, 74, 53, .12), 0 2px 4px rgba(13, 74, 53, .04);
  pointer-events: auto;
  animation: lefi-balloon-in 260ms ease-out both;
}
#lefi-widget .lefi-balloon::after {
  content: '';
  position: absolute;
  right: -7px;
  bottom: 12px;
  width: 12px;
  height: 12px;
  transform: rotate(-45deg);
  background: #fff;
  border-right: 1px solid rgba(12, 89, 64, .13);
  border-bottom: 1px solid rgba(12, 89, 64, .13);
}
#lefi-widget .lefi-balloon-open {
  display: block;
  width: 100%;
  padding: 19px 28px 19px 20px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #23493c;
  text-align: left;
  cursor: pointer;
  line-height: 1.48;
  font-size: 14px;
}
#lefi-widget .lefi-balloon-open strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 750;
  font-size: 15px;
  color: var(--lefi-green);
}
#lefi-widget .lefi-balloon-dismiss {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #758d82;
  cursor: pointer;
  z-index: 1;
}
#lefi-widget .lefi-balloon-dismiss:hover { color: var(--lefi-green); background: #eef5f1; }
#lefi-widget .lefi-balloon-dismiss svg { width: 13px; height: 13px; }
#lefi-widget .lefi-flight {
  position: fixed;
  width: 198px;
  height: 264px;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 10px 9px rgba(16, 61, 47, .14));
}
#lefi-widget .lefi-flight-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  animation: lefi-wingbeat .52s steps(4) infinite;
}
#lefi-widget .lefi-chat {
  position: fixed;
  top: 104px;
  right: var(--lefi-right);
  display: flex;
  flex-direction: column;
  width: 370px;
  height: min(520px, calc(100dvh - 122px));
  min-height: 280px;
  overflow: hidden;
  border: 1px solid #dce8e0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 65px rgba(9, 51, 36, .20), 0 3px 12px rgba(9, 51, 36, .05);
  pointer-events: auto;
  animation: lefi-chat-in 240ms ease-out both;
}
#lefi-widget[data-state='chat'] .lefi-launcher { opacity: 0; pointer-events: none; }
#lefi-widget .lefi-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 19px 18px 18px;
  background: var(--lefi-green);
  color: #fff;
}
#lefi-widget .lefi-chat-avatar {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 16px;
  background: #eaf4ed;
}
#lefi-widget .lefi-chat-avatar img {
  display: block;
  width: 68px;
  height: 68px;
  max-width: none;
  transform: translate(-11px, 2px);
}
#lefi-widget .lefi-chat-heading { flex: 1; min-width: 0; }
#lefi-widget .lefi-chat-heading h2 { font: inherit; font-weight: 750; font-size: 19px; margin: 0 0 3px; line-height: 1.2; color: #fff; }
#lefi-widget .lefi-chat-heading p { margin: 0; font-size: 12px; line-height: 1.4; color: #cde7d8; }
#lefi-widget .lefi-chat-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
#lefi-widget .lefi-chat-close:hover { background: rgba(255, 255, 255, .13); }
#lefi-widget .lefi-chat-close svg { width: 17px; height: 17px; }
/* The guide has one current page, persistent navigation and real page links. */
#lefi-widget .lefi-guide-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 9px 16px;
  border-bottom: 1px solid #e4eee8;
  background: #f8fbf9;
}
#lefi-widget .lefi-guide-toolbar button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--lefi-green);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
#lefi-widget .lefi-guide-toolbar button:hover { background: #e8f3ec; }
#lefi-widget .lefi-guide-toolbar .lefi-guide-home { border-color: #c7ded1; background: #fff; }
#lefi-widget .lefi-guide-toolbar button:disabled { opacity: .45; cursor: default; background: transparent; }
#lefi-widget .lefi-guide-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c3d8c9 transparent;
}
#lefi-widget .lefi-guide-breadcrumbs { margin-bottom: 14px; }
#lefi-widget .lefi-guide-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 0; list-style: none; padding: 0; margin: 0; }
#lefi-widget .lefi-guide-breadcrumbs li { display: flex; align-items: center; min-width: 0; max-width: 100%; color: #627d70; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#lefi-widget .lefi-guide-breadcrumbs li + li::before { content: '/'; padding: 0 6px; color: #9bb3a6; }
#lefi-widget .lefi-guide-crumb { padding: 5px 0; border: 0; border-radius: 3px; background: none; color: #376b56; font-size: 11px; line-height: 1.5; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#lefi-widget .lefi-guide-card { display: flow-root; margin: 0 0 15px; }
#lefi-widget .lefi-guide-title { margin: 0 0 9px; color: var(--lefi-green); font-size: 18px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
#lefi-widget .lefi-guide-title:focus:not(:focus-visible) { outline: none; }
#lefi-widget .lefi-guide-text { margin: 0; color: #3a5a4c; font-size: 13px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
#lefi-widget .lefi-guide-product { padding: 14px; border: 1px solid #dcebe2; border-radius: 15px; background: #f7fbf8; }
#lefi-widget .lefi-guide-product .lefi-guide-title { font-size: 17px; }
#lefi-widget .lefi-guide-product-image { float: right; display: block; width: 96px; height: 96px; margin: 0 0 12px 12px; object-fit: contain; border-radius: 10px; background: #fff; }
#lefi-widget .lefi-guide-category { margin: 0 0 5px; color: #0d7b82; font-size: 11px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
#lefi-widget .lefi-guide-code { margin: 0 0 10px; color: #61796c; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#lefi-widget .lefi-guide-product .lefi-guide-text { clear: both; }
#lefi-widget .lefi-guide-options { display: flex; flex-direction: column; gap: 8px; }
#lefi-widget .lefi-guide-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d6e6dd;
  border-radius: 12px;
  background: #fff;
  color: var(--lefi-green);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
#lefi-widget .lefi-guide-option:hover { background: #eef8f2; border-color: #94c8ad; }
#lefi-widget .lefi-guide-option-arrow { flex: 0 0 auto; color: #1498a0; font-size: 22px; line-height: 1; font-weight: 400; }
#lefi-widget .lefi-guide-pagination { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; }
#lefi-widget .lefi-guide-pagination button { justify-content: center; flex: 1; width: auto; min-height: 38px; padding: 8px 10px; font-size: 12px; }
#lefi-widget .lefi-guide-pagination button:disabled { opacity: .4; cursor: default; background: #f8faf9; }
#lefi-widget .lefi-guide-page-count { flex: 0 0 auto; color: #557161; font-size: 12px; white-space: nowrap; }
#lefi-widget .lefi-guide-links { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; padding-top: 14px; border-top: 1px solid #e5eee8; }
#lefi-widget .lefi-guide-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 11px 13px; border: 1px solid #b9dde0; border-radius: 11px; background: #effafa; color: #086b70; font-size: 13px; font-weight: 650; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
#lefi-widget .lefi-guide-link:hover { background: #def3f3; border-color: #7dbfc3; text-decoration: underline; text-underline-offset: 3px; }
#lefi-widget .lefi-guide-link-icon { flex: 0 0 auto; font-size: 16px; }
#lefi-widget .lefi-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@keyframes lefi-wingbeat { from { background-position: 0 0; } to { background-position: 133.333333% 0; } }
@keyframes lefi-breathe { 0%, 100% { transform: translateY(0) rotate(-.5deg); } 50% { transform: translateY(-4px) rotate(.5deg); } }
@keyframes lefi-balloon-in { from { opacity: 0; transform: translate(6px, 3px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes lefi-chat-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  #lefi-widget {
    --lefi-top: 95px;
    --lefi-right: 12px;
    --lefi-launcher-width: 98px;
    --lefi-launcher-height: 116px;
  }
  #lefi-widget .lefi-idle { width: 116px; height: 116px; margin-left: -9px; }
  #lefi-widget .lefi-balloon { top: 10px; right: calc(100% + 1px); width: min(226px, calc(100vw - 125px)); border-radius: 17px 17px 4px 17px; }
  #lefi-widget .lefi-balloon-open { font-size: 13px; padding: 16px 23px 16px 16px; }
  #lefi-widget .lefi-balloon-open strong { font-size: 14px; }
  #lefi-widget .lefi-flight { width: 150px; height: 200px; }
  #lefi-widget .lefi-chat { top: 95px; width: calc(100vw - 24px); height: min(570px, calc(100dvh - 112px)); min-height: 0; border-radius: 20px; }
  #lefi-widget .lefi-chat-header { padding: 15px 16px; }
  #lefi-widget .lefi-guide-content { padding: 13px 14px 18px; }
}
@media (max-height: 460px) {
  #lefi-widget .lefi-chat { top: 82px; height: calc(100dvh - 94px); min-height: 0; }
  #lefi-widget .lefi-chat-header { padding: 9px 14px; }
  #lefi-widget .lefi-guide-toolbar { padding: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #lefi-widget *, #lefi-widget *::before, #lefi-widget *::after { animation: none !important; transition: none !important; }
}

/* Load after widget.css. The full-page scene never intercepts page interaction. */
#lefi-widget {
  --lefi-floor: 0px;
  --lefi-frame-scale: 1.5;
  --lefi-frame-inset-factor: .25;
  --lefi-rest-size: 164px;
  --lefi-rest-left: -16px;
}
#lefi-widget .lefi-story-stage {
  position: fixed;
  inset: 0 0 var(--lefi-floor) 0;
  width: auto;
  height: auto;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
}
#lefi-widget .lefi-story-actor {
  position: absolute;
  top: 0;
  left: 0;
  width: 218px;
  height: 218px;
  display: block;
  transform-origin: center;
  pointer-events: none;
  will-change: transform, opacity;
}
#lefi-widget .lefi-story-flight { z-index: 2; }
#lefi-widget .lefi-story-source {
  position: fixed;
  left: -2px;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: .001;
  pointer-events: none;
}
/* Keep the greeting and chat above the flight. */
#lefi-widget .lefi-balloon,
#lefi-widget .lefi-launcher,
#lefi-widget .lefi-chat { z-index: 3; }
@media (prefers-reduced-motion: reduce) {
  #lefi-widget .lefi-story-stage { display: none !important; }
}

/* Landing EOF, canonical poster and retained idle canvas share one pose and
   rectangle. No opacity transition is allowed during the landing handoff. */
#lefi-widget .lefi-idle,
#lefi-widget .lefi-idle-motion {
  position: absolute;
  top: calc(-1 * var(--lefi-rest-size) * var(--lefi-frame-inset-factor));
  left: calc(var(--lefi-rest-left) - var(--lefi-rest-size) * var(--lefi-frame-inset-factor));
  width: calc(var(--lefi-rest-size) * var(--lefi-frame-scale));
  height: calc(var(--lefi-rest-size) * var(--lefi-frame-scale));
  margin: 0;
  display: block;
  pointer-events: none;
}
/* Apply the same compensation to the chat portrait so the added transparent
   border does not shrink the familiar head framing inside its 46px window. */
#lefi-widget .lefi-chat-avatar img {
  width: calc(68px * var(--lefi-frame-scale));
  height: calc(68px * var(--lefi-frame-scale));
  transform: translate(
    calc(-11px - 68px * var(--lefi-frame-inset-factor)),
    calc(2px - 68px * var(--lefi-frame-inset-factor))
  );
}
#lefi-widget .lefi-idle-has-frame .lefi-idle {
  opacity: 0;
  animation-play-state: paused;
}
@media (max-width: 600px) {
  #lefi-widget { --lefi-rest-size: 116px; --lefi-rest-left: -9px; }
}
@media (prefers-reduced-motion: reduce) {
  #lefi-widget .lefi-idle-motion { display: none !important; }
  #lefi-widget .lefi-idle-has-frame .lefi-idle { opacity: 1; }
}

/* A fixed frame must not bob, glow or move on hover between video cycles. */
#lefi-widget .lefi-idle {
  animation: none !important;
  transform: none !important;
  filter: none !important;
}
#lefi-widget .lefi-launcher,
#lefi-widget .lefi-launcher:hover,
#lefi-widget .lefi-launcher:active {
  transform: none;
  transition: none;
}
#lefi-widget .lefi-launcher::after { display: none; }
#lefi-widget .lefi-story-flight,
#lefi-widget .lefi-story-actor,
#lefi-widget .lefi-idle-motion { filter: none; box-shadow: none; }
#lefi-widget .lefi-story-flight,
#lefi-widget .lefi-idle-motion { transition: none; }

/* Integration offsets are optional; the approved default frame remains intact. */
#lefi-widget { --lefi-top: var(--lefi-header-offset, 112px); }
#lefi-widget .lefi-chat {
  top: var(--lefi-chat-top, 104px);
  height: min(520px, calc(100dvh - var(--lefi-chat-top, 104px) - 18px));
}
@media (max-width: 600px) {
  #lefi-widget { --lefi-top: var(--lefi-header-offset-mobile, 95px); }
  #lefi-widget .lefi-chat {
    top: var(--lefi-chat-top-mobile, 95px);
    height: min(570px, calc(100dvh - var(--lefi-chat-top-mobile, 95px) - 17px));
  }
}
@media (max-height: 460px) {
  #lefi-widget .lefi-chat {
    top: var(--lefi-chat-top-compact, 82px);
    height: calc(100dvh - var(--lefi-chat-top-compact, 82px) - 12px);
  }
}
