/* FAQ Page Stylesheet — Compact Editorial Documentation */

/* Global: smooth scroll for anchor jumps triggered from the home page
   and from the FAQ page's own TOC / bookmark links. */
html {
  scroll-behavior: smooth;
}

.faq-page-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1e293b;
}

/* ===== Header ===== */
.faq-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.faq-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #772432;
  margin: 0 0 6px;
  text-wrap: balance;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}

.faq-header h1 i {
  font-size: 1.2rem;
}

.faq-subtitle {
  font-size: 0.92rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  text-wrap: pretty;
  max-width: 64ch;
}

/* ===== On this page (TOC) ===== */
.faq-toc {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 12px 18px 14px;
  margin-bottom: 28px;
}

.faq-toc-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin: 0 0 6px;
}

.faq-toc-list {
  margin: 0;
  padding-left: 22px;
  list-style: decimal;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #1e293b;
}

.faq-toc-list a {
  color: #772432;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.faq-toc-list a:hover,
.faq-toc-list a:focus-visible {
  border-bottom-color: #772432;
  outline: none;
}

/* ===== Q&A document body ===== */
.faq-document {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.faq-question {
  padding: 14px 18px;
  scroll-margin-top: 24px;
  border-radius: 8px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Highlight the question the user jumped to (via /faq#id link). */
.faq-question:target {
  background: rgba(119, 36, 50, 0.05);
}

.faq-question-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px;
  text-wrap: balance;
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.faq-question-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #772432;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  min-width: 22px;
  padding-top: 0.15em;
}

.faq-question-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* Bookmark / permalink glyph — appears on hover of the question block
   (or when focused, for keyboard users). */
.faq-anchor-link {
  color: #772432;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9em;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1;
}

.faq-question:hover .faq-anchor-link,
.faq-anchor-link:focus-visible {
  opacity: 0.5;
  outline: none;
}

.faq-anchor-link:hover {
  opacity: 1;
}

.faq-answer {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
  max-width: 68ch;
  text-wrap: pretty;
}

/* ===== Print-friendly ===== */
@media print {
  .faq-page-container {
    max-width: none;
    padding: 0;
  }

  .faq-anchor-link {
    display: none;
  }

  .faq-toc {
    background: transparent;
    border: 1px solid #cbd5e1;
    break-inside: avoid;
  }

  .faq-question {
    break-inside: avoid;
  }

  .faq-question:target {
    background: transparent;
  }

  .faq-question-title {
    color: #000;
  }
}
