/* ============================================================
   help.css · PTHelp — the in-app Help Center / user guide.
   Reuses the app's theme tokens (var(--bg), --ink, --accent…)
   from app.css so it tracks light / blueprint. Two-pane layout:
   a categorized topic sidebar + a scrollable article pane, with a
   client-side search box on top. Self-contained; no images — all
   visual aids are inline SVG/CSS "mockups" (.hc-mock*).
   ============================================================ */

.hc-wrap {
  display: grid;
  grid-template-columns: 288px 1fr;
  gap: 0;
  align-items: start;
  min-height: calc(100vh - var(--hdr-h) - 8px);
}

/* ── Topic sidebar ── */
.hc-side {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100vh - var(--hdr-h) - 8px);
  overflow-y: auto;
  border-right: 1px solid var(--bd);
  padding: 18px 14px 40px;
  background: var(--bg);
}
.hc-side-hd { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0 4px 12px; }
.hc-side-hd i { color: var(--accent); }

.hc-search { position: relative; margin-bottom: 14px; }
.hc-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-size: 15px; pointer-events: none; }
.hc-search input {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--bd); border-radius: 9px;
  background: var(--bg2); color: var(--ink);
  font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.hc-search input:focus { outline: none; border-color: var(--accent); background: var(--bg); }

.hc-cat { margin-bottom: 6px; }
.hc-cat-hd {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-faint); padding: 12px 8px 5px; display: flex; align-items: center; gap: 6px;
}
.hc-cat-hd i { font-size: 13px; }
.hc-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 13px; color: var(--ink-soft); cursor: pointer;
  text-decoration: none; line-height: 1.25; border: 1px solid transparent;
}
.hc-link:hover { background: var(--bg2); color: var(--ink); }
.hc-link.on { background: var(--accent-bg); color: var(--accent); font-weight: 700; border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.hc-link .hc-num { font-size: 10.5px; font-weight: 700; color: var(--ink-faint); min-width: 14px; }
.hc-link.on .hc-num { color: var(--accent); }
.hc-noresults { padding: 14px 10px; font-size: 12.5px; color: var(--ink-faint); }

/* ── Article pane ── */
.hc-main { padding: 30px 40px 90px; max-width: 860px; }
.hc-crumb { font-size: 12px; color: var(--ink-faint); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.hc-crumb b { color: var(--ink-soft); font-weight: 700; }
.hc-art-h1 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 2px 0 10px; }
.hc-art-lead { font-size: 16px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 22px; }

.hc-h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 34px 0 12px; padding-top: 8px; border-top: 1px solid var(--bd); }
.hc-h2:first-of-type { border-top: none; padding-top: 0; }
.hc-h3 { font-size: 15.5px; font-weight: 700; margin: 22px 0 8px; }
.hc-p { font-size: 14.5px; color: var(--ink); line-height: 1.65; margin: 0 0 14px; }
.hc-p a, .hc-callout a { color: var(--accent); text-decoration: none; font-weight: 600; cursor: pointer; }
.hc-p a:hover, .hc-callout a:hover { text-decoration: underline; }

