/* ============================================================
   Market Insights — Help panel (Iter 25MX, MI-13). See mi-help.js.
   Dark like the rest of the site; a right-hand panel under the top
   bar on desktop/iPad, a bottom sheet on phones.
   ============================================================ */
.mi-help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; min-width: 30px; margin: 0 2px 0 4px; padding: 0;
  border-radius: 50%; border: 1.5px solid rgba(79, 152, 163, 0.65);
  background: rgba(79, 152, 163, 0.10); color: #e6edf3;
  font: 700 15px/1 'Inter', system-ui, sans-serif; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.mi-help-btn:hover, .mi-help-btn[aria-expanded="true"] { background: rgba(79, 152, 163, 0.24); border-color: #4F98A3; box-shadow: 0 0 0 3px rgba(79, 152, 163, 0.18); }
.mi-help-btn:focus-visible { outline: 2px solid #4F98A3; outline-offset: 2px; }

.mi-help-ov { position: fixed; inset: 0; z-index: 9590; background: rgba(5, 8, 12, 0.35); }
.mi-help-panel {
  --mh-bg: #151a20; --mh-raised: #1c232b; --mh-field: #0f1318; --mh-line: #2a313a; --mh-line-2: #2f3742;
  --mh-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --mh-ink: #e6edf3; --mh-ink-2: #a9b4bf; --mh-ink-3: #8b949e; --mh-accent: #4F98A3; --mh-accent-ink: #9fd3da; --mh-ai: #c4b5fd; --mh-ai-btn: #a78bfa;
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9600;
  width: 420px; max-width: 100%;
  display: flex; flex-direction: column;
  background: var(--mh-bg); color: var(--mh-ink); border-left: 1px solid var(--mh-line);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45);
  font: 14px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.mi-help-ov[hidden], .mi-help-panel[hidden] { display: none !important; }
.mi-help-panel *, .mi-help-panel *::before, .mi-help-panel *::after { box-sizing: border-box; }
.mi-help-panel button { font: inherit; color: inherit; }
.mi-help-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 8px; }
.mi-help-head h2 { flex: 1; margin: 0; font: 800 19px/1.2 'Inter Tight', 'Inter', sans-serif; letter-spacing: -0.01em; color: var(--mh-ink); }
.mi-help-x, .mi-help-back { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--mh-ink-3); font-size: 22px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mi-help-x:hover, .mi-help-back:hover { background: var(--mh-raised); color: var(--mh-ink); }
.mi-help-back[hidden] { display: none; }
.mi-help-search { padding: 4px 18px 10px; }
.mi-help-search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--mh-line-2); border-radius: 10px; padding: 0 12px; background: var(--mh-field); color: var(--mh-ink-3); }
.mi-help-search-box:focus-within { border-color: var(--mh-accent); }
.mi-help-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--mh-ink); font: 14px/1.4 var(--mh-font); padding: 10px 0; }
.mi-help-search-box input::placeholder { color: #6e7681; }
.mi-help-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; outline: 0; }
.mi-help-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--mh-line); }
.mi-help-foot a, .mi-help-foot button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--mh-accent); font: 600 12.5px/1.4 var(--mh-font); text-decoration: none; }
.mi-help-foot a:hover, .mi-help-foot button:hover { text-decoration: underline; }
.mi-help-muted { color: var(--mh-ink-3); margin: 0; font-size: 13px; }
.mi-help-muted a, .mi-help-prose a, .mi-help-all a { color: var(--mh-accent-ink); }

