/**
 * Section: FAQ (page)
 * Ported from .docs/mockup/css/faqpage.css — all 139 lines are this
 * section's. Tokens only; the handful of literal pixel values (240px column,
 * 88px/100px sticky offsets, 11px/1.2px/9px/12px/4px/2px/8px) are structural
 * and already exist in the mockup verbatim, per the contract's exception for
 * values with no matching token.
 *
 * Two deliberate departures from the mockup file, both explained in
 * faqp.php's docblock:
 *
 *   - `.faq-nav h4` is renamed `.faq-nav-label` and now targets a <p>
 *     instead of an <h4>, to fix a heading-order skip (h4 before the first
 *     h2 in reading order). Same declarations, same visual result.
 *   - `.faq-help .eyebrow` is a new rule carrying the colour the mockup set
 *     with an inline `style="color:var(--coastal-blue)"` on that one
 *     eyebrow. Section stylesheets don't get inline styles; this moves the
 *     exact same token value into the stylesheet where it belongs.
 *
 * The `.faq-item` / `.faq-answer` accordion rules at the bottom are
 * duplicated from assets/css/sections/faq.css (itself ported from the
 * mockup's sections.css, which faqpage.css's own comment says these reuse).
 * Scoped under `.faqp` here rather than left bare, so this file's copy wins
 * on specificity if a page ever loads both sections' stylesheets. See
 * faqp.php's docblock for why this is a deliberate duplication rather than
 * an enqueue of faq.css, and the promotion this should get to
 * components.css.
 */

.faqp {
  padding-block: var(--section-space-m);
  padding-inline: var(--space-gutter);
}

.faq-layout {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* --- Side nav --- */
.faq-nav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: var(--space-xs);
}

.faq-nav a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--charcoal);
  border-left: 2px solid transparent;
  transition: background var(--duration-fast), color var(--duration-fast),
              border-color var(--duration-fast);
}

.faq-nav a:hover {
  background: var(--pebble);
  color: var(--deep-ocean);
  border-left-color: var(--terracotta);
}

/* --- Categories --- */
.faq-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.faq-cat {
  scroll-margin-top: 100px;
}

.faq-cat h2 {
  font-size: var(--text-h2);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: var(--space-m);
}

.faq-cat h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--terracotta);
}

/* --- Still stuck? help panel --- */
.faq-help {
  margin-top: var(--space-s);
  background: var(--deep-ocean);
  border-radius: var(--radius-lg);
  padding: var(--space-l);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-s);
}

.faq-help .eyebrow {
  color: var(--coastal-blue);
}

.faq-help h3 {
  color: var(--off-white);
  font-size: var(--text-h3);
  font-weight: 700;
}

.faq-help p {
  color: var(--coastal-blue);
  line-height: 1.6;
  max-width: 52ch;
}

.faq-help .btn-outline {
  color: var(--off-white);
  border-color: rgba(250, 250, 247, 0.5);
}

.faq-help .btn-outline:hover {
  background: var(--off-white);
  color: var(--deep-ocean);
  border-color: var(--off-white);
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .faq-layout {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }

  .faq-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: var(--space-s);
    border-bottom: 1px solid var(--hairline);
  }

  .faq-nav-label {
    width: 100%;
    margin-bottom: 4px;
  }

  .faq-nav a {
    background: var(--pebble);
    border-left: 0;
  }
}

/* --- Accordion component (duplicated from sections/faq.css, see docblock) --- */
.faqp .faq-item {
  background: var(--pebble);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: border-color var(--duration-fast);
}

.faqp .faq-item[open] {
  border-color: var(--terracotta);
}

.faqp .faq-item summary {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-body);
  color: var(--deep-ocean);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-s) var(--space-m);
}

.faqp .faq-item summary::-webkit-details-marker {
  display: none;
}

.faqp .faq-item summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 300;
  color: var(--terracotta);
  transition: transform var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
  margin-left: var(--space-s);
}

.faqp .faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faqp .faq-item .faq-answer {
  font-size: var(--text-small);
  color: var(--graphite);
  line-height: 1.6;
  padding: 0 var(--space-m) var(--space-s);
}