/* Numbered steps */
.hc-steps { counter-reset: hcstep; list-style: none; margin: 0 0 18px; padding: 0; }
.hc-steps > li {
  counter-increment: hcstep; position: relative;
  padding: 4px 0 14px 44px; margin: 0;
  font-size: 14.5px; line-height: 1.6; color: var(--ink);
}
.hc-steps > li::before {
  content: counter(hcstep); position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
.hc-steps > li::after {
  content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px;
  width: 1.5px; background: var(--bd);
}
.hc-steps > li:last-child::after { display: none; }
.hc-steps b { font-weight: 700; }

/* Plain bullet / check lists */
.hc-ul { list-style: none; margin: 0 0 16px; padding: 0; }
.hc-ul li { position: relative; padding: 4px 0 4px 24px; font-size: 14px; color: var(--ink); line-height: 1.55; }
.hc-ul li::before { content: ""; position: absolute; left: 6px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hc-ul.check li::before { content: "\ea5e"; font-family: "tabler-icons" !important; left: 0; top: 4px; width: auto; height: auto; background: none; color: var(--accent); font-size: 14px; }

/* Callouts: tip / warning / note */
.hc-callout {
  display: flex; gap: 11px; padding: 13px 16px; border-radius: 10px;
  margin: 0 0 18px; font-size: 13.5px; line-height: 1.55;
  border: 1px solid var(--bd); background: var(--bg2);
}
.hc-callout i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.hc-callout b { font-weight: 800; }
.hc-callout.tip { background: color-mix(in srgb, #16A34A 9%, var(--bg)); border-color: color-mix(in srgb, #16A34A 30%, var(--bd)); }
.hc-callout.tip i { color: #16A34A; }
.hc-callout.warn { background: color-mix(in srgb, #D97706 11%, var(--bg)); border-color: color-mix(in srgb, #D97706 32%, var(--bd)); }
.hc-callout.warn i { color: #D97706; }
.hc-callout.note { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); border-color: color-mix(in srgb, var(--accent) 26%, var(--bd)); }
.hc-callout.note i { color: var(--accent); }

/* Inline UI chips so labels read like the real buttons */
.hc-btn { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; vertical-align: baseline; }
.hc-btn.ghost { background: var(--bg2); color: var(--ink); border: 1px solid var(--bd); }
.hc-kbd { display: inline-block; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--bd); border-bottom-width: 2px; background: var(--bg2); font-size: 12px; font-weight: 700; font-family: ui-monospace, monospace; }
.hc-path { font-size: 13px; font-weight: 700; color: var(--ink); background: var(--bg2); border: 1px solid var(--bd); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.hc-path i { font-size: 11px; color: var(--ink-faint); margin: 0 2px; vertical-align: middle; }

/* Status pills used in the lifecycle diagrams */
.hc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; border: 1px solid var(--bd); background: var(--bg2); color: var(--ink-soft); }
.hc-pill.draft { color: var(--ink-soft); }
.hc-pill.blue { color: var(--accent); background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }
.hc-pill.green { color: #15803D; background: color-mix(in srgb, #16A34A 12%, var(--bg)); border-color: color-mix(in srgb, #16A34A 30%, transparent); }
.hc-pill.amber { color: #B45309; background: color-mix(in srgb, #D97706 14%, var(--bg)); border-color: color-mix(in srgb, #D97706 30%, transparent); }
.hc-pill.gray { color: var(--ink-faint); }

/* Lifecycle flow diagram (pills joined by arrows) */
.hc-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px; border: 1px solid var(--bd); border-radius: 12px; background: var(--bg2); margin: 0 0 20px; }
.hc-flow .hc-arrow { color: var(--ink-faint); font-size: 15px; }
.hc-flow .hc-step-lbl { font-size: 10.5px; color: var(--ink-faint); display: block; text-align: center; margin-top: 3px; }
.hc-flow-cell { text-align: center; }

/* Generic "mini app window" mock (mirrors explore.css .mock) */
.hc-mock { border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-md); margin: 0 0 20px; }
.hc-mock-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--bd); }
.hc-mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bd); }
.hc-mock-dot.r { background: #ec6a5e; } .hc-mock-dot.y { background: #f4bf4f; } .hc-mock-dot.g { background: #61c554; }
.hc-mock-title { font-size: 11.5px; color: var(--ink-faint); font-weight: 600; margin-left: 8px; }
.hc-mock-body { padding: 14px 16px; }

/* Simple key/value spec table used in several articles */
.hc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0 0 18px; }
.hc-table th, .hc-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--bd); vertical-align: top; }
.hc-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 800; }
.hc-table td:first-child { font-weight: 700; white-space: nowrap; }
.hc-table tr:last-child td { border-bottom: none; }

/* Article footer: prev / next + "was this helpful" */
.hc-art-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--bd); }
.hc-art-nav a { flex: 1; text-decoration: none; border: 1px solid var(--bd); border-radius: 10px; padding: 12px 16px; cursor: pointer; transition: border-color .15s; background: var(--bg); }
.hc-art-nav a:hover { border-color: var(--accent); }
.hc-art-nav .hc-nav-dir { font-size: 11px; color: var(--ink-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.hc-art-nav .hc-nav-ttl { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.hc-art-nav a.next { text-align: right; }
.hc-art-nav a.disabled { opacity: .35; pointer-events: none; }

/* Related-articles chips */
.hc-related { margin-top: 22px; }
.hc-related-hd { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 8px; }
.hc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--bd); font-size: 12.5px; color: var(--ink-soft); cursor: pointer; margin: 0 6px 6px 0; text-decoration: none; }
.hc-chip:hover { border-color: var(--accent); color: var(--accent); }

/* Home / landing grid when no article is picked */
.hc-home-hero { padding: 6px 0 8px; }
.hc-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.hc-home-card { border: 1px solid var(--bd); border-radius: 12px; padding: 16px 18px; cursor: pointer; transition: border-color .15s, transform .12s; background: var(--bg); }
.hc-home-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hc-home-card i { font-size: 22px; color: var(--accent); }
.hc-home-card h4 { font-size: 15px; font-weight: 700; margin: 9px 0 4px; }
.hc-home-card p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.hc-home-card .hc-hc-count { font-size: 11px; color: var(--ink-faint); margin-top: 8px; display: block; }

/* Mobile: collapse to a single column, sidebar becomes a scrolling list on top */
@media (max-width: 900px) {
  .hc-wrap { grid-template-columns: 1fr; }
  .hc-side { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--bd); }
  .hc-main { padding: 22px 18px 70px; }
}
