/* Help panel (top-bar Help button), Attio's help pop-up (user, 2026-10-25): a floating panel pinned to the
   top right, header + search + Suggestions / Getting started cards + footer links. Markup: templates/_help_menu.html.
   Attio radii (12px panel/cards, 9px input, 8px rows): excluded in scripts/square_corners.py. */
#aiq-help-menu.aiq-help-menu {
  --ah-bg: #fff; --ah-ink: #101112; --ah-sub: rgba(0,0,0,.63); --ah-mute: rgba(0,0,0,.50); --ah-line: #EEEFF1;
  --ah-hover: #F6F7F7; --ah-box: rgba(0,0,0,.02); --ah-box-ring: rgba(0,0,0,.06); --ah-blue: #266DF0;
  --ah-sh: inset 0 0 0 1px #0000, 0 0 0 1px rgba(28,40,64,.04), 0 4px 8px -4px rgba(28,40,64,.12), 0 4px 12px -2px rgba(24,41,75,.16);
  position: fixed; top: 8px; right: 8px; bottom: auto; left: auto; width: 380px; max-width: calc(100vw - 16px);
  height: min(760px, calc(100vh - 16px)); z-index: var(--z-pop, 9000);
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: var(--ah-bg); color: var(--ah-ink); border: 0; border-radius: 12px; box-shadow: var(--ah-sh);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font: 500 14px/20px Inter, system-ui, sans-serif; letter-spacing: -0.07px; -webkit-font-smoothing: antialiased;
  animation: aiqPopRise .14s ease-out;
}
html[data-theme="dark"] #aiq-help-menu.aiq-help-menu {
  --ah-bg: #18191B; --ah-ink: #F1F2F3; --ah-sub: rgba(255,255,255,.60); --ah-mute: rgba(255,255,255,.45);
  --ah-line: rgba(255,255,255,.08); --ah-hover: rgba(255,255,255,.05); --ah-box: rgba(255,255,255,.04);
  --ah-box-ring: rgba(255,255,255,.08); --ah-blue: #4E8CFC;
  --ah-sh: 0 0 0 1px rgba(255,255,255,.08), 0 4px 8px -4px rgba(0,0,0,.5), 0 8px 24px -4px rgba(0,0,0,.55);
}
#aiq-help-menu.aiq-help-menu[hidden] { display: none; }
#aiq-help-menu :is(a, button) { font: inherit; letter-spacing: inherit; color: inherit; text-decoration: none; }

/* header: "Help" + ghost × */
#aiq-help-menu .ahp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 16px; flex: none; }
#aiq-help-menu .ahp-title { font: 600 16px/20px Inter, system-ui, sans-serif; }
#aiq-help-menu .ahp-x { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px;
  color: var(--ah-mute); cursor: pointer; font-size: 15px; }
#aiq-help-menu .ahp-x:hover { background: var(--ah-hover); color: var(--ah-ink); }

/* search: 32px input, inset ring, blue ring on focus */
#aiq-help-menu .ahp-search { margin: 0 16px 4px; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px; flex: none;
  border-radius: 9px; box-shadow: inset 0 0 0 1px var(--ah-box-ring); color: var(--ah-mute); cursor: text; }
#aiq-help-menu .ahp-search:focus-within { box-shadow: inset 0 0 0 1px var(--ah-blue), 0 0 0 2px color-mix(in srgb, var(--ah-blue) 16%, transparent); }
#aiq-help-menu .ahp-search i { font-size: 15px; flex: none; }
#aiq-help-menu .ahp-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0;
  font: 500 14px/20px Inter, system-ui, sans-serif; color: var(--ah-ink); }
#aiq-help-menu .ahp-search input::placeholder { color: var(--ah-mute); }
#aiq-help-menu .ahp-search input::-webkit-search-cancel-button { display: none; }

/* scrolling middle, fades at the bottom instead of a sliced edge */
#aiq-help-menu .ahp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 20px; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
#aiq-help-menu .ahp-h { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font: 600 13px/20px Inter, system-ui, sans-serif; padding: 18px 4px 6px; }
#aiq-help-menu .ahp-browse > .ahp-h:first-child { padding-top: 12px; }
/* "Take the tour": one plain row action beside the page name (was a big card + a list of step names) */
#aiq-help-menu .ahp-tour { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0;
  background: none; border-radius: 6px; cursor: pointer; font: 500 13px/1 Inter, system-ui, sans-serif; color: var(--ah-sub); }
