/*
 * Resilyo Help Center — layout only. Tokens, type stack and button styles come
 * from ../css/styles.css (shared with the app), so the help center follows the
 * app's theme, including the light/dark override.
 */

.help-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }

.hc-skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 30; }
.hc-skip:focus { left: 12px; top: 10px; }

/* ---- header ---- */
.hc-hdr {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.hc-mark-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.hc-mark { font-weight: 800; letter-spacing: -.02em; font-size: 19px; color: var(--brand); }
.hc-chip {
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--brand); color: var(--brand); border-radius: 999px; padding: 3px 9px;
}
.hc-spacer { flex: 1; }
.hc-search {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 999px; padding: 6px 12px; color: var(--muted);
  min-width: 200px; flex: 0 1 340px;
}
.hc-search input { border: 0; background: transparent; outline: none; color: var(--ink); font: inherit; width: 100%; }
.hc-nav-toggle { display: none; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--ink); border-radius: var(--radius-sm); padding: 5px 10px; font-size: 15px; cursor: pointer; }

/* ---- shell ---- */
.hc-shell {
  display: grid; grid-template-columns: 264px minmax(0, 1fr);
  gap: 26px; max-width: 1080px; margin: 0 auto; padding: 22px 18px 40px;
}
.hc-nav { position: sticky; top: 66px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; }
.hc-cat h4 { margin: 18px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hc-cat:first-child h4 { margin-top: 4px; }
.hc-cat ul { list-style: none; margin: 0; padding: 0; }
.hc-cat li a {
  display: block; padding: 6px 10px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.35;
}
.hc-cat li a:hover { background: var(--surface-2); }
.hc-cat li a.hc-cur { background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* ---- article ---- */
.hc-main { min-width: 0; }
.hc-article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 36px 36px; max-width: 780px; line-height: 1.62; font-size: 15px;
}
.hc-article h1 { margin: 0 0 14px; font-size: 26px; line-height: 1.25; letter-spacing: -.01em; }
.hc-article h2 { margin: 26px 0 8px; font-size: 18.5px; }
.hc-article h3 { margin: 20px 0 6px; font-size: 16px; }
.hc-article p { margin: 10px 0; }
.hc-article ul, .hc-article ol { margin: 10px 0; padding-left: 24px; }
.hc-article li { margin: 5px 0; }
.hc-article a { color: var(--brand); }
.hc-article img { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0; }
.hc-article blockquote {
  margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--brand);
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted);
}
.hc-article hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.hc-fallback {
  font-size: 13px; color: var(--partial); background: var(--partial-bg);
  padding: 8px 12px; border-radius: var(--radius-sm); margin: 0 0 16px;
}

/* ---- search results ---- */
.hc-results { list-style: none; margin: 0; padding: 0; }
.hc-results li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.hc-results li:last-child { border-bottom: 0; }
.hc-results a { font-weight: 600; font-size: 15.5px; }
.hc-results p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

/* ---- footer ---- */
.hc-foot {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 16px 18px 30px; font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--border);
}
.hc-foot a { color: var(--brand); }

/* ---- small screens ---- */
@media (max-width: 780px) {
  .hc-shell { grid-template-columns: 1fr; padding-top: 14px; }
  .hc-nav-toggle { display: block; }
  .hc-nav {
    display: none; position: static; max-height: none;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px 14px 14px;
  }
  .hc-nav.hc-nav-open { display: block; }
  .hc-search { flex: 1 1 auto; min-width: 0; }
  .hc-back { display: none; }
  .hc-article { padding: 20px 18px 26px; }
}
