/* /help — the help library.
 *
 * Reuses the site's tokens (--bg, --text, --teal, --border…) so Help is unmistakably Carlo,
 * but lays out as DOCUMENTATION rather than as the blog: no cover images, no author bio, no
 * "Read →" affordance, tighter type, a topic index instead of a date-ordered river. A reader
 * should know within a second which of the two surfaces they are on.
 */

.help-main {
  max-width: 860px;
  margin: 0 auto;
  /* 140px top matches the site convention for clearing the FIXED global nav (see the
   * .page-* rules in styles.css). At 72px the hero slid under the nav bar. */
  padding: 140px 24px 96px;
}
.help-main.help-narrow { max-width: 720px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.help-hero { margin-bottom: 56px; }
.help-h1 {
  font-family: var(--font-serif), 'DM Serif Display', serif;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.12;
  color: var(--text-heading);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.help-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
  margin: 0 0 28px;
  max-width: 54ch;
}
.help-hero-note {
  font-size: 13px;
  color: var(--text-dim);
  margin: 14px 0 0;
}
.help-hero-note a { color: var(--teal); text-decoration: none; }
.help-hero-note a:hover { text-decoration: underline; }

.help-search-wrap { position: relative; }
.help-search {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 16px;                 /* 16px avoids iOS zoom-on-focus */
  font-family: var(--font-sans), 'DM Sans', sans-serif;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.help-search::placeholder { color: var(--text-dim); }
.help-search:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
}

/* ── Featured (introductory) theme ────────────────────────────────────── */
/* The first theme in THEME_ORDER leads as a card grid rather than a list, because it is the
 * entry point. It is a normal theme section otherwise — the same articles are NOT repeated
 * further down the page. */
.help-featured { padding-top: 44px; scroll-margin-top: 90px; margin-bottom: 8px; }
.help-featured-note {
  font-size: 14px; color: var(--text-muted); font-weight: 300;
  margin: -8px 0 20px;
}

/* ── Shared card grid ─────────────────────────────────────────────────── */
.help-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.help-start-list, .help-article-list, .help-plain-list {
  list-style: none; margin: 0; padding: 0;
}
.help-start-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.help-start-list a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  background: var(--bg-card);
  transition: border-color 0.2s, transform 0.2s;
  height: 100%;
  box-sizing: border-box;
}
.help-start-list a:hover { border-color: var(--teal); transform: translateY(-1px); }
.help-start-title { display: block; color: var(--text); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.help-start-sum { display: block; color: var(--text-muted); font-size: 13px; line-height: 1.5; font-weight: 300; }

/* ── Topic index ──────────────────────────────────────────────────────── */
/* NOT sticky/fixed: the site's global nav rules already position elements at the top of the
 * viewport, and a floating pill row collided with the hero heading. A plain in-flow row is
 * also better for a page people scan once and then jump from. */
.help-toc {
  position: static;
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: flex-start;   /* the global `nav` rule centres via space-between */
  padding: 0 0 36px;
  margin-bottom: 8px;
  background: none;
  border-bottom: 1px solid var(--border);
}
.help-toc-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.help-toc-link:hover { color: var(--teal); border-color: var(--teal); }
.help-toc-link span { font-size: 11px; color: var(--text-dim); }

/* ── Theme sections ───────────────────────────────────────────────────── */
.help-theme { padding-top: 44px; scroll-margin-top: 90px; }  /* clears the fixed nav on anchor jumps */
.help-h2 {
  font-family: var(--font-serif), 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--text-heading);
  margin: 0 0 18px;
  font-weight: 400;
}
.help-theme-title { font-size: 22px; }

.help-article-list li { border-bottom: 1px solid var(--border); }
.help-article-list li:first-child { border-top: 1px solid var(--border); }
.help-article-list a {
  display: block;
  padding: 15px 4px;
  text-decoration: none;
  transition: padding-left 0.18s, background 0.18s;
}
.help-article-list a:hover { padding-left: 10px; background: var(--bg-card); }
.help-item-title { display: block; color: var(--text); font-size: 15.5px; font-weight: 500; margin-bottom: 3px; }
.help-item-sum { display: block; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; font-weight: 300; }

