/* ── FAQ page (/faq) ──
   Page-specific styles only. Header, nav-strip, container, footer, and the
   parchment background all come from shared.css via class="parchment-page". */

.faq-content {
  max-width: 1060px;   /* matches the other parchment pages (2 Nov 2026); answers stay at a readable width below */
  margin: 0 auto;
  padding: 8px 0 40px;
}

/* shared.css gives .container overflow:hidden, which stops position:sticky inside it; the FAQ
   page needs the group tabs to stick, so its container does not clip. */
.page-faq .container { overflow: visible; }

/* Search box and group tabs: one bar that sticks to the top while scrolling (2 Nov 2026) */
.faq-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 4px 0 36px;
  padding: 12px 14px;
  /* Same as the Home tiles' hover state (CLAUDE.md, Hub Design System), 2 Nov 2026 */
  background: rgba(255, 250, 240, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(160, 140, 110, 0.35);
  border-radius: var(--border-radius-lg, 14px);
  box-shadow: 0 4px 16px rgba(120, 100, 70, 0.08);
}
.faq-search { position: relative; max-width: 520px; margin-bottom: 10px; }
.faq-search-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: rgba(61, 50, 37, 0.45); pointer-events: none; }
.faq-search-input {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 110px 10px 38px;
  font: inherit; font-size: 15px; color: #3d3225;
  background: rgba(255, 250, 240, 0.6); border: 1px solid rgba(200, 190, 170, 0.5); border-radius: 10px;
}
.faq-search-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12); }
.faq-search-count { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: rgba(61, 50, 37, 0.55); pointer-events: none; }
.faq-noresults { margin: -12px 0 28px; font-size: 14.5px; color: var(--color-text-secondary); }
.faq-noresults a { color: #8b7355; }
.faq-group[hidden], .faq-item[hidden] { display: none; }
.faq-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.faq-a, .faq-more, .faq-still p { max-width: 760px; }
.faq-a p + p { margin-top: 10px; }
.faq-groups a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(160, 140, 110, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #8b7355;
  text-decoration: none;
  transition: all 0.25s ease;
}
.faq-groups a:hover,
.faq-groups a:focus-visible {
  color: #6b5a3e;
  background: rgba(255, 250, 240, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-color: rgba(160, 140, 110, 0.45);
}

/* Groups */
.faq-group {
  margin-bottom: 40px;
  scroll-margin-top: 132px;
}
.faq-group h2,
.faq-still h2 {
  font-family: var(--font-serif), Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #6b5a3e;
  letter-spacing: -0.2px;
  margin: 0 0 10px;
}

/* One question = one native <details> row (keyboard and screen readers work out of the box) */
.faq-item {
  border-bottom: 1px solid rgba(160, 140, 110, 0.2);
  border-radius: var(--border-radius-md, 10px);
  scroll-margin-top: 132px;
  transition: all 0.25s ease;
}
.faq-group h2 + .faq-item {
  border-top: 1px solid rgba(160, 140, 110, 0.2);
}
.faq-item:hover,
.faq-item[open] {
  background: rgba(255, 250, 240, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 13px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #3d3225;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-right: 2px solid #8b7355;
  border-bottom: 2px solid #8b7355;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::before { transform: rotate(45deg); }
.faq-item summary:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  border-radius: var(--border-radius-md, 10px);
}
.faq-q { flex: 1 1 auto; }
.faq-anchor {
  flex: 0 0 auto;
  font-weight: 400;
  color: rgba(139, 115, 85, 0.55);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.faq-item:hover .faq-anchor,
.faq-item[open] .faq-anchor,
.faq-anchor:focus-visible { opacity: 1; }
.faq-anchor:hover { color: #6b5a3e; }

.faq-a {
  padding: 0 14px 16px 32px;
}
.faq-a p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(61, 50, 37, 0.88);
}

.faq-a a, .faq-more a, .faq-still a, .page-faq .header p a {
  color: #8b7355;
  text-decoration: underline;
  text-decoration-color: rgba(139, 115, 85, 0.4);
  text-underline-offset: 2px;
}
.faq-a a:hover, .faq-more a:hover, .faq-still a:hover, .page-faq .header p a:hover { color: #6b5a3e; }

/* Link to the governing page, at the end of a group */
.faq-more {
  margin: 12px 0 0 12px;
  font-size: 13.5px;
  color: rgba(61, 50, 37, 0.7);
}

/* Bottom */
.faq-still {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(160, 140, 110, 0.2);
}
.faq-still p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(61, 50, 37, 0.85);
}
.faq-still .faq-legal {
  font-size: 12.5px;
  color: rgba(61, 50, 37, 0.6);
}

@media (max-width: 640px) {
  /* one row that scrolls sideways, so the sticky bar stays one line tall on phones */
  .faq-bar { margin-bottom: 28px; }
  .faq-search { max-width: none; }
  .faq-bar { padding: 10px 12px; }
  .faq-groups { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .faq-groups::-webkit-scrollbar { display: none; }
  .faq-groups a { flex: 0 0 auto; }
  .faq-groups a { min-height: 44px; }
  .faq-item summary { padding: 12px 8px; font-size: 15px; }
  .faq-a { padding: 0 8px 14px 28px; }
  .faq-anchor { opacity: 1; }
}
