.help-widget {
  --help-ink: #102641;
  --help-blue: #174f80;
  --help-line: #c8d6e3;
  font: 1rem/1.45 system-ui, sans-serif;
  color: var(--help-ink);
}
.help-widget [hidden] { display: none !important; }
.help-widget button, .help-widget input, .help-widget textarea { font: inherit; }
.help-widget button { cursor: pointer; }
.help-widget :focus-visible { outline: 3px solid #3187bf; outline-offset: 3px; }
.help-widget .help-launcher {
  position: fixed;
  z-index: 4;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  border: 1px solid #ffffff50;
  border-radius: 999px;
  padding: 10px 22px;
  background: var(--help-ink);
  color: white;
  box-shadow: 0 6px 24px #10264140;
  font-weight: 700;
}
.help-widget dialog {
  position: fixed;
  inset: auto 16px 16px auto;
  margin: 0;
  width: min(420px, calc(100% - 32px));
  max-height: min(680px, calc(100dvh - 32px));
  box-sizing: border-box;
  border: 1px solid var(--help-line);
  border-radius: 16px;
  padding: 0;
  background: white;
  color: var(--help-ink);
  box-shadow: 0 16px 64px #10264140;
}
.help-widget dialog::backdrop { background: #10264140; }
.help-widget header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  background: var(--help-ink);
  color: white;
}
.help-widget header span { color: #b8d8ef; font-size: .875rem; }
.help-widget h2 { margin: 4px 0 0; font-size: 1.3rem; }
.help-widget header button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #ffffff60;
  border-radius: 8px;
  background: transparent;
  color: white;
  font-size: 1.4rem;
}
.help-widget .help-content { padding: 20px; }
.help-widget label { display: block; margin-bottom: 5px; font-weight: 650; }
.help-widget input, .help-widget textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: white;
  color: var(--help-ink);
}
.help-widget textarea { resize: vertical; }
.help-widget .help-search > div { display: flex; gap: 8px; }
.help-widget .help-content button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--help-line);
  border-radius: 8px;
  background: #f1f6fb;
  color: var(--help-blue);
}
.help-widget .help-content button[type="submit"] {
  border-color: var(--help-blue);
  background: var(--help-blue);
  color: white;
}
.help-widget .help-results:not(:empty) { margin-top: 16px; }
.help-widget .help-results article { padding: 12px 0; border-bottom: 1px solid var(--help-line); }
.help-widget .help-content h3 { margin: 0 0 6px; font-size: 1rem; }
.help-widget .help-content p { margin: 0; font-size: .9rem; color: #40556a; }
.help-widget .help-content a { color: var(--help-blue); }
.help-widget nav, .help-widget .help-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; }
.help-widget nav a { padding-block: 8px; }
.help-widget .help-feedback form { display: grid; gap: 8px; }
.help-widget .help-feedback label { margin: 5px 0 0; }
.help-widget .help-back { margin-bottom: 14px; }
@media (max-width: 600px) {
  .help-widget dialog {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

.help-widget header {
  background: radial-gradient(ellipse at 85% 12%, #236a96, transparent 62%), #102641;
  padding: 24px 20px;
}
.help-widget .help-close:focus-visible { outline-color: #a8ddff; }
.help-widget .help-topics { margin-top: 20px; }
.help-widget .help-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.help-widget .help-topic-grid button { text-align: left; font-size: .9rem; font-weight: 650; }
.help-widget .help-topic-grid button[aria-pressed="true"] { background: #d9ebfb; border-color: #477eaf; }
.help-widget .help-quicklinks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; }
.help-widget .help-quicklinks a { display: inline-flex; min-height: 32px; align-items: center; font-size: .9rem; }
.help-widget .help-actions { border-top: 1px solid var(--help-line); padding-top: 12px; margin-top: 10px; gap: 6px; }
.help-widget .help-actions button { font-size: .85rem; padding-inline: 9px; }
.help-widget .help-results details { margin-top: 6px; padding: 0; border: 1px solid var(--help-line); border-radius: 8px; }
.help-widget .help-results summary { cursor: pointer; padding: 10px; font-size: .92rem; }
.help-widget .help-results details p { padding: 0 10px 11px; }
@media (prefers-reduced-motion: no-preference) {
  .help-widget dialog[open] { animation: help-enter .18s ease-out; }
  @keyframes help-enter { from { opacity: 0; transform: translateY(6px); } }
}

.help-widget .help-content .help-results {
  display:flex;flex-direction:column;gap:8px;margin:0 0 14px;
  max-height:min(38dvh,310px);overflow:auto;overscroll-behavior:contain;padding:2px;
}
.help-widget .help-content .chat-reply,.help-widget .help-content .chat-question {
  padding:10px 12px;max-width:94%;overflow-wrap:anywhere;
}
.help-widget .chat-reply {align-self:flex-start;background:#edf4fb;border-radius:4px 12px 12px 12px}
.help-widget .help-content .chat-question {align-self:flex-end;background:#174f80;color:white;border-radius:12px 4px 12px 12px}
.help-widget .chat-reply a {display:block;margin-top:6px;font-size:.82rem}
.help-widget .help-search > p {margin-bottom:6px;font-size:.8rem}

/* Messenger */
.help-widget dialog[open] { display:flex; flex-direction:column; height:min(660px, calc(100dvh - 32px)); overflow:hidden; }
.help-widget header { flex:none; align-items:center; padding:12px 16px; }
.help-widget .chat-identity { display:flex; align-items:center; gap:11px; }
.help-widget .chat-identity h2 { margin:0; font-size:1.08rem; }
.help-widget .chat-identity .chat-avatar {
  display:grid; place-items:center; width:39px; height:39px; border-radius:13px;
  color:#102641; background:#d9ecff; font-size:.95rem; font-weight:780;
}
.help-widget .help-content { display:flex; flex-direction:column; flex:1; min-height:0; padding:0; background:#f8fbff; }
.help-widget .help-home { display:flex; flex-direction:column; flex:1; min-height:0; }
.help-widget .help-content .help-results { flex:1; max-height:none; min-height:0; margin:0; padding:16px; gap:12px; }
.help-widget .help-content .chat-reply { background:#eaf2fc; line-height:1.5; }
.help-widget .help-content .chat-question { background:#174f80; line-height:1.5; }
.help-widget .chat-extras { flex:none; margin:0 14px; padding:6px 0; border-top:1px solid var(--help-line); }
.help-widget .chat-extras[open] { max-height:35dvh; overflow:auto; }
.help-widget .chat-extras summary { min-height:34px; padding:6px 3px; font-size:.88rem; }
.help-widget .chat-extras .help-topics { margin-top:3px; }
.help-widget .chat-extras #help-topics-title { font-size:.85rem; }
.help-widget .chat-extras .help-quicklinks { margin-top:3px; }
.help-widget .chat-extras .help-actions { margin-top:3px; padding-top:5px; }
.help-widget .help-search { flex:none; padding:9px 14px max(12px, env(safe-area-inset-bottom)); background:white; border-top:1px solid var(--help-line); }
.help-widget .help-search label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.help-widget .help-search > div { align-items:center; }
.help-widget .help-search input { min-height:48px; border-radius:15px; }
.help-widget .help-search button { width:46px; height:46px; flex:none; border-radius:50%; font-size:1.3rem; padding:0; }
.help-widget .help-search > p { margin:6px 0 0; font-size:.76rem; }
.help-widget .help-feedback { overflow:auto; padding:16px; }
@media(max-width:600px) {
  .help-widget dialog[open] { height:100dvh; padding-bottom:0; }
}

.help-widget .help-content {background:#f4f8fd}
.help-widget .help-content .help-results {padding:20px 16px;gap:15px}
.help-widget .help-content .chat-reply,
.help-widget .help-content .chat-question {width:fit-content;max-width:87%;padding:11px 14px}
.help-widget .help-content .chat-reply {background:white;color:#193650;border:1px solid #dce7f2}
.help-widget .help-content .chat-question {background:#174f80}
.help-widget .help-search > div {padding:4px;border:1px solid #ccdbea;border-radius:26px;background:#f7faff}
.help-widget .help-search input {background:transparent;border:0;min-height:42px;padding-left:10px}
.help-widget .help-search button {min-height:42px;width:42px;height:42px}
.help-widget .help-search button:disabled {background:#dfebf6;border-color:#dfebf6;color:#506984;cursor:default}
