/* ── FAQ hub (/faq.html) ─────────────────────────────────────────────────
   Layered on css/site.css, which owns the accordion itself (.faq-item-
   accordion / .faq-question / .faq-answer, driven by js/page.js). This file
   adds the hub's own chrome: sticky category bar, filter + expand/collapse
   tools, match highlighting, permalinks, category tiles and the column
   alignment of each category's intro. The pre-2026-09 rules for a
   <details>-based FAQ that no page uses any more were removed. */

/* ── Sticky category bar ──────────────────────────────────────────────── */
/* --faq-bar-top is the header height; nudge it if the bar overlaps or gaps
   under the sticky header. */
.faq-stickybar { position: sticky; top: var(--faq-bar-top, 74px); z-index: 15; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.faq-stickybar .container { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.faq-stickybar .container::-webkit-scrollbar { display: none; }
.faq-stickybar a { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.faq-stickybar a:hover,
.faq-stickybar a.is-active { background: var(--primary); color: var(--on-accent); border-color: var(--primary); }
.faq-stickybar a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Anchors land below the header + sticky bar: categories and single questions. */
:target, .faq-item-accordion, .faq-question { scroll-margin-top: 136px; }
@media (max-width: 768px) {
  .faq-stickybar { --faq-bar-top: 64px; }
  :target, .faq-item-accordion, .faq-question { scroll-margin-top: 122px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ── Hero disclaimer: a readable note, not a full-width strip ────────── */
.page-hero .edu-disclaimer { max-width: 720px; margin: 14px 0 16px; line-height: 1.5; }

/* ── Filter + expand / collapse ───────────────────────────────────────── */
.faq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; max-width: 700px; margin: 18px auto 0; }
.faq-filter-input {
  flex: 1 1 280px; min-width: 0; box-sizing: border-box;
  padding: 12px 14px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  -webkit-appearance: none; appearance: none;
}
.faq-filter-input::placeholder { color: var(--muted); opacity: 1; }
.faq-filter-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,.18); }
.faq-bulk { display: flex; gap: 8px; }
.faq-bulk[hidden] { display: none; }
.faq-bulk-btn {
  min-height: 44px; padding: 8px 14px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--link); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.faq-bulk-btn:hover { border-color: var(--primary); }
.faq-bulk-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.faq-search-summary { max-width: 700px; margin: 10px auto 0; font-size: 14px; color: var(--muted); }
#faq-search-heading + p { max-width: 700px; margin-left: auto; margin-right: auto; }
@media (scripting: none) {
  .faq-tools, .faq-search-summary, section[aria-labelledby="faq-search-heading"] { display: none; }
}

mark.faq-hit { background: rgba(214,162,30,.32); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: 0 1px 0 var(--secondary-dark); }
.faq-hit-note { display: none; margin: -8px 20px 12px; font-size: 13px; color: var(--muted); }
.faq-answer-hit > .faq-hit-note { display: block; }
.faq-item-accordion.open > .faq-hit-note { display: none; }
.faq-permalink-row { display: block; margin-top: 10px; }
.faq-permalink { display: inline-block; font-size: 13px; font-weight: 600; color: var(--link); }
.faq-permalink::before { content: "#"; margin-right: 4px; opacity: .6; }

/* ── Each category: intro, guide link and accordion share one column ─── */
.faq-cat .container > p:not(.cin-scene-label) { max-width: 700px; margin-left: auto; margin-right: auto; }
.faq-cat .container > .faq-accordion { margin-top: 22px; }
.faq-cat .container > p + p { margin-top: 6px; }

/* ── Browse by category: compact tiles, icon beside the label ─────────── */
#faqCategorySection .container > p { max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; }
#faqCategorySection .related-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-width: 1000px; margin-top: 20px; }
#faqCategorySection .related-card {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  padding: 14px 16px; min-height: 0;
  font-size: 15px; font-weight: 700; color: var(--ink); text-align: left;
  background: var(--surface);
}
#faqCategorySection .related-card .related-icon { display: inline-flex; font-size: 22px; line-height: 1; margin: 0; flex: 0 0 auto; }
#faqCategorySection .related-card .pill { margin: 0 0 0 auto; flex: 0 0 auto; }
@media (max-width: 600px) {
  #faqCategorySection .related-grid { grid-template-columns: 1fr; gap: 8px; }
  #faqCategorySection .related-card { padding: 10px 14px; font-size: 14px; }
  .faq-bulk { flex: 1 1 100%; }
  .faq-bulk-btn { flex: 1 1 0; }
}

/* ── Glossary, comparison and "still have questions" link lists:
   compact rows with an arrow, not tall tiles with a decorative square ── */
.faq-links .container > p { max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; }
.faq-links .related-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; max-width: 1000px; margin-top: 20px; }
.faq-links .related-card {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  padding: 12px 16px; min-height: 0;
  font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--link);
  background: var(--surface);
}
.faq-links .related-card .related-icon { display: none; }
.faq-links .related-card::after { content: "\2192"; margin-left: auto; padding-left: 8px; color: var(--muted); }
@media (max-width: 600px) {
  .faq-links .related-grid { grid-template-columns: 1fr; gap: 6px; }
}

/* The closing ask: a button sized to its label. */
.faq-ask .btn { width: auto; display: inline-block; padding-left: 2.25rem; padding-right: 2.25rem; }