/* ── Search results ───────────────────────────────────────────────────── */
.help-results { margin-bottom: 40px; }
.help-noresults { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.help-noresults a { color: var(--teal); }

/* ── Article page ─────────────────────────────────────────────────────── */
/* The site styles the bare `nav` and `footer` ELEMENTS (position:fixed for nav, a dark
 * --footer-bg for footer). These breadcrumbs are a <nav> and the article end matter is a
 * <footer>, so both inherited page chrome — the crumbs floated across the top of the viewport
 * and the article foot rendered as a dark navy slab. These rules reset that inheritance
 * explicitly rather than renaming the elements, which would cost the semantics. */
nav.help-crumbs {
  position: static;
  z-index: auto;
  background: none;
  backdrop-filter: none;
  border-bottom: none;
  padding: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); margin-bottom: 28px; flex-wrap: wrap;
  justify-content: flex-start;
}
.help-crumbs a { color: var(--text-muted); text-decoration: none; }
.help-crumbs a:hover { color: var(--teal); }

.help-article-head { margin-bottom: 36px; }
.help-body { font-size: 16.5px; line-height: 1.72; color: var(--text-body); font-weight: 300; }
.help-body p { margin: 0 0 20px; }
.help-body strong { font-weight: 600; color: var(--text); }
.help-body em { font-style: italic; }

.help-steps { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: helpstep; }
.help-steps li {
  counter-increment: helpstep;
  position: relative;
  padding-left: 42px;
  margin-bottom: 18px;
}
.help-steps li::before {
  content: counter(helpstep);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 12px; font-weight: 600;
  font-family: var(--font-sans), 'DM Sans', sans-serif;
}

.help-outcome {
  border-left: 2px solid var(--teal);
  padding: 2px 0 2px 16px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.help-xref { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.help-xref:hover { text-decoration-thickness: 2px; }

.help-variations, .help-notes, .help-related { margin-top: 44px; }
.help-variations dl { margin: 0; }
.help-variations dt { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 15px; }
.help-variations dd { margin: 0 0 18px; color: var(--text-muted); line-height: 1.65; }
.help-notes ul { margin: 0; padding-left: 20px; }
.help-notes li { margin-bottom: 12px; color: var(--text-muted); line-height: 1.65; }

.help-related ul { list-style: none; margin: 0; padding: 0; }
.help-related li { border-top: 1px solid var(--border); }
.help-related li:last-child { border-bottom: 1px solid var(--border); }
.help-related a { display: block; padding: 13px 4px 4px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.help-related a:hover { color: var(--teal); }
.help-related-sum { display: block; padding: 0 4px 13px; color: var(--text-muted); font-size: 13px; line-height: 1.5; font-weight: 300; }

.help-demo {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 0 0 24px;
  background: var(--bg-card);
}
.help-demo p { margin: 0 0 12px; color: var(--text-muted); font-size: 14.5px; }
.help-demo-cta {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--teal);
  color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
}

.help-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 36px; }
.help-tag {
  font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 100px; padding: 3px 10px;
}

footer.help-article-foot {
  display: block;
  background: none;
  padding: 24px 0 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  border-bottom: none;
}
.help-updated { font-size: 12.5px; color: var(--text-dim); margin: 0 0 6px; letter-spacing: 0.02em; }
.help-support { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.help-support a, .help-contact a { color: var(--teal); text-decoration: none; }
.help-support a:hover, .help-contact a:hover { text-decoration: underline; }

.help-contact { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--border); }
.help-contact p { color: var(--text-muted); font-size: 15px; margin: 0; }

.help-plain-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.help-plain-list a { color: var(--text); text-decoration: none; }
.help-plain-list a:hover { color: var(--teal); }

@media (max-width: 640px) {
  .help-main { padding: 104px 20px 72px; }
  .help-start-list { grid-template-columns: 1fr; }
  .help-steps li { padding-left: 36px; }
}
