/* ============================================================
   HigherStack Forms — Help Center styles
   Docusaurus-style 3-column docs layout. Reuses the design tokens
   from landing.css (load landing.css first), so light/dark and brand
   colors stay in sync with the marketing site.
   ============================================================ */

.hc, .hc * { box-sizing: border-box; }
.hc {
  margin: 0;
  font-family: var(--font-ui, "Plus Jakarta Sans", system-ui, sans-serif);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.hc a { color: var(--accent); text-decoration: none; }
.hc a:hover { text-decoration: underline; }

/* ---- Top bar ---------------------------------------------------- */
.hc-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 0 20px;
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hc-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); }
.hc-logo img { width: 26px; height: 26px; border-radius: 7px; filter: none; }
.hc-logo b { font-family: var(--font-display); font-size: 16px; letter-spacing: -.01em; }
.hc-logo b span { color: var(--accent); }
.hc-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 3px 7px; border-radius: 6px; }
.hc-top-spacer { flex: 1; }
.hc-top-links { display: flex; align-items: center; gap: 4px; }
.hc-top-links a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 7px 11px; border-radius: 8px; }
.hc-top-links a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.hc-cta { color: var(--on-accent) !important; background: var(--accent); }
.hc-cta:hover { background: var(--accent-press); color: var(--on-accent) !important; }

.hc-searchbtn {
  display: flex; align-items: center; gap: 8px;
  min-width: 220px; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text-3); font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.hc-searchbtn:hover { border-color: var(--line-strong); }
.hc-searchbtn .k { margin-left: auto; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; }
.hc-iconbtn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--text-2); cursor: pointer; padding: 0;
}
.hc-iconbtn:hover { color: var(--text); border-color: var(--line-strong); }
.hc-menu { display: none; }

/* ---- Shell grid ------------------------------------------------- */
.hc-shell {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr) 232px;
  max-width: 1400px; margin: 0 auto;
  align-items: start;
}

/* ---- Sidebar ---------------------------------------------------- */
.hc-sidebar {
  position: sticky; top: 60px; align-self: start;
  height: calc(100vh - 60px); overflow-y: auto;
  padding: 26px 14px 60px 22px;
  border-right: 1px solid var(--line);
}
.hc-cat { margin-top: 22px; }
.hc-cat:first-child { margin-top: 4px; }
.hc-cat > .hc-cat-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-3); padding: 4px 10px; margin-bottom: 4px;
}
.hc-cat-h svg { width: 14px; height: 14px; opacity: .8; }
.hc-cat ul { list-style: none; margin: 0; padding: 0; }
.hc-cat li a {
  display: block; padding: 6px 10px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); line-height: 1.35;
}
.hc-cat li a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.hc-cat li a.active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
/* The mobile drawer scrim must never occupy a grid column on desktop. */
.hc-scrim { display: none; }

/* ---- Main column ------------------------------------------------ */
.hc-main { min-width: 0; padding: 30px 44px 90px; }
.hc-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.hc-crumbs a { color: var(--text-3); }
.hc-crumbs a:hover { color: var(--accent); }
.hc-crumbs .sep { opacity: .5; }

.hc-article { max-width: 780px; }
.hc-article h1 {
  font-family: var(--font-display); font-size: 2.15rem; line-height: 1.12;
  letter-spacing: -.022em; margin: 0 0 10px; color: var(--text);
}
.hc-lede { font-size: 1.15rem; line-height: 1.6; color: var(--text-2); margin: 0 0 30px; }
.hc-article h2 {
  font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.015em;
  margin: 42px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text);
  scroll-margin-top: 78px;
}
.hc-article h3 { font-size: 1.13rem; margin: 26px 0 8px; color: var(--text); scroll-margin-top: 78px; }
.hc-article h4 { font-size: 1rem; margin: 20px 0 6px; color: var(--text); }
.hc-article p, .hc-article li { color: var(--text-2); line-height: 1.72; font-size: 15.5px; }
.hc-article p { margin: 0 0 14px; }
.hc-article ul, .hc-article ol { padding-left: 22px; margin: 0 0 16px; }
.hc-article li { margin: 5px 0; }
.hc-article li::marker { color: var(--text-3); }
.hc-article strong { color: var(--text); font-weight: 650; }
.hc-article img { max-width: 100%; border-radius: 10px; }
.hc-article hr { border: none; border-top: 1px solid var(--line); margin: 30px 0; }

/* heading anchor link */
.hc-anchor { opacity: 0; margin-left: 8px; color: var(--text-3); font-weight: 400; text-decoration: none; font-size: .8em; }
.hc-article h2:hover .hc-anchor, .hc-article h3:hover .hc-anchor { opacity: 1; }

