/* help.css — Client User Guide layout + inline UI mockups. */

/* -- Help-page-only topbar tweaks ---------------------------------------- */
/* Hide the notification bell on the help pages — the manual is reference
   content, not an operational surface. Nothing to drill down into from here. */
.notif-bell-btn { display: none !important; }

/* -- Sticky chrome (help page only) -------------------------------------- */
/* The topbar, breadcrumbs, and TOC sidebar stay anchored while the long
   content scrolls. Height budget: topbar = 64px, breadcrumbs ~= 44px. */
body { padding-top: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
}
.breadcrumbs {
  position: sticky;
  top: 64px;
  z-index: 25;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

/* -- Layout shell -------------------------------------------------------- */
.help-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 64px;
}

.help-toc {
  position: sticky;
  top: 132px;             /* topbar 64 + breadcrumbs 44 + breathing room */
  align-self: start;
  max-height: calc(100vh - 156px);
  overflow-y: auto;
  padding-right: 4px;
}

.help-toc h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6b7280;
  margin-bottom: 10px;
  font-weight: 700;
}

.help-search-wrap { position: relative; margin-bottom: 14px; }
.help-search-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: #9ca3af;
}
#help-search {
  width: 100%;
  padding: 8px 10px 8px 32px;
  font: inherit; font-size: 13px;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#help-search:focus {
  outline: none;
  border-color: #4f6ef7;
  box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}

