/* Enmantle Help Center — supplemental styles.
   Extends css/site.css (imported first) with help-only components:
   search, category grid, article layout, TOC, video embed, support block.
   The existing site.css is never modified. */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Prose additions (site.css styles h3/ul; help articles also use h2/ol) */
.prose h2 {
  font-family: 'Fraunces', serif; font-weight: 500; font-size: 28px; line-height: 1.15;
  letter-spacing: -0.015em; color: var(--ink); margin-top: 48px;
}
.prose h2:first-child { margin-top: 0; }
.prose h2 em { font-style: italic; color: var(--teal-dark); }
.prose h4 {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 16px;
  color: var(--ink); margin-top: 28px;
}
.prose ol { list-style: none; counter-reset: step; display: grid; gap: 14px; }
.prose ol > li {
  position: relative; padding-left: 44px; font-size: 16.5px; line-height: 1.6; color: var(--ink-soft);
  counter-increment: step; min-height: 30px;
}
.prose ol > li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal-dark);
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88em;
  background: var(--paper-3); padding: 2px 6px; border-radius: 5px; color: var(--ink);
}
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }

/* Article hero + meta */
.article-hero { padding-bottom: 24px; }
.article-hero .page-title { font-size: clamp(30px, 4vw, 46px); max-width: 24ch; }
.article-meta { color: var(--muted-soft); margin-top: 4px; }
.article-body { padding-top: 24px; }

/* ── Docs layout: sidebar nav + content + on-this-page ── */
.doc-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding-top: 12px;
  padding-bottom: 56px;
}
@media (min-width: 1200px) {
  .doc-shell { grid-template-columns: 250px minmax(0, 1fr) 212px; }
}
@media (max-width: 900px) {
  .doc-shell { grid-template-columns: 1fr; gap: 0; }
}

/* Sidebar — sticky; home + search stay put, only the list scrolls (so the
   search results popover is never clipped). */
.doc-sidebar { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 104px); display: flex; flex-direction: column; min-height: 0; }
.doc-nav { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.doc-nav-list { overflow-y: auto; overflow-x: hidden; min-height: 0; padding-right: 4px; }
.doc-nav-list::-webkit-scrollbar { width: 6px; }
.doc-nav-list::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
.doc-nav-home {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-dark);
  text-decoration: none; margin-bottom: 16px;
}
.doc-nav-home::before { content: '← '; }
.doc-nav-home:hover { color: var(--ink); }
.doc-search { position: relative; margin-bottom: 22px; }
.doc-search input[type="search"] {
  width: 100%; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 9px; background: #fff; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.doc-search input[type="search"]:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
.doc-nav-list { list-style: none; display: grid; gap: 22px; }
.doc-nav-cat {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500;
  text-decoration: none; margin-bottom: 8px;
}
.doc-nav-cat:hover { color: var(--ink); }
.doc-nav-cat.is-active { color: var(--teal-dark); }
.doc-content .help-article-list { margin-top: 8px; }
.doc-nav-group ul { list-style: none; display: grid; gap: 1px; }
.doc-nav-group li a {
  display: block; font-size: 13.5px; line-height: 1.35; color: var(--muted);
  text-decoration: none; padding: 6px 12px; border-radius: 7px;
  border-left: 2px solid transparent; transition: color 0.15s, background 0.15s;
}
.doc-nav-group li a:hover { color: var(--ink); background: var(--paper-2); }
.doc-nav-group li a.is-active {
  color: var(--teal-dark); background: rgba(13,148,136,0.06);
  border-left-color: var(--teal); font-weight: 600;
}

/* Mobile: collapse the sidebar into a toggle */
.doc-nav-mobile-btn { display: none; }
@media (max-width: 900px) {
  .doc-sidebar {
    position: static; max-height: none; overflow: visible; padding: 0;
    border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 28px; background: #fff;
  }
  .doc-nav-mobile-btn {
    display: flex; align-items: center; justify-content: space-between; cursor: pointer;
    padding: 15px 18px; font-family: 'JetBrains Mono', monospace; font-size: 11px;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); user-select: none;
  }
  .doc-nav-caret {
    width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg); transition: transform 0.2s; margin-top: -3px;
  }
  .doc-nav-toggle:checked ~ .doc-nav-mobile-btn .doc-nav-caret { transform: rotate(-135deg); margin-top: 3px; }
  .doc-nav { display: none; padding: 4px 18px 20px; border-top: 1px solid var(--rule-soft); }
  .doc-nav-toggle:checked ~ .doc-nav { display: block; }
  .doc-nav-home { margin-top: 14px; }
}

/* Article content column */
.doc-article-head { padding-bottom: 20px; border-bottom: 1px solid var(--rule-soft); margin-bottom: 30px; }
.doc-article-head .eyebrow { margin-bottom: 16px; }
.doc-title {
  font-family: 'Fraunces', serif; font-weight: 500; font-variation-settings: "opsz" 96;
  font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 14px;
}
.doc-title em, .doc-title .accent { font-style: italic; color: var(--teal); }
.doc-lede { font-size: 18px; color: var(--muted); line-height: 1.5; max-width: 64ch; margin-bottom: 14px; }
.doc-lede em { font-family: 'Fraunces', serif; font-style: italic; color: var(--teal-dark); }
.doc-content .article-meta { margin: 0; }
.doc-related { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--rule-soft); }
.doc-related .kicker { margin-top: 24px; }

