body.jevix-landing {
  --help-paper: #fafbf6;
  --help-ink: #202d24;
  --help-muted: #516258;
  --help-line: #dbe2d6;
  --help-soft: #edf2e9;
  --help-accent: #244c3b;
  --help-on-accent: #fbfff9;
  --help-user: #254d3d;
  --help-on-user: #fbfff9;
  --help-danger: #922e2e;
  --help-edge: clamp(14px, 3vw, 34px);
}

html[data-theme="dark"] body.jevix-landing {
  --help-paper: #1d2922;
  --help-ink: #eff5ec;
  --help-muted: #b3c3b7;
  --help-line: #45554a;
  --help-soft: #28392f;
  --help-accent: #c4dda9;
  --help-on-accent: #17261c;
  --help-user: #395846;
  --help-on-user: #f5fbef;
  --help-danger: #ffc2b5;
}

html:has(.help-dialog[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

body.jevix-landing .help-open {
  position: fixed;
  z-index: 40;
  inset-inline-end: max(var(--help-edge), env(safe-area-inset-right));
  inset-block-end: max(var(--help-edge), env(safe-area-inset-bottom));
  display: grid;
  inline-size: 44px;
  block-size: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--help-accent) 76%, #fff);
  border-radius: 50%;
  color: var(--help-on-accent);
  background: var(--help-accent);
  box-shadow: 0 14px 36px #17281f35, inset 0 1px 0 #ffffff3f;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.22,.75,.25,1), box-shadow 220ms ease;
}

body.jevix-landing .help-open[hidden],
.help-dialog [hidden] {
  display: none;
}

html:has(.help-dialog[open]) body.jevix-landing .help-open {
  opacity: 0;
}

.help-open svg,
.help-dialog svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.help-dialog {
  position: fixed;
  inset: auto max(var(--help-edge), env(safe-area-inset-right))
    calc(max(var(--help-edge), env(safe-area-inset-bottom)) + var(--help-keyboard-offset, 0px)) auto;
  width: min(430px, calc(100% - 2 * var(--help-edge)));
  height: min(600px, calc(var(--help-viewport-height, 100dvh) - 2 * var(--help-edge)));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--help-line);
  border-radius: 25px;
  corner-shape: squircle;
  color: var(--help-ink);
  background: var(--help-paper);
  box-shadow: 0 28px 68px #101c1660;
  font: 500 .875rem/1.55 Manrope, system-ui, sans-serif;
}