.help-toc nav { display: flex; flex-direction: column; gap: 2px; }
.help-toc nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #4b5563;
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.12s, color 0.12s;
}
.help-toc nav a:hover { background: #f0f2f8; color: #1a1d2e; }
.help-toc nav a.active {
  background: rgba(79,110,247,0.08);
  color: #3a5bbf;
  font-weight: 600;
}
.help-toc nav a.hidden { display: none; }
.help-toc .toc-num {
  display: inline-flex;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: #edf0f7;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-toc nav a.active .toc-num { background: #4f6ef7; color: #fff; }

.help-empty {
  padding: 12px 10px;
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
  display: none;
}

/* -- Content ------------------------------------------------------------- */
.help-content { min-width: 0; }

.help-hero {
  background: linear-gradient(135deg, #4f6ef7 0%, #6b7fe8 100%);
  color: #fff;
  border-radius: 16px;
  padding: 40px 44px;
  margin-bottom: 32px;
}
.help-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 40px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.help-hero .help-hero-sub {
  font-size: 15px;
  opacity: 0.9;
  max-width: 560px;
  line-height: 1.55;
}
.help-hero .help-hero-meta {
  font-size: 12px;
  margin-top: 20px;
  opacity: 0.75;
  letter-spacing: 0.3px;
}

.help-content section {
  scroll-margin-top: 128px;  /* clears sticky topbar (64) + breadcrumbs (44) + spacing */
  padding-top: 40px;
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
}
.help-content section:first-of-type { border-top: none; padding-top: 8px; margin-top: 0; }

.help-content h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 30px;
  line-height: 1.2;
  color: #1a1d2e;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.help-content h2 .h2-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #4f6ef7;
  text-transform: uppercase;
  background: rgba(79,110,247,0.1);
  padding: 4px 10px;
  border-radius: 6px;
  align-self: center;
}

.help-content .section-intro {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 680px;
}

.help-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1d2e;
  margin: 28px 0 10px;
}
.help-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: #3a5bbf;
  margin: 18px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.help-content p { font-size: 14.5px; line-height: 1.65; color: #374151; margin-bottom: 12px; max-width: 680px; }
.help-content p strong { color: #1a1d2e; font-weight: 700; }
.help-content ul, .help-content ol {
  margin: 4px 0 16px 24px; padding: 0;
  font-size: 14.5px; line-height: 1.7; color: #374151;
}
.help-content li { margin-bottom: 6px; max-width: 660px; }
.help-content li::marker { color: #9ca3af; }
.help-content li strong { color: #1a1d2e; }

.help-content code, .help-content .inline-code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #f0f2f8;
  padding: 1px 6px;
  border-radius: 4px;
  color: #3a5bbf;
}

/* -- Callouts ------------------------------------------------------------ */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px;
  border-radius: 10px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.55;
  max-width: 700px;
}
.callout svg { flex-shrink: 0; margin-top: 1px; width: 18px; height: 18px; }
.callout strong { display: block; margin-bottom: 2px; font-size: 13px; letter-spacing: 0.3px; }

.callout-tip  { background: #e0f2f1; border-left: 4px solid #14b8a6; color: #134e4a; }
.callout-tip svg { color: #14b8a6; }
.callout-note { background: #e9ecff; border-left: 4px solid #4f6ef7; color: #1e2d7a; }
.callout-note svg { color: #4f6ef7; }
.callout-warn { background: #fff4e5; border-left: 4px solid #f59e0b; color: #92400e; }
.callout-warn svg { color: #f59e0b; }

/* -- Inline UI mockups --------------------------------------------------- */
.mockup {
  background: #f4f6fa;
  border: 1px solid #e2e6ef;
  border-radius: 12px;
  padding: 22px;
  margin: 20px 0;
  max-width: 700px;
}
.mockup-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.mock-card {
  background: #fff;
  border: 1px solid #e2e6ef;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.mock-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mock-icon.blue   { background: rgba(79,110,247,.1);  color: #4f6ef7; }
.mock-icon.red    { background: rgba(211,47,47,.1);   color: #d32f2f; }
.mock-icon.orange { background: rgba(245,124,0,.1);   color: #f57c00; }
.mock-icon.green  { background: rgba(22,163,74,.1);   color: #16a34a; }
.mock-icon svg { width: 20px; height: 20px; }
.mock-body { flex: 1; min-width: 0; }
.mock-title { font-size: 14px; font-weight: 600; color: #1a1d2e; margin-bottom: 2px; }
.mock-sub   { font-size: 12px; color: #6b7280; }
.mock-arrow { color: #9ca3af; flex-shrink: 0; }

.mock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}
.mock-badge.critical { background: rgba(211,47,47,.1);  color: #d32f2f; }
.mock-badge.high     { background: rgba(234,88,12,.1);  color: #ea580c; }
.mock-badge.medium   { background: rgba(245,158,11,.12); color: #b45309; }
.mock-badge.low      { background: rgba(22,163,74,.1);  color: #16a34a; }
.mock-badge.open     { background: rgba(79,110,247,.1); color: #3a5bbf; }
.mock-badge.review   { background: rgba(147,51,234,.1); color: #7c3aed; }
.mock-badge.closed   { background: #f0f2f8; color: #6b7280; }
.mock-badge.released { background: rgba(22,163,74,.1);  color: #16a34a; }
.mock-badge.planned  { background: #f0f2f8; color: #6b7280; }
.mock-badge.scheduled{ background: rgba(79,110,247,.1); color: #3a5bbf; }

.mock-table {
  width: 100%;
  font-size: 12.5px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  overflow: hidden;
}
.mock-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e6ef;
  background: #f9fafc;
}
.mock-table td { padding: 10px 12px; color: #374151; border-bottom: 1px solid #f0f2f8; }
.mock-table tr:last-child td { border-bottom: none; }
.mock-table .ref {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: #3a5bbf;
  font-weight: 600;
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.mock-opt {
  background: #fff;
  border: 1px solid #e2e6ef;
  border-radius: 10px;
  padding: 14px;
  display: flex; gap: 10px; align-items: center;
}
.mock-opt .mock-icon { width: 34px; height: 34px; border-radius: 8px; }
.mock-opt .mock-icon svg { width: 16px; height: 16px; }
.mock-opt-body .mock-title { font-size: 13px; }
.mock-opt-body .mock-sub { font-size: 11px; }

.mock-chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.mock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
}
.mock-btn.primary { background: #4f6ef7; color: #fff; }
.mock-btn.ghost   { background: transparent; color: #4f6ef7; border-color: #c5d4f5; }

/* Legend rows (Reference section) */
.legend-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
  align-items: center;
  font-size: 13.5px;
  max-width: 720px;
}
.legend-row:last-child { border-bottom: none; }
.legend-row .legend-key { display: flex; align-items: center; gap: 8px; }
.legend-row .legend-desc { color: #4b5563; line-height: 1.5; }

.glossary { max-width: 720px; }
.glossary dt { font-weight: 700; color: #1a1d2e; margin-top: 12px; font-size: 14px; }
.glossary dd { color: #4b5563; font-size: 13.5px; line-height: 1.55; margin-left: 0; }

/* -- Breadcrumbs trail mockup for section 2 ------------------------------ */
.mock-trail {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  padding: 8px 12px;
}
.mock-trail-crumb { color: #4f6ef7; font-weight: 500; }
.mock-trail-crumb.active { color: #1a1d2e; font-weight: 700; }
.mock-trail-sep { color: #cbd2e0; font-size: 11px; }

/* -- Mobile -------------------------------------------------------------- */
.help-toc-toggle {
  display: none;
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #4f6ef7;
  background: #fff;
  border: 1px solid #c5d4f5;
  border-radius: 8px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

@media (max-width: 960px) {
  .help-layout { grid-template-columns: 1fr; gap: 0; padding: 16px 20px 40px; }
  .help-toc {
    position: static;
    max-height: none;
    margin-bottom: 16px;
    display: none;
  }
  .help-toc.open { display: block; }
  .help-toc-toggle { display: flex; }
  .help-hero { padding: 28px 24px; }
  .help-hero h1 { font-size: 30px; }
  .help-content h2 { font-size: 24px; }
  .help-content h2 .h2-num { font-size: 10px; padding: 3px 8px; }
}

/* -- Print --------------------------------------------------------------- */
@media print {
  .topbar, .breadcrumbs, .help-toc, .help-toc-toggle, .site-footer { display: none !important; }
  .help-layout { display: block; max-width: 100%; padding: 0; }
  .help-hero { background: none !important; color: #000 !important; padding: 0 0 20pt 0 !important; border-bottom: 2pt solid #000; }
  .help-hero h1 { color: #000; }
  .help-hero .help-hero-sub, .help-hero .help-hero-meta { color: #555; }
  .help-content section { page-break-inside: avoid; }
  .callout { break-inside: avoid; }
  .mockup { break-inside: avoid; }
}