/* ---- Inline code + code blocks ---------------------------------- */
.hc-article :not(pre) > code {
  background: var(--panel); border: 1px solid var(--line);
  padding: 1.5px 6px; border-radius: 6px; font-size: .88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text);
}
.hc-code { position: relative; margin: 0 0 18px; }
.hc-code pre {
  margin: 0; background: #0c0e16; color: #e6e9f0;
  padding: 16px 18px; border-radius: 12px; overflow: auto;
  font-size: 13.2px; line-height: 1.6; border: 1px solid #1d2230;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hc-code pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.hc-code-label { position: absolute; top: 0; left: 16px; transform: translateY(-50%);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #aab2c5; background: #161a26; border: 1px solid #2a3142; padding: 2px 8px; border-radius: 6px; }
.hc-copy {
  position: absolute; top: 9px; right: 9px;
  background: #1b2030; color: #cdd4e3; border: 1px solid #2c3346;
  border-radius: 7px; font-size: 11.5px; padding: 4px 9px; cursor: pointer; font-family: inherit;
}
.hc-copy:hover { background: #252c40; color: #fff; }
.hc-copy.done { color: var(--ok); border-color: var(--ok); }
.hc kbd {
  font-family: ui-monospace, monospace; font-size: .82em;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--text);
}

/* ---- Callouts --------------------------------------------------- */
.cb {
  display: flex; gap: 12px; margin: 0 0 18px;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); font-size: 14.5px; line-height: 1.65;
}
.cb p:last-child { margin-bottom: 0; }
.cb p { margin: 0 0 8px; color: var(--text-2); }
.cb .cb-ic { flex: none; width: 22px; height: 22px; }
.cb .cb-body { min-width: 0; }
.cb .cb-title { font-weight: 700; color: var(--text); display: block; margin-bottom: 3px; font-size: 14px; }
.cb-note   { border-left: 3px solid var(--accent); }
.cb-note .cb-ic, .cb-note .cb-title { color: var(--accent); }
.cb-tip    { border-left: 3px solid var(--ok); }
.cb-tip .cb-ic, .cb-tip .cb-title { color: var(--ok); }
.cb-warn   { border-left: 3px solid var(--warn); }
.cb-warn .cb-ic, .cb-warn .cb-title { color: var(--warn); }
.cb-danger { border-left: 3px solid #e5484d; }
.cb-danger .cb-ic, .cb-danger .cb-title { color: #e5484d; }

/* ---- Tables ----------------------------------------------------- */
.hc-tablewrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; }
.hc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hc-table th, .hc-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hc-table th { background: var(--panel); color: var(--text); font-weight: 650; font-size: 12.5px;
  letter-spacing: .02em; position: sticky; top: 0; }
.hc-table tr:last-child td { border-bottom: none; }
.hc-table td { color: var(--text-2); line-height: 1.55; }
.hc-table code { white-space: nowrap; }

/* ---- Pills / badges --------------------------------------------- */
.pill { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px;
  border-radius: 999px; background: var(--panel); color: var(--text-2); border: 1px solid var(--line); vertical-align: middle; }
.pill-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill-ok { background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); border-color: transparent; }
.pill-warn { background: color-mix(in oklab, var(--warn) 18%, transparent); color: var(--warn); border-color: transparent; }

/* ---- Figures / diagrams ----------------------------------------- */
.hc-fig { margin: 0 0 22px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.hc-fig svg { display: block; width: 100%; height: auto; }
.hc-fig figcaption { margin-top: 12px; font-size: 13px; color: var(--text-3); text-align: center; }
/* diagram theme hooks (used inside inline SVGs) */
.dg-fill { fill: var(--surface); }
.dg-stroke { stroke: var(--line-strong); }
.dg-accent { fill: var(--accent); }
.dg-accent-soft { fill: var(--accent-soft); }
.dg-text { fill: var(--text); font-family: var(--font-ui); }
.dg-muted { fill: var(--text-2); font-family: var(--font-ui); }
.dg-line { stroke: var(--text-3); }

/* ---- Step list -------------------------------------------------- */
.hc-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 18px; }
.hc-steps > li { counter-increment: s; position: relative; padding: 2px 0 14px 40px; margin: 0; }
.hc-steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.hc-steps > li::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 2px;
  width: 2px; background: var(--line); }
.hc-steps > li:last-child::after { display: none; }

/* ---- Still need help + prev/next -------------------------------- */
.hc-help-box {
  margin: 44px 0 8px; padding: 20px 22px; border-radius: 14px;
  background: var(--accent-softer); border: 1px solid var(--accent-soft);
}
.hc-help-box h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--text); }
.hc-help-box p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.hc-help-box .hc-help-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.hc-help-box .hc-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border-radius: 9px; font-size: 14px; font-weight: 600; }
.hc-btn-primary { background: var(--accent); color: var(--on-accent) !important; }
.hc-btn-primary:hover { background: var(--accent-press); text-decoration: none; }
.hc-btn-ghost { border: 1px solid var(--line-strong); color: var(--text) !important; }
.hc-btn-ghost:hover { background: var(--panel); text-decoration: none; }