.help-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.help-dialog-morph {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.help-dialog-morph[open] {
  display: block;
}

.help-surface {
  position: absolute;
  inset: 0;
  border: 1px solid var(--help-line);
  border-radius: inherit;
  background: var(--help-paper);
  box-shadow: 0 28px 68px #101c1660;
  overflow: hidden;
  pointer-events: none;
  transform-origin: 0 0;
}

html[data-glass="full"] .help-surface {
  background: color-mix(in srgb, var(--help-paper) 94%, transparent);
}

.help-sheen {
  position: absolute;
  inset: -18% auto -18% -55%;
  width: 46%;
  background: linear-gradient(90deg, transparent, #ffffffb3 48%, transparent);
  opacity: 0;
}

.help-wave {
  position: absolute;
  inset: 0 auto auto 0;
  width: 44px;
  height: 44px;
  border: 1.5px solid color-mix(in srgb, var(--help-accent) 70%, #fff);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.help-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: inherit;
}

.help-dialog:is([data-opening], [data-closing]) .help-panel {
  pointer-events: none;
}

.help-dialog:is([data-opening], [data-closing]) .help-mark {
  visibility: hidden;
}

.help-morph-icon {
  position: absolute;
  z-index: 1;
  inset: 0 auto auto 0;
  opacity: 0;
  pointer-events: none;
}

.help-dialog::backdrop {
  background: #101c14;
  opacity: .32;
  transition: opacity 240ms ease;
}

.help-dialog[data-closing]::backdrop {
  opacity: 0;
}

@starting-style {
  .help-dialog[open]::backdrop {
    opacity: 0;
  }
}

.help-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-block-end: 1px solid var(--help-line);
}

.help-mark,
.help-morph-icon {
  display: grid;
  flex: none;
  inline-size: 39px;
  block-size: 39px;
  place-items: center;
  border-radius: 13px;
  background: var(--help-accent);
  color: var(--help-on-accent);
}

.help-head h2 {
  margin: 0 auto 0 0;
  font: 650 1rem/1.2 Manrope, system-ui, sans-serif;
  letter-spacing: -.02em;
}

.help-head .help-icon-button,
.help-compose .help-icon-button {
  display: grid;
  flex: none;
  inline-size: 42px;
  block-size: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--help-line);
  border-radius: 14px;
  background: var(--help-paper);
  color: var(--help-ink);
  cursor: pointer;
}

.help-head .help-icon-button:disabled,
.help-compose .help-icon-button:disabled {
  cursor: default;
  opacity: .48;
}

.help-conversation {
  min-width: 0;
  padding: 19px 16px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.help-intro {
  margin: 0 0 13px;
  color: var(--help-muted);
}

.help-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.help-suggestions button {
  min-block-size: 40px;
  padding: 6px 11px;
  border: 1px solid var(--help-line);
  border-radius: 999px;
  background: transparent;
  color: var(--help-ink);
  font-size: .75rem;
  cursor: pointer;
}

.help-messages {
  display: grid;
  gap: 11px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.help-message {
  max-inline-size: 92%;
  justify-self: start;
  padding: 10px 13px;
  border-radius: 17px 17px 17px 5px;
  background: var(--help-soft);
  overflow-wrap: anywhere;
}

.help-message-user {
  justify-self: end;
  border-radius: 17px 17px 5px 17px;
  background: var(--help-user);
  color: var(--help-on-user);
}

.help-message p {
  margin: 0;
  white-space: pre-wrap;
}

body.jevix-landing .help-message-assistant a {
  color: var(--help-accent);
  text-decoration: underline;
  text-underline-offset: .15em;
}

.help-compose {
  padding: 9px 16px 15px;
  border-block-start: 1px solid var(--help-line);
}

.help-status {
  margin: 0 0 7px;
  color: var(--help-muted);
  font-size: .77rem;
}

.help-status:empty {
  display: none;
}

.help-status-error {
  color: var(--help-danger);
}

.help-controls {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.help-controls textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--help-line);
  border-radius: 13px;
  resize: none;
  background: var(--help-soft);
  color: var(--help-ink);
  font: inherit;
  font-size: 16px;
}

.help-controls textarea::placeholder {
  color: var(--help-muted);
  opacity: 1;
}

.help-compose .help-send {
  inline-size: 46px;
  block-size: 46px;
  border-color: var(--help-accent);
  color: var(--help-on-accent);
  background: var(--help-accent);
}

.help-dialog :is(button,textarea,.help-conversation):focus-visible {
  outline: 2px solid var(--help-accent);
  outline-offset: 2px;
}

.help-visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (hover: hover) {
  body.jevix-landing .help-open:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 38px #17281f55, inset 0 1px 0 #ffffff3f;
  }
  .help-head .help-icon-button:enabled:hover,
  .help-suggestions button:hover {
    background: var(--help-soft);
  }
}

body.jevix-landing .help-open:active {
  transform: scale(.91);
  transition-duration: 100ms;
}

@media (max-width: 600px) {
  .help-dialog {
    inset: auto 0 var(--help-keyboard-offset, 0px);
    width: 100%;
    height: min(635px, calc(var(--help-viewport-height, 100dvh) - 10px));
    padding-block-end: env(safe-area-inset-bottom);
    border-radius: 24px 24px 0 0;
  }
}

@media (max-height: 390px) {
  .help-head { padding: 8px 13px; }
  .help-compose { padding-block-end: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) body.jevix-landing .help-open {
    transform: none;
    transition: none;
  }
  html:not([data-motion="full"]) .help-dialog::backdrop {
    transition: none;
  }
}

html[data-motion="reduced"] body.jevix-landing .help-open {
  transform: none;
  transition: none;
}

html[data-motion="reduced"] .help-dialog::backdrop {
  transition: none;
}