/* On this page (right rail) */
.doc-onthispage { position: sticky; top: 86px; align-self: start; }
@media (max-width: 1199px) { .doc-onthispage { display: none; } }
@media (min-width: 1200px) { .doc-content .toc { display: none; } }
.doc-otp-title {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-soft); margin-bottom: 12px;
}
.doc-onthispage ul { list-style: none; display: grid; gap: 9px; border-left: 1px solid var(--rule); padding-left: 15px; }
.doc-onthispage a { color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.35; transition: color 0.15s; }
.doc-onthispage a:hover { color: var(--teal-dark); }

/* In-this-article TOC */
.toc {
  background: var(--paper-2); border: 1px solid var(--rule-soft); border-radius: 12px;
  padding: 20px 24px; margin-bottom: 36px;
}
.toc-title {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.toc ul { list-style: none; display: grid; gap: 8px; }
.toc a { color: var(--teal-dark); text-decoration: none; font-size: 15px; }
.toc a:hover { text-decoration: underline; }

/* Video embed */
.video { margin: 28px 0; }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: var(--ink); }
.video-frame iframe,
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: var(--ink); }
.video-cap { font-size: 13.5px; color: var(--muted); margin-top: 10px; font-style: italic; }
.video-todo {
  position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px;
  border: 1.5px dashed var(--rule); background:
    repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 12px, var(--paper) 12px, var(--paper) 24px);
}
.video-todo-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; text-align: center; padding: 20px;
}
.video-todo-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal-dark); background: var(--teal-soft);
  padding: 6px 12px; border-radius: 999px;
}
.video-todo-label { font-family: 'Fraunces', serif; font-style: italic; font-size: 18px; color: var(--muted); max-width: 30ch; }

/* Product screenshot / GIF (@shot) */
.shot { margin: 28px 0; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--rule); box-shadow: 0 12px 32px rgba(15,23,42,0.08);
  background: var(--paper-2);
}
.shot-cap { font-size: 13.5px; color: var(--muted); margin-top: 10px; font-style: italic; }

/* Support block (bottom of every article + landing) */
.support-block {
  margin-top: 44px; background: #fff; border: 1px solid var(--rule);
  border-left: 3px solid var(--teal); border-radius: 12px; padding: 22px 26px;
}
.support-lede { font-family: 'Fraunces', serif; font-style: italic; font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.support-body { font-size: 16px; color: var(--ink-soft); }
.support-body a { color: var(--teal-dark); font-weight: 600; }

/* Related articles */
.related-band { background: var(--paper-2); border-top: 1px solid var(--rule-soft); }
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.related-card {
  display: flex; flex-direction: column; gap: 8px; background: #fff; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 12px; padding: 20px; transition: border-color 0.2s, transform 0.15s;
}
.related-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.related-cat { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-soft); }
.related-title { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 500; color: var(--ink); line-height: 1.25; }

/* ── Landing: search ── */
.help-hero { padding-bottom: 40px; }
.help-search { position: relative; max-width: 560px; margin-top: 8px; }
.help-search-label {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.help-search input[type="search"] {
  width: 100%; padding: 16px 18px; font: inherit; font-size: 16px;
  border: 1px solid var(--rule); border-radius: 14px; background: #fff; color: var(--ink);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.help-search input[type="search"]:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,148,136,0.08); }
.help-search-results {
  list-style: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(15,23,42,0.12); max-height: 60vh; overflow-y: auto;
}
.help-search-results li a {
  display: block; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--rule-soft);
}
.help-search-results li:last-child a { border-bottom: none; }
.help-search-results li a:hover, .help-search-results li a:focus-visible { background: var(--paper-2); }
.help-search-results .sr-title { display: block; font-family: 'Fraunces', serif; font-size: 16.5px; color: var(--ink); font-weight: 500; }
.help-search-results .sr-cat { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-soft); margin-top: 3px; }
.help-search-results .sr-empty { padding: 16px 18px; color: var(--muted); font-size: 15px; }
.help-search-results mark { background: var(--gold-soft); color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* ── Landing: category grid ── */
.help-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 8px; }
.help-cat-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 24px 24px 20px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.help-cat-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(13,148,136,0.08); }
.help-cat-name { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.help-cat-blurb { font-size: 14.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.help-cat-count { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-dark); }

/* ── Landing: popular ── */
.help-popular { list-style: none; display: grid; gap: 2px; margin-top: 8px; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--rule); }
.help-popular li a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  background: #fff; padding: 16px 20px; text-decoration: none; transition: background 0.15s;
}
.help-popular li a:hover { background: var(--paper-2); }
.pop-title { font-size: 16px; color: var(--ink); font-weight: 500; }
.pop-cat { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-soft); white-space: nowrap; }
@media (max-width: 560px) { .pop-cat { display: none; } }

/* ── Landing: full category sections ── */
.help-sections { margin-top: 8px; }
.help-cat-section { padding: 40px 0; border-top: 1px solid var(--rule-soft); }
.help-cat-section .section-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.help-cat-section-blurb { color: var(--muted); font-size: 16px; margin-bottom: 20px; }
.help-article-list { list-style: none; display: grid; gap: 2px; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--rule); }
.help-article-list li a { display: block; background: #fff; padding: 18px 20px; text-decoration: none; transition: background 0.15s; }
.help-article-list li a:hover { background: var(--paper-2); }
.ha-title { display: block; font-family: 'Fraunces', serif; font-size: 17.5px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.ha-desc { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
