:root {
  --vm-help-navy: #102f46;
  --vm-help-ink: #18384d;
  --vm-help-muted: #607887;
  --vm-help-line: #d8e3e9;
  --vm-help-amber: #f3b43d;
  --vm-help-teal: #14766c;
  --vm-help-soft: #f4f8fa;
}

body.vm-help-is-open { overflow: hidden; }

.vm-help-launcher {
  position: fixed;
  z-index: 900;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border: 0;
  border-radius: 999px;
  color: var(--vm-help-navy);
  background: var(--vm-help-amber);
  box-shadow: 0 12px 32px rgba(16, 47, 70, .28);
  cursor: pointer;
  font: 750 14px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}

.vm-help-launcher svg { width: 20px; height: 20px; }

.vm-help-backdrop {
  position: fixed;
  z-index: 950;
  inset: 0;
  background: rgba(8, 28, 41, .42);
  opacity: 0;
  transition: opacity .18s ease;
}

.vm-help-backdrop.is-open { opacity: 1; }

.vm-help-drawer {
  position: fixed;
  z-index: 960;
  top: 0;
  right: 0;
  display: grid;
  width: min(470px, 100vw);
  height: 100dvh;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  color: var(--vm-help-ink);
  background: #fff;
  box-shadow: -18px 0 60px rgba(16, 47, 70, .26);
  transform: translateX(104%);
  transition: transform .22s ease;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.vm-help-drawer.is-open { transform: translateX(0); }

.vm-help-drawer *,
.vm-help-drawer *::before,
.vm-help-drawer *::after { box-sizing: border-box; }

.vm-help-drawer button,
.vm-help-drawer input,
.vm-help-drawer textarea { font: inherit; }

.vm-help-drawer button { color: inherit; }

.vm-help-drawer :focus-visible,
.vm-tool-context-help:focus-visible {
  outline: 3px solid rgba(29, 110, 234, .4);
  outline-offset: 2px;
}

.vm-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 20px 16px;
  color: #fff;
  background: var(--vm-help-navy);
}

.vm-help-brand { display: flex; align-items: center; gap: 11px; }

.vm-help-brand__mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--vm-help-navy);
  background: var(--vm-help-amber);
  font-size: 17px;
  font-weight: 900;
}

.vm-help-brand strong,
.vm-help-brand span { display: block; }
.vm-help-brand strong { font-size: 16px; }
.vm-help-brand span { color: #bed2dc; font-size: 11px; }

.vm-help-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  color: #fff !important;
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 22px !important;
}

.vm-help-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 20px;
  border-bottom: 1px solid var(--vm-help-line);
}

.vm-help-tab {
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 750 !important;
}

.vm-help-tab[aria-selected="true"] {
  color: var(--vm-help-teal);
  border-bottom-color: var(--vm-help-teal);
}

.vm-help-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.vm-help-panel { padding: 20px; }

.vm-help-context {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 17px;
  padding: 12px 13px;
  border-radius: 10px;
  color: #315568;
  background: #e9f4f3;
  font-size: 12px;
}

.vm-help-context::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--vm-help-teal);
}

.vm-help-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin-bottom: 18px;
}

.vm-help-search input,
.vm-help-question textarea {
  width: 100%;
  border: 1px solid #bbcbd4;
  border-radius: 10px;
  color: var(--vm-help-ink);
  background: #fff;
}

.vm-help-search input { min-height: 44px; padding: 10px 12px; }

.vm-help-search button,
.vm-help-question button,
.vm-help-primary-action {
  min-height: 44px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--vm-help-navy);
  background: var(--vm-help-amber);
  cursor: pointer;
  font-weight: 800 !important;
}

.vm-help-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin: 20px 0 10px;
}

.vm-help-section-title h3 { margin: 0; font-size: 15px; }
.vm-help-section-title span { color: var(--vm-help-muted); font-size: 11px; }

.vm-help-cards { display: grid; gap: 8px; }