.mi-help-ask { border: 1px solid rgba(167, 139, 250, 0.45); background: linear-gradient(180deg, rgba(167, 139, 250, 0.10), rgba(167, 139, 250, 0.03)); border-radius: 12px; padding: 12px 14px; margin: 0; }
.mi-help-ask-t { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; color: var(--mh-ai); }
.mi-help-ask-in { margin-top: 10px; display: flex; gap: 8px; align-items: stretch; }
.mi-help-ask-in textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--mh-line-2); border-radius: 8px; padding: 8px 10px; background: var(--mh-field); color: var(--mh-ink); font: 13.5px/1.4 var(--mh-font); outline: 0; }
.mi-help-ask-in textarea:focus { border-color: var(--mh-ai-btn); }
.mi-help-ask-in textarea::placeholder { color: #6e7681; }
.mi-help-ask-go { flex: none; border: 0; border-radius: 8px; padding: 0 14px; background: var(--mh-ai-btn); color: #120c24 !important; font-weight: 700 !important; font-size: 13px; cursor: pointer; }
.mi-help-ask-go:hover { filter: brightness(1.08); }
.mi-help-ask-go:disabled { opacity: .55; cursor: default; }
.mi-help-ask-s { margin-top: 8px; font-size: 11.5px; color: var(--mh-ink-3); }

.mi-help-sec h3 { margin: 0 0 8px; font: 700 11px/1.2 var(--mh-font); letter-spacing: .07em; text-transform: uppercase; color: var(--mh-accent); }
.mi-help-list { display: flex; flex-direction: column; gap: 2px; }
.mi-help-it { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.mi-help-it:hover, .mi-help-it:focus-visible { background: var(--mh-raised); outline: 0; }
.mi-help-it svg { flex: none; margin-top: 2px; color: var(--mh-ink-3); }
.mi-help-it b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; color: var(--mh-ink); }
.mi-help-it small { display: block; font-size: 12px; line-height: 1.35; color: var(--mh-ink-3); margin-top: 2px; }
.mi-help-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mi-help-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--mh-line-2); border-radius: 999px; padding: 7px 12px; background: transparent; cursor: pointer; font-weight: 600 !important; font-size: 12.5px; color: var(--mh-ink); }
.mi-help-pill:hover { background: var(--mh-raised); }
.mi-help-pill.is-primary { border-color: rgba(79, 152, 163, 0.6); color: var(--mh-accent-ink); }
.mi-help-all { margin: 0; font-size: 12.5px; }

.mi-help-q { align-self: flex-end; max-width: 88%; margin-left: auto; background: #243040; border-radius: 12px 12px 2px 12px; padding: 9px 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.mi-help-a { margin-top: 10px; background: #1a2027; border: 1px solid var(--mh-line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.mi-help-a > p { margin: 0 0 8px; }
.mi-help-a.is-busy { color: var(--mh-ink-3); display: flex; align-items: center; gap: 10px; }
.mi-help-dots { display: inline-flex; gap: 4px; }
.mi-help-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mh-ai); animation: mi-help-dot 1s infinite ease-in-out; }
.mi-help-dots i:nth-child(2) { animation-delay: .15s; } .mi-help-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mi-help-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.mi-help-src { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.mi-help-src button { border: 1px solid rgba(79, 152, 163, 0.45); border-radius: 999px; padding: 5px 10px; background: transparent; color: var(--mh-accent-ink); font-weight: 600 !important; font-size: 11.5px; cursor: pointer; text-align: left; }
.mi-help-src button:hover { background: rgba(79, 152, 163, 0.12); }
.mi-help-left { margin-top: 8px; font-size: 11.5px; color: var(--mh-ink-3); }

.mi-help-art { display: flex; flex-direction: column; }
.mi-help-crumb { margin: 0 0 4px; font: 700 11px/1.2 var(--mh-font); letter-spacing: .07em; text-transform: uppercase; color: var(--mh-accent); }
.mi-help-art-title { margin: 0 0 8px; font: 800 18px/1.25 'Inter Tight', 'Inter', sans-serif; color: var(--mh-ink); }
.mi-help-prose { font-size: 13.5px; line-height: 1.55; color: #d5dde4; }
.mi-help-prose p { margin: 0 0 9px; }
.mi-help-prose ol, .mi-help-prose ul { margin: 0 0 9px; padding-left: 20px; }
.mi-help-prose li { margin: 3px 0; }
.mi-help-prose strong { color: var(--mh-ink); font-weight: 650; }
.mi-help-rate { margin: 6px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--mh-ink-3); }
.mi-help-rate button { border: 1px solid var(--mh-line-2); border-radius: 6px; padding: 3px 9px; background: transparent; cursor: pointer; font-size: 12px; color: var(--mh-ink-2); }
.mi-help-rate button:hover { border-color: var(--mh-accent); color: var(--mh-ink); }

/* Phones: a bottom sheet */
@media (max-width: 640px) {
  .mi-help-panel { top: auto !important; height: 88%; height: 88dvh; width: 100%; border-left: 0; border-top: 1px solid var(--mh-line); border-radius: 16px 16px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.5); }
  .mi-help-ov { top: 0 !important; }
  .mi-help-head { padding-top: 14px; }
  .mi-help-search-box input, .mi-help-ask-in textarea { font-size: 16px; }   /* no iOS zoom on focus */
}
@media (prefers-reduced-motion: reduce) { .mi-help-dots i { animation: none; opacity: .7; } }
@media (max-width: 640px) { html.mi-help-on { overflow: hidden; } }
