/* ============================================================
   HELP HUB STYLES
   ============================================================ */

/* Welcome / Hero */
.help-welcome {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.help-welcome h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.help-welcome p {
  font-size: 1.0625rem;
  color: var(--page-text-secondary);
  max-width: 38rem;
  margin: 0 auto;
  line-height: 1.7;
}

/* About / Benefits section */
.help-about-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.help-about-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.help-about-section > p {
  font-size: 1.0625rem;
  color: var(--page-text-secondary);
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.help-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.help-benefit-card {
  background: var(--card-bg);
  border: 0.0625rem solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow var(--transition-fast, 150ms ease), transform var(--transition-fast, 150ms ease);
}

.help-benefit-card:hover {
  box-shadow: var(--page-shadow-md);
  transform: translateY(-0.125rem);
}

.help-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--benefit-icon-bg);
  color: var(--benefit-icon-color);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.help-benefit-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--page-text);
}

.help-benefit-card p {
  font-size: 0.9375rem;
  color: var(--page-text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* Getting Started steps (hub) */
.help-steps-section {
  margin-bottom: 2.5rem;
}

.help-steps-section h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Category cards grid */
.help-categories-section h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.help-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.help-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--card-bg);
  border: 0.0625rem solid var(--card-border);
  border-radius: 0.75rem;
  text-decoration: none;
  text-align: center;
  transition: box-shadow var(--transition-fast, 150ms ease), transform var(--transition-fast, 150ms ease);
}

.help-category-card:hover {
  box-shadow: var(--page-shadow-md);
  transform: translateY(-0.125rem);
}

.help-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--benefit-icon-bg);
  color: var(--benefit-icon-color);
  font-size: 1.25rem;
}

.help-category-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--page-text);
  margin: 0;
}

.help-category-card p {
  font-size: 0.9375rem;
  color: var(--page-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   CONTACT SUPPORT FORM
   ============================================================ */
.help-contact-section {
  max-width: 36rem;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 0.0625rem solid var(--card-border);
  border-radius: 0.75rem;
}

.help-contact-section h2 {
  text-align: center;
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.help-contact-form .form-group {
  margin-bottom: 1rem;
}

.help-contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--page-text);
  margin-bottom: 0.375rem;
}

.help-contact-form input,
.help-contact-form select,
.help-contact-form textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  color: var(--contact-input-text);
  background: var(--contact-input-bg);
  border: 0.0625rem solid var(--contact-input-border);
  border-radius: 0.5rem;
  transition: border-color var(--transition-fast, 150ms ease);
  font-family: inherit;
  box-sizing: border-box;
}

.help-contact-form input:focus,
.help-contact-form select:focus,
.help-contact-form textarea:focus {
  outline: none;
  border-color: var(--retire-primary, #8A5A05);
  box-shadow: 0 0 0 0.1875rem var(--retire-focus-glow, rgba(47, 93, 80, 0.26));
}

.help-contact-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.help-contact-form .form-privacy {
  font-size: 0.8125rem;
  color: var(--page-text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.help-contact-form .form-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  min-height: 2.75rem;
  background-color: var(--help-cta-bg);
  background-image: var(--help-cta-grad);
  color: var(--help-cta-text, #FFFDF9);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition-fast, 150ms ease);
}

.help-contact-form .form-submit-btn:hover {
  opacity: 0.9;
}

.help-contact-form .form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.help-contact-msg {
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-top: 1rem;
  display: none;
}

.help-contact-msg.success {
  display: block;
  background: var(--help-ok-bg);
  color: var(--help-ok-text);
  border: 0.0625rem solid var(--help-ok-border);
}

.help-contact-msg.error {
  display: block;
  background: var(--help-err-bg);
  color: var(--help-err-text);
  border: 0.0625rem solid var(--help-err-border);
}

/* Honeypot */
.help-contact-form .hp-field {
  position: absolute;
  left: -62.5rem;
  top: -62.5rem;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ============================================================
   FAQ ACCORDION (native <details>/<summary>)
   ============================================================ */
.faq-section {
  margin-bottom: 2.5rem;
}

.faq-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--page-text);
}

.faq-item {
  border: 0.0625rem solid var(--page-border);
  border-radius: 0.625rem;
  margin-bottom: 0.625rem;
  overflow: hidden;
  transition: background var(--transition-fast, 150ms ease), border-color var(--transition-fast, 150ms ease);
}

.faq-item[open] {
  background: var(--retire-amber-wash, rgba(245, 158, 11, 0.14));
  border-color: rgba(245, 158, 11, 0.34);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--page-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  display: none;
  content: '';
}

.faq-item summary::before {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.625rem;
  color: var(--sidebar-chevron);
  transition: transform var(--transition-fast, 150ms ease);
  flex-shrink: 0;
  width: 0.75rem;
  text-align: center;
}

.faq-item[open] summary::before {
  transform: rotate(90deg);
}

.faq-item .faq-answer {
  padding: 0 1.25rem 1rem 2.75rem;
  font-size: 0.9375rem;
  color: var(--page-text-secondary);
  line-height: 1.65;
}

/* ============================================================
   MOBILE SIDEBAR TOGGLE
   ============================================================ */
.sidebar-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  min-height: 2.75rem;
  background-color: var(--help-cta-bg);
  background-image: var(--help-cta-grad);
  color: var(--help-cta-text, #FFFDF9);
  border: none;
  border-radius: 50%;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast, 150ms ease);
}

.sidebar-toggle:hover {
  transform: scale(1.05);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--page-overlay);
}

.sidebar-backdrop.open {
  display: block;
}

.workflow-sidebar.open {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 100vh;
  box-shadow: 0.25rem 0 1rem rgba(0, 0, 0, 0.3);
}

/* ============================================================
   THEME TOGGLE (floating) — RETIRED 2026-07-24
   ============================================================
   js/help-sidebar.js still injects #themeToggle.help-theme-toggle as a
   bottom-right bubble. Every routed help/workflow page now embeds the shared
   header (SHARED_DASHBOARD/js/header-embed.js), which owns the canonical
   theme toggle, so the bubble was a second competing control sitting on top of
   the page content. Suppressed here rather than in help-sidebar.js so the
   injected button stays harmless if a page ever ships without the shared
   header. Kept as a styled rule (not deleted) so the intent is legible. */
.help-theme-toggle {
  display: none !important;
}

/* ============================================================
   SCREEN READER ONLY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--retire-accent-ink, #8A5A05);
  color: var(--help-cta-text, #FFFDF9);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.375rem;
  z-index: 999;
}

/* ============================================================
   DESKTOP RESPONSIVE
   ============================================================ */
@media (min-width: 48rem) {
  .workflow-sidebar {
    display: block;
  }

  .sidebar-toggle {
    display: none;
  }

  .workflow-main {
    padding: 2rem 2.5rem;
  }

  .help-welcome h1 {
    font-size: 2.5rem;
  }
}

/* ============================================================
   "OPEN THIS TOOL" LAUNCH CTA (injected by help-sidebar.js)
   Turns a workflow guide page into a launcher for the real app
   page it documents. rem-only, on-brand amber, 2.75rem touch target.
   ============================================================ */
.wf-open-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding: 0.625rem 1.125rem;
  min-height: 2.75rem;
  border-radius: 0.5rem;
  background: var(--retire-accent, #F59E0B);
  color: var(--retire-on-accent, #1F2937);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.wf-open-tool:hover { background: var(--retire-accent-dark, #D97706); }
.wf-open-tool:focus-visible { outline: 0.125rem solid var(--retire-focus, #2F5D50); outline-offset: 0.125rem; }
