/* ============================================
   ExpSoft — Help pages (user guides)
   Loaded AFTER style.css; uses its tokens (--blue, --cyan, --navy, --radius...).
   Deploy once at the site root, next to style.css.
   Layout: sticky table of contents on the left (desktop), collapsible on top (mobile).
   ============================================ */

.help-hero {
  padding: 128px 0 40px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.help-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.help-breadcrumb a { color: var(--text-muted); }
.help-breadcrumb a:hover { color: var(--blue); }
.help-breadcrumb span { padding: 0 8px; opacity: 0.5; }
.help-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 12px;
}
.help-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 760px;
}
.help-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.help-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--navy);
}
.help-pill.accent { background: var(--gradient); color: #FFF; border: none; }

/* ---- two-column layout ---- */
.help-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  padding-top: 48px;      /* top/bottom only: the side padding belongs to .container (16px on phones) */
  padding-bottom: 80px;
  align-items: start;
}
.help-toc {
  position: sticky;
  top: 96px;
  font-size: 0.9rem;
}
.help-toc details { border: none; }
.help-toc summary {
  list-style: none;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  cursor: default;
}
.help-toc summary::-webkit-details-marker { display: none; }
.help-toc ol { list-style: none; border-left: 2px solid var(--border); }
.help-toc li a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text);
}
.help-toc li a:hover { color: var(--blue); border-left-color: var(--cyan); }
.help-toc li.sub a { padding-left: 30px; font-size: 0.85rem; color: var(--text-muted); }

.help-content { min-width: 0; }
.help-content > section { margin-bottom: 56px; scroll-margin-top: 96px; }
.help-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}
.help-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 22px 0 8px; }
.help-content p { margin-bottom: 12px; }
.help-content ul, .help-content ol.plain { margin: 0 0 14px 22px; }
.help-content li { margin: 4px 0; }
.help-content code, .help-content kbd {
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-muted);
  border-radius: 6px;
  padding: 1px 6px;
}
.help-content kbd {
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: #FFF;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- step cards ---- */
.help-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 28px;
  scroll-margin-top: 96px;
}
.help-step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.help-step-num {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFF;
  background: var(--gradient);
  border-radius: 999px;
  padding: 5px 12px;
}
.help-step-head h3 { margin: 0; font-size: 1.2rem; }

/* ---- figures with a numbered legend ---- */
.help-figure { margin: 18px 0 8px; }
.help-figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.help-figure figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}
.help-legend {
  list-style: none;
  margin: 18px 0 16px;
  display: grid;
  gap: 10px;
}
.help-legend li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.help-legend .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--cyan);
  color: #FFF;
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.help-legend strong { color: var(--navy); }

/* ---- callouts ---- */
.help-callout {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  border-left: 4px solid var(--blue);
  background: #EEF4FF;
  font-size: 0.95rem;
}
.help-callout.tip { border-left-color: #10B981; background: #ECFDF5; }
.help-callout.warn { border-left-color: #F59E0B; background: #FFFBEB; }
.help-callout strong:first-child { color: var(--navy); }

/* ---- guide cards (help home) ---- */
.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.help-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.help-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--cyan); color: var(--text); }
.help-card .kind { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.help-card h3 { margin: 6px 0; font-size: 1.1rem; color: var(--navy); }
.help-card p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* ---- tables (shortcuts) ---- */
.help-table-wrap { overflow-x: auto; margin: 14px 0; }
/* on a phone a wide table scrolls sideways inside its wrapper instead of squeezing every column */
.help-table-wrap .help-table { min-width: 620px; }
.help-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: var(--bg-card); }
.help-table th, .help-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.help-table th { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

/* ---- previous / next ---- */
.help-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.help-pager a { font-weight: 600; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .help-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .help-toc {
    position: static;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
  }
  .help-toc summary { cursor: pointer; margin-bottom: 0; }
  .help-toc details[open] summary { margin-bottom: 10px; }
  .help-toc summary::after { content: "  \25BE"; }
}
@media (max-width: 600px) {
  .help-hero { padding: 104px 0 28px; }
  .help-step { padding: 20px 16px; }
  .help-legend li { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .help-pager { flex-direction: column; }
}

/* ---- inline reference to a badge number, inside a sentence ---- */
.n-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: var(--blue);
  color: #FFF;
  font-size: 0.8em;
  font-weight: 800;
  vertical-align: 0.1em;
}