.hc-pager { display: flex; gap: 14px; margin-top: 34px; }
.hc-pager a { flex: 1; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.hc-pager a:hover { border-color: var(--accent); text-decoration: none; }
.hc-pager .lbl { font-size: 12px; color: var(--text-3); }
.hc-pager .ttl { font-size: 14.5px; font-weight: 600; color: var(--text); }
.hc-pager .next { text-align: right; }

/* ---- Right ToC -------------------------------------------------- */
.hc-toc { position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px);
  overflow-y: auto; padding: 32px 20px 60px; }
.hc-toc-h { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 10px; }
.hc-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.hc-toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -2px;
  border-left: 2px solid transparent; font-size: 13px; color: var(--text-3); line-height: 1.4; }
.hc-toc li a:hover { color: var(--text); text-decoration: none; }
.hc-toc li a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.hc-toc li.sub a { padding-left: 26px; font-size: 12.5px; }

/* ---- Search modal ----------------------------------------------- */
.hc-modal { position: fixed; inset: 0; z-index: 80; display: none; }
.hc-modal.open { display: block; }
.hc-modal-bg { position: absolute; inset: 0; background: rgba(8,10,14,.5); backdrop-filter: blur(2px); }
.hc-modal-card { position: relative; max-width: 600px; margin: 70px auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden; }
.hc-modal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.hc-modal-in input { flex: 1; border: none; background: none; outline: none; font-size: 16px;
  color: var(--text); font-family: inherit; }
.hc-modal-in .esc { font-size: 11px; color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px 6px; }
.hc-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.hc-results a { display: block; padding: 10px 12px; border-radius: 10px; }
.hc-results a:hover, .hc-results a.sel { background: var(--panel); text-decoration: none; }
.hc-results .r-cat { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.hc-results .r-ttl { font-size: 15px; color: var(--text); font-weight: 600; margin: 1px 0; }
.hc-results .r-snip { font-size: 13px; color: var(--text-3); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-results .empty { padding: 26px; text-align: center; color: var(--text-3); font-size: 14px; }
.hc-results mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 1px; }

/* ---- Footer ----------------------------------------------------- */
.hc-foot { border-top: 1px solid var(--line); padding: 26px 20px; text-align: center;
  color: var(--text-3); font-size: 13px; }
.hc-foot a { color: var(--text-2); }

/* ---- Help index (landing) --------------------------------------- */
.hc-home { max-width: 1060px; margin: 0 auto; padding: 56px 24px 90px; }
.hc-home-hero { text-align: center; margin-bottom: 44px; }
.hc-home-hero h1 { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: -.025em; margin: 0 0 12px; }
.hc-home-hero p { font-size: 1.2rem; color: var(--text-2); margin: 0 auto 24px; max-width: 560px; }
.hc-home-search { max-width: 520px; margin: 0 auto; }
.hc-home-search .hc-searchbtn { width: 100%; min-width: 0; padding: 13px 16px; font-size: 15px; border-radius: 12px; }
.hc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.hc-card { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  transition: border-color .15s, transform .15s; }
.hc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hc-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.hc-card-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); flex: none; }
.hc-card-ic svg { width: 19px; height: 19px; }
.hc-card h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.hc-card-desc { color: var(--text-2); font-size: 14px; margin: 0 0 12px; line-height: 1.55; }
.hc-card ul { list-style: none; margin: 0; padding: 0; }
.hc-card li a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-2); }
.hc-card li a:hover { color: var(--accent); }
.hc-card .more { font-size: 13px; font-weight: 600; }

/* ---- Responsive ------------------------------------------------- */
@media (max-width: 1180px) {
  .hc-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .hc-toc { display: none; }
}
@media (max-width: 920px) {
  .hc-shell { grid-template-columns: minmax(0, 1fr); }
  .hc-menu { display: inline-grid; }
  .hc-top-links .opt { display: none; }
  .hc-searchbtn { min-width: 0; width: 40px; padding: 8px; }
  .hc-searchbtn .txt, .hc-searchbtn .k { display: none; }
  .hc-sidebar {
    position: fixed; top: 60px; left: 0; bottom: 0; width: 290px; z-index: 50;
    background: var(--surface); transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .hc-sidebar.open { transform: translateX(0); }
  .hc-scrim { display: none; position: fixed; inset: 60px 0 0 0; background: rgba(8,10,14,.4); z-index: 45; }
  .hc-scrim.open { display: block; }
  .hc-main { padding: 24px 20px 80px; }
  .hc-article h1 { font-size: 1.8rem; }
}