#aiq-help-menu .ahp-tour:hover { background: var(--ah-hover); color: var(--ah-ink); }
#aiq-help-menu .ahp-tour i { font-size: 12px; }

/* questions: one hairline list, the answer opens in place (one at a time, tour.js) */
#aiq-help-menu .ahp-qa { display: flex; flex-direction: column; }
#aiq-help-menu .ahp-q { border-top: 1px solid var(--ah-line); }
#aiq-help-menu .ahp-qa > .ahp-q:first-child { border-top: 0; }
#aiq-help-menu .ahp-q summary, #aiq-help-menu .ahp-qlink { list-style: none; display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 4px; cursor: pointer; border-radius: 6px; color: var(--ah-ink); font: 500 13.5px/19px Inter, system-ui, sans-serif; }
#aiq-help-menu .ahp-q summary::-webkit-details-marker { display: none; }
#aiq-help-menu .ahp-q summary::after { content: ''; flex: none; width: 6px; height: 6px; margin: 6px 4px 0 auto;
  border-right: 1.5px solid var(--ah-mute); border-bottom: 1.5px solid var(--ah-mute); transform: rotate(45deg); }
#aiq-help-menu .ahp-q[open] summary::after { transform: rotate(225deg); margin-top: 9px; }
#aiq-help-menu .ahp-q summary:hover, #aiq-help-menu .ahp-qlink:hover { background: var(--ah-hover); }
#aiq-help-menu .ahp-q[open] summary { font-weight: 600; }
#aiq-help-menu .ahp-q p { margin: 0; padding: 0 28px 12px 4px; font: 500 13px/19px Inter, system-ui, sans-serif; color: var(--ah-sub); }
#aiq-help-menu .ahp-q p b { font-weight: 600; color: var(--ah-ink); }
#aiq-help-menu .ahp-tag { flex: none; margin-left: auto; padding: 0 6px; border-radius: 4px; background: var(--ah-box);
  box-shadow: inset 0 0 0 1px var(--ah-box-ring); font: 500 11px/18px Inter, system-ui, sans-serif; color: var(--ah-mute); white-space: nowrap; }
#aiq-help-menu .ahp-q summary:has(.ahp-tag)::after { margin-left: 4px; }

/* guides: plain icon rows */
#aiq-help-menu .ahp-links { display: flex; flex-direction: column; }
#aiq-help-menu .ahp-links a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 6px 4px; border-radius: 6px; color: var(--ah-ink); font-size: 13.5px; }
#aiq-help-menu .ahp-links a:hover { background: var(--ah-hover); }
#aiq-help-menu .ahp-links i { font-size: 15px; color: var(--ah-sub); width: 16px; text-align: center; flex: none; }
#aiq-help-menu .ahp-results { padding-top: 8px; }
#aiq-help-menu .ahp-results[hidden], #aiq-help-menu .ahp-browse[hidden], #aiq-help-menu .ahp-none[hidden], #aiq-help-menu [data-help-tab][hidden] { display: none; }
#aiq-help-menu .ahp-none { margin: 16px 4px; font-size: 14px; color: var(--ah-sub); }
#aiq-help-menu .ahp-none a { color: var(--ah-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--ah-line); }

/* footer: plain icon + label rows under a rule */
#aiq-help-menu .ahp-foot { flex: none; border-top: 1px solid var(--ah-line); padding: 6px 8px 8px; display: flex; flex-direction: column; }
#aiq-help-menu .ahp-foot a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--ah-ink); }
#aiq-help-menu .ahp-foot a:hover { background: var(--ah-hover); }
#aiq-help-menu .ahp-foot i { font-size: 15px; color: var(--ah-sub); width: 16px; text-align: center; }

@media (prefers-reduced-motion: reduce) { #aiq-help-menu.aiq-help-menu { animation: none; } }
