/* LeverAI Support · the site assistant, styled to the board house style.
 * Load before assistant.src.js. Every rule is scoped to .lva or #lva- so nothing here can
 * reach the boards' own elements. Transitions only: the boards ship no keyframe animation. */

.lva {
  --lva-navy: var(--navy,#1A365D);
  --lva-navy-deep: var(--navy-deep,#0F2440);
  --lva-red: var(--red,#C53030);
  --lva-ink: var(--ink,#1A202C);
  --lva-paper: var(--paper,#FDFDFB);
  --lva-cool: var(--paper-cool,#F4F1EB);
  --lva-rule: var(--rule,#C9C3B5);
  --lva-sans: var(--sans,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif);
  --lva-serif: var(--serif,Georgia,"Times New Roman",serif);
  --lva-mono: var(--mono,ui-monospace,SFMono-Regular,Menlo,monospace);
  --lva-ease: cubic-bezier(.22,.61,.36,1);
}

/* ── launcher ──────────────────────────────────────────────────────────── */
.lva-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 58;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .72rem 1.05rem .72rem .9rem;
  font: 600 .82rem/1 var(--lva-sans);
  letter-spacing: .02em;
  color: #fff;
  background: var(--lva-navy);
  border: 1px solid var(--lva-navy-deep);
  border-radius: 999px;
  min-height: 44px;   /* CO-03 — the launcher is a touch target at every width */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 6px 20px rgba(15,36,64,.28);
  transition: background .2s var(--lva-ease),box-shadow .2s var(--lva-ease),transform .2s var(--lva-ease);
}
.lva-launch:hover {
  background: var(--lva-navy-deep);
  box-shadow: 0 10px 26px rgba(15,36,64,.34);
}
.lva-launch:focus-visible {
  outline: 2px solid var(--lva-red);
  outline-offset: 3px;
}
.lva-launch:active {
  transform: translateY(1px);
}
.lva-launch .lva-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #fff;
}
.lva[data-open="true"] .lva-launch {
  opacity: 0;
  pointer-events: none;
}

/* ── veil (phone sheet only) ───────────────────────────────────────────── */
.lva-veil {
  position: fixed;
  inset: 0;
  z-index: 64;
  background: rgba(10,26,48,.44);
  opacity: 0;
  transition: opacity .24s var(--lva-ease);
}
.lva[data-open="true"] .lva-veil {
  opacity: 1;
}

/* ── panel ─────────────────────────────────────────────────────────────── */
.lva-panel {
  position: fixed;
  z-index: 65;
  display: flex;
  flex-direction: column;
  background: var(--lva-paper);
  color: var(--lva-ink);
  border: 1px solid var(--lva-rule);
  box-shadow: 0 18px 48px rgba(10,26,48,.26);
  right: 20px;
  bottom: 20px;
  width: min(392px,calc(100vw - 40px));
  height: min(640px,calc(100vh - 120px));
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .24s var(--lva-ease),transform .24s var(--lva-ease);
}
.lva[data-open="true"] .lva-panel {
  opacity: 1;
  transform: none;
}
/* an author display value beats the browser's own [hidden] rule, so say it here */
.lva-panel[hidden],
.lva-veil[hidden] {
  display: none;
}

.lva-head {
  flex: 0 0 auto;
  position: relative;
  padding: 1rem 3rem .9rem 1.15rem;
  background: var(--lva-navy);
  color: #fff;
}
.lva-kick {
  margin: 0 0 .3rem;
  font: 600 .62rem/1 var(--lva-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.lva-kick::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  margin-right: .5rem;
  vertical-align: middle;
  background: var(--lva-red);
}
.lva-title {
  margin: 0;
  font: 600 1.06rem/1.2 var(--lva-serif);
  letter-spacing: .01em;
  color: #fff;
}
.lva-sub {
  margin: .3rem 0 0;
  font: 400 .74rem/1.45 var(--lva-sans);
  color: rgba(255,255,255,.76);
}
.lva-x {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 2px;
  cursor: pointer;
  transition: background .18s var(--lva-ease);
}
.lva-x:hover {
  background: rgba(255,255,255,.14);
}
.lva-x:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.lva-x .lva-ico {
  width: 15px;
  height: 15px;
}

.lva-log {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.05rem 1.15rem .4rem;
  background: var(--lva-paper);
}
.lva-log:focus-visible {
  outline: 2px solid var(--lva-navy);
  outline-offset: -2px;
}

.lva-turn {
  margin: 0 0 .95rem;
  max-width: 92%;
}
.lva-turn .lva-who {
  display: block;
  margin: 0 0 .28rem;
  font: 600 .6rem/1 var(--lva-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6B7280;
}
.lva-turn .lva-txt {
  margin: 0;
  padding: .68rem .8rem;
  font: 400 .845rem/1.55 var(--lva-sans);
  border: 1px solid var(--lva-rule);
  background: var(--lva-cool);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lva-turn.lva-me {
  margin-left: auto;
}
.lva-turn.lva-me .lva-who {
  text-align: right;
}
.lva-turn.lva-me .lva-txt {
  background: var(--lva-navy);
  border-color: var(--lva-navy-deep);
  color: #fff;
}
.lva-turn.lva-bot .lva-txt {
  border-left: 2px solid var(--lva-red);
}
.lva-turn.lva-wait .lva-txt {
  color: #6B7280;
  font-style: italic;
}

.lva-hand {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: .55rem 0 0;
  padding: .5rem .8rem;
  font: 600 .74rem/1 var(--lva-sans);
  letter-spacing: .01em;
  color: #fff;
  background: var(--lva-red);
  border: 1px solid var(--lva-red);
  cursor: pointer;
  transition: background .18s var(--lva-ease);
}
.lva-hand:hover {
  background: #A02525;
  border-color: #A02525;
}
.lva-hand:focus-visible {
  outline: 2px solid var(--lva-navy);
  outline-offset: 2px;
}
.lva-hand .lva-ico {
  width: 14px;
  height: 14px;
}

.lva-sugg {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .2rem 1.15rem .75rem;
  background: var(--lva-paper);
}
.lva-sugg:empty {
  display: none;
}
.lva-chip {
  padding: .42rem .68rem;
  font: 500 .74rem/1.2 var(--lva-sans);
  text-align: left;
  color: var(--lva-navy);
  background: transparent;
  border: 1px solid var(--lva-rule);
  cursor: pointer;
  transition: background .18s var(--lva-ease),border-color .18s var(--lva-ease);
}
.lva-chip:hover {
  background: var(--lva-cool);
  border-color: var(--lva-navy);
}
.lva-chip:focus-visible {
  outline: 2px solid var(--lva-navy);
  outline-offset: 2px;
}

.lva-form {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .75rem 1.15rem;
  border-top: 1px solid var(--lva-rule);
  background: var(--lva-cool);
}
.lva-in {
  flex: 1 1 auto;
  max-height: 7.5rem;
  min-height: 2.4rem;
  resize: none;
  padding: .55rem .65rem;
  font: 400 .845rem/1.45 var(--lva-sans);
  color: var(--lva-ink);
  background: var(--lva-paper);
  border: 1px solid var(--lva-rule);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.lva-in:focus-visible {
  outline: 2px solid var(--lva-navy);
  outline-offset: -1px;
}
.lva-send {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: var(--lva-navy);
  border: 1px solid var(--lva-navy-deep);
  cursor: pointer;
  transition: background .18s var(--lva-ease);
}
.lva-send:hover:not(:disabled) {
  background: var(--lva-navy-deep);
}
.lva-send:focus-visible {
  outline: 2px solid var(--lva-red);
  outline-offset: 2px;
}
.lva-send:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.lva-send .lva-ico {
  width: 16px;
  height: 16px;
}

.lva-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin: 0;
  padding: 0 1.15rem .8rem;
  background: var(--lva-cool);
  flex-wrap: wrap;
  align-items: baseline;
  font: 400 .655rem/1.4 var(--lva-sans);
  /* CO-03 DESIGN-7 — #6B7280 is a foreign gray. The footnote uses the boards' own
     65% ink, which is the same value the legal micro-copy is set in. */
  color: rgb(74,85,104);
}
.lva-foot-txt {
  flex: 1 1 12rem;
  min-width: 0;
}
.lva-foot-by {
  flex: 0 0 auto;
  order: 3;
  width: 100%;
  padding-top: .3rem;
  border-top: 1px solid rgba(26,54,93,.10);
  margin-top: .15rem;
  font-size: .60rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(26,54,93,.55);
}
.lva-count {
  font-family: var(--lva-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lva-count.lva-over {
  color: var(--lva-red);
  font-weight: 600;
}

.lva-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── phone: a bottom sheet ─────────────────────────────────────────────── */
/* CO-03 DESIGN-3, DESIGN-8 — below 820 the labelled pill sat over the copy and
   over the footer's last row. It collapses to a 52px circular mark that clears
   the home indicator, and the label moves to the accessible name. */
@media (max-width:820px) {
  .lva-launch {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom,0px));
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    gap: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .lva-launch .lva-launch-txt {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .lva-launch .lva-ico {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }
}

@media (max-width:640px) {
  .lva-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: min(86vh,640px);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(24px);
  }
  .lva-head {
    padding: .9rem 3rem .8rem 1rem;
  }
  .lva-log,
  .lva-sugg,
  .lva-form,
  .lva-foot {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .lva-turn {
    max-width: 100%;
  }
}

@media (min-width:641px) {
  .lva-veil {
    display: none;
  }
}

/* ── reduced motion: the boards' own switch, and the system one ────────── */
@media (prefers-reduced-motion:reduce) {
  .lva-launch,
  .lva-veil,
  .lva-panel,
  .lva-x,
  .lva-chip,
  .lva-send,
  .lva-hand {
    transition: none;
  }
  .lva-panel {
    transform: none;
  }
}
.reduced .lva-launch,
.reduced .lva-veil,
.reduced .lva-panel,
.reduced .lva-x,
.reduced .lva-chip,
.reduced .lva-send,
.reduced .lva-hand {
  transition: none;
}
.reduced .lva-panel {
  transform: none;
}

@media print {
  .lva {
    display: none;
  }
}