.vm-help-card {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--vm-help-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.vm-help-card:hover { border-color: #a9c0cc; background: var(--vm-help-soft); }
.vm-help-card strong,
.vm-help-card span { display: block; }
.vm-help-card strong { margin-bottom: 3px; font-size: 13px; }
.vm-help-card span { color: var(--vm-help-muted); font-size: 11px; }

.vm-help-video-index {
  margin-top: 22px;
  padding-top: 2px;
  border-top: 1px solid var(--vm-help-line);
}

.vm-help-video-index__heading {
  margin-top: 16px;
}

.vm-help-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.vm-help-video-card {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #d5e0e6;
  border-radius: 9px;
  color: var(--vm-help-ink);
  background: #fff;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.vm-help-video-card:hover {
  border-color: #cf382f;
  background: #fff8f7;
  transform: translateY(-1px);
}

.vm-help-video-card > svg {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  padding: 4px;
  border-radius: 50%;
  color: #fff;
  background: #d83b32;
}

.vm-help-video-card > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.vm-help-video-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.vm-help-video-card small {
  color: var(--vm-help-muted);
  font-size: 10px;
  line-height: 1;
}

.vm-help-empty {
  padding: 18px;
  border: 1px dashed #b8cbd4;
  border-radius: 10px;
  color: var(--vm-help-muted);
  background: var(--vm-help-soft);
  text-align: center;
}

.vm-help-article-back {
  padding: 0;
  border: 0;
  color: var(--vm-help-teal) !important;
  background: none;
  cursor: pointer;
  font-weight: 750 !important;
}

.vm-help-article h2 {
  margin: 18px 0 8px;
  color: var(--vm-help-ink);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.vm-help-article__summary { margin: 0 0 24px; color: var(--vm-help-muted); }

.vm-help-video-link {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 22px;
  padding: 13px 14px;
  border: 2px solid #cf382f;
  border-radius: 11px;
  color: #fff;
  background: var(--vm-help-navy);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.vm-help-video-link:hover {
  border-color: #e14a40;
  background: #17445f;
  transform: translateY(-1px);
}

.vm-help-video-link > svg {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 7px;
  border-radius: 50%;
  color: #fff;
  background: #d83b32;
}

.vm-help-video-link__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.vm-help-video-link__copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.vm-help-video-link__copy > span {
  color: #cfdee6;
  font-size: 11px;
  line-height: 1.35;
}

.vm-help-video-link__arrow {
  margin-left: auto;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.vm-help-article section { padding: 18px 0; border-top: 1px solid var(--vm-help-line); }
.vm-help-article section h3 { margin: 0 0 9px; font-size: 16px; }
.vm-help-article section p { margin: 0 0 10px; color: #395b6e; }
.vm-help-article ul,
.vm-help-article ol { margin: 10px 0; padding-left: 22px; }
.vm-help-article li { margin: 7px 0; }

.vm-help-tip {
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid var(--vm-help-teal);
  border-radius: 0 8px 8px 0;
  background: #e9f4f3;
  font-size: 12px;
}

.vm-help-warning { border-left-color: #d88e09; background: #fff4dd; }

.vm-help-full-guide {
  display: inline-flex;
  margin-top: 14px;
  color: var(--vm-help-teal);
  font-weight: 750;
  text-decoration: none;
}

.vm-help-ai-intro {
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 12px;
  color: #fff;
  background: var(--vm-help-navy);
}

.vm-help-ai-intro strong { display: block; margin-bottom: 4px; }
.vm-help-ai-intro p { margin: 0; color: #c8dae3; font-size: 12px; }

.vm-help-ai-status {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e6cf9b;
  border-radius: 9px;
  color: #6c4c11;
  background: #fff8e8;
  font-size: 12px;
}

.vm-help-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.vm-help-prompt {
  padding: 7px 9px;
  border: 1px solid var(--vm-help-line);
  border-radius: 999px;
  color: #36596b !important;
  background: #fff;
  cursor: pointer;
  font-size: 11px !important;
}

.vm-help-messages { display: grid; gap: 11px; margin-bottom: 16px; }

.vm-help-message {
  max-width: 93%;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--vm-help-soft);
}

.vm-help-message--user {
  justify-self: end;
  color: #fff;
  background: var(--vm-help-teal);
}

.vm-help-message--assistant { justify-self: start; }
.vm-help-message strong { display: block; margin-bottom: 5px; }
.vm-help-message p { margin: 0 0 8px; }
.vm-help-message p:last-child { margin-bottom: 0; }
.vm-help-message ol { margin: 8px 0; padding-left: 20px; }
.vm-help-message li { margin: 5px 0; }

.vm-help-answer-links,
.vm-help-answer-actions,
.vm-help-answer-feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.vm-help-answer-links button,
.vm-help-answer-actions button,
.vm-help-answer-feedback button {
  padding: 6px 8px;
  border: 1px solid #bbccd5;
  border-radius: 7px;
  color: var(--vm-help-teal) !important;
  background: #fff;
  cursor: pointer;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.vm-help-answer-actions button { color: var(--vm-help-navy) !important; background: #fff6e2; border-color: #e8c677; }

.vm-help-question {
  position: sticky;
  bottom: -20px;
  padding: 12px 0 4px;
  background: linear-gradient(to top, #fff 82%, rgba(255,255,255,0));
}

.vm-help-question textarea {
  display: block;
  min-height: 86px;
  padding: 11px 12px;
  resize: vertical;
}

.vm-help-question__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.vm-help-question__actions span { color: var(--vm-help-muted); font-size: 10px; }
.vm-help-question button[disabled] { opacity: .55; cursor: wait; }

.vm-help-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  border-top: 1px solid var(--vm-help-line);
  color: var(--vm-help-muted);
  background: #fff;
  font-size: 11px;
}

.vm-help-footer a { color: var(--vm-help-teal); font-weight: 750; text-decoration: none; }

.vm-tool-context-help {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(65, 97, 127, .22);
  border-radius: 999px;
  color: #48647d;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 1px 2px rgba(31, 57, 82, .06);
  cursor: pointer;
  padding: 0;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.vm-tool-context-help:hover {
  border-color: rgba(40, 91, 142, .38);
  color: #245782;
  background: #fff;
  box-shadow: 0 3px 8px rgba(31, 57, 82, .1);
  transform: translateY(-1px);
}

.vm-tool-context-help:focus-visible {
  outline: 2px solid rgba(18, 103, 213, .72);
  outline-offset: 2px;
}

.tool-panel-actions {
  min-width: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.tool-panel-header > .tool-panel-actions {
  min-width: 0;
  flex: 0 0 auto;
}

.vm-panel-action-icon {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .vm-help-launcher { right: 14px; bottom: 14px; }
  .vm-help-drawer { width: 100vw; }
}

@media (max-width: 390px) {
  .vm-help-video-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .vm-help-backdrop,
  .vm-help-drawer { transition: none; }
}
