/* FAQ pages (taxonomy-faq_category.php).
   Everything is scoped under .pa-faq so the prototype's tokens and resets
   cannot leak into the rest of the site. */

.pa-faq {
  --ink: #1a2332;
  --body: #374151;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --line: #E5E7EB;
  --line-soft: #F3F4F6;
  --white: #ffffff;
  --bg: #F9FAFB;
  --cyan: #17b3e4;
  --cyan-hover: #1496c7;
  --cyan-soft: #e8f7fc;
  --magenta: #d81671;
  --magenta-hover: #c01060;
  --navy: #0f2137;

  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--body);
  background: var(--white);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.pa-faq *,
.pa-faq *::before,
.pa-faq *::after { box-sizing: border-box; }

.pa-faq h1,
.pa-faq h2,
.pa-faq h3,
.pa-faq p,
.pa-faq nav,
.pa-faq section,
.pa-faq div { margin: 0; padding: 0; }

.pa-faq a { text-decoration: none; }

/* ---------- LAYOUT ---------- */
.pa-faq .wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- HERO ---------- */
.pa-faq .faq-hero {
  padding: 48px 0 28px;
  text-align: left;
  background: linear-gradient(180deg, #eef9fd 0%, #f5fcfe 100%);
}
.pa-faq .eyebrow {
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700; margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 14px;
}
.pa-faq .eyebrow::before {
  content: ""; width: 30px; height: 1px; background: var(--cyan);
  display: inline-block; opacity: .6;
}
.pa-faq .faq-hero h1 {
  font-size: clamp(40px, 5vw, 60px); line-height: 1.05; color: var(--ink);
  font-weight: 700; letter-spacing: -.02em; max-width: 16ch; margin: 0;
}
.pa-faq .faq-hero h1 em { font-style: normal; font-weight: 700; color: var(--cyan); }
.pa-faq .faq-hero .lede {
  margin: 18px 0 0; font-size: 18px; font-weight: 400; color: var(--muted);
  max-width: 48ch; line-height: 1.55;
}
.pa-faq .faq-hero .lede p { margin: 0; }

/* ---------- SEARCH ---------- */
.pa-faq .search-section {
  padding: 8px 0 40px; background: #f5fcfe; border-bottom: 1px solid var(--line);
}
.pa-faq .search-wrap { position: relative; max-width: 580px; margin: 0; }
.pa-faq .search-wrap::before {
  content: ""; position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; border: 2px solid var(--cyan); border-radius: 50%;
  box-shadow: 9px 9px 0 -7px var(--cyan); z-index: 1; pointer-events: none;
}
.pa-faq #search {
  width: 100%; border: 1.5px solid #cfd5dc; border-radius: 12px;
  background: #fff; font-family: inherit; font-size: 18px; color: var(--ink);
  padding: 17px 46px 17px 48px; font-weight: 400; outline: none;
  box-shadow: 0 6px 24px rgba(15, 33, 55, .06);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pa-faq #search::placeholder { color: var(--muted); font-weight: 400; }
.pa-faq #search:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(23, 179, 228, .15); }
.pa-faq .clear-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; background: #fff; border-radius: 50%;
  cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1;
  display: none; align-items: center; justify-content: center; padding: 0;
}
.pa-faq .clear-btn:hover { background: var(--cyan); color: #fff; }
.pa-faq .clear-btn.show { display: flex; }
.pa-faq .result-count {
  margin-top: 14px; font-size: 13px; color: var(--faint);
  letter-spacing: .04em; min-height: 18px; text-align: left;
}

/* ---------- TOPIC PILLS ---------- */
.pa-faq .tabs-section { padding: 36px 0; background: #fff; border-bottom: 1px solid var(--line); }
.pa-faq .chapter-jump { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.pa-faq .cj-link {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--white); cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  color: var(--body); text-decoration: none;
  transition: border-color .2s cubic-bezier(.2, .8, .2, 1), color .2s ease,
              transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, background .2s ease;
}
.pa-faq .cj-link:hover {
  border-color: #c7ced6; color: var(--ink); background: #fff;
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 33, 55, .10);
}
.pa-faq .cj-link.active {
  border-color: transparent; color: #fff; background: var(--cyan);
  box-shadow: 0 6px 18px rgba(23, 179, 228, .30), inset 0 1px 0 rgba(255, 255, 255, .22);
  transform: none;
}
.pa-faq .cj-link.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 179, 228, .36), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.pa-faq .cj-group-label { display: none; }

/* ---------- CHAPTERS ---------- */
.pa-faq .chapters { padding: 24px 0 40px; }
.pa-faq .chapter-group { scroll-margin-top: 96px; }
.pa-faq .chapter { display: grid; grid-template-columns: 240px 1fr; gap: 0 72px; padding: 52px 0; scroll-margin-top: 96px; }
.pa-faq .chapter-meta { position: sticky; top: 110px; align-self: start; }
.pa-faq .def-letter {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 66px; font-weight: 500; color: var(--cyan); line-height: 1; letter-spacing: -.02em;
}
.pa-faq .chapter-label {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 32px; font-weight: 500; color: var(--ink); line-height: 1.18;
  letter-spacing: -.01em; max-width: 11ch; text-transform: none;
}
.pa-faq .chapter-rule {
  margin-top: 20px; width: 34px; height: 2px; background: var(--cyan);
  border-radius: 2px; opacity: .8;
}

/* ---------- Q&A ---------- */
.pa-faq .qa { padding: 0 0 40px; }
.pa-faq .qa:last-child { padding-bottom: 0; }
.pa-faq .qa-q {
  width: 100%; text-align: left; font-family: inherit; display: block;
  color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.4;
  letter-spacing: -.005em; margin: 0 0 12px;
}
.pa-faq .qa-a-inner {
  font-size: 16.5px; color: var(--muted); line-height: 1.75; font-weight: 400; max-width: 62ch;
}
.pa-faq .qa-a-inner a {
  color: var(--cyan-hover); font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(20, 150, 199, .35);
}
.pa-faq .qa-a-inner a:hover { border-bottom-color: var(--cyan-hover); }

/* Editor-authored answers: wpautop wraps them in <p>, and lists need their
   markers back after the scoped reset. */
.pa-faq .qa-a-inner p { margin: 0 0 14px; }
.pa-faq .qa-a-inner p:last-child { margin-bottom: 0; }
.pa-faq .qa-a-inner ul,
.pa-faq .qa-a-inner ol { margin: 12px 0 14px; padding-left: 22px; }
.pa-faq .qa-a-inner ul { list-style: disc; }
.pa-faq .qa-a-inner ol { list-style: decimal; }
.pa-faq .qa-a-inner li { margin-bottom: 6px; }
.pa-faq .qa-a-inner strong { color: var(--ink); font-weight: 700; }
.pa-faq .qa-a-inner table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.pa-faq .qa-a-inner th,
.pa-faq .qa-a-inner td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

.pa-faq mark { background: var(--cyan-soft); color: var(--cyan-hover); padding: 0 1px; border-radius: 2px; }

/* ---------- NO RESULTS ---------- */
.pa-faq .no-results { display: none; text-align: center; padding: 80px 20px; border-top: 1px solid var(--line); }
.pa-faq .no-results.show { display: block; }
.pa-faq .no-results .nr-num { font-size: 64px; font-weight: 900; color: var(--line); line-height: 1; }
.pa-faq .no-results h3 { color: var(--ink); font-size: 22px; margin: 18px 0 8px; font-weight: 700; }
.pa-faq .no-results p { color: var(--muted); font-weight: 300; }

/* ---------- CONTACT ---------- */
.pa-faq .contact { border-top: 1px solid var(--line); padding: 88px 0 110px; }
.pa-faq .contact-inner { display: grid; grid-template-columns: 200px 1fr; gap: 0; align-items: center; }
.pa-faq .contact-num { font-size: 74px; font-weight: 900; color: var(--cyan); line-height: .9; letter-spacing: -.04em; }
.pa-faq .contact h2 { font-size: clamp(30px, 4vw, 44px); color: var(--ink); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.pa-faq .contact p { margin-top: 16px; font-size: 18px; color: var(--muted); font-weight: 300; max-width: 48ch; }
.pa-faq .contact-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.pa-faq .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 6px; font-family: inherit; font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: all .2s ease; border: 1.5px solid transparent;
}
.pa-faq .btn-primary { background: var(--magenta); color: #fff; }
.pa-faq .btn-primary:hover { background: var(--magenta-hover); color: #fff; }
.pa-faq .btn-outline { background: transparent; color: var(--cyan-hover); border-color: var(--cyan); }
.pa-faq .btn-outline:hover { background: var(--cyan-soft); }

/* ---------- SEARCH SUGGESTIONS DROPDOWN ---------- */
.pa-faq .search-sug {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 33, 55, .14);
  display: none; max-height: 60vh; overflow-y: auto;
}
.pa-faq .search-sug.show { display: block; }
.pa-faq .sug-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 18px; text-decoration: none; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .12s;
}
.pa-faq .sug-item:last-of-type { border-bottom: none; }
.pa-faq .sug-item:hover,
.pa-faq .sug-item.active { background: var(--cyan-soft); }
.pa-faq .sug-q { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.35; }
.pa-faq .sug-q mark { background: transparent; color: var(--cyan-hover); padding: 0; }
.pa-faq .sug-cat {
  color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; white-space: nowrap; flex: none;
}
.pa-faq .sug-empty { padding: 16px 18px; color: var(--muted); font-size: 14px; }
.pa-faq .sug-all {
  display: block; width: 100%; text-align: left; padding: 13px 18px;
  background: var(--bg); border: none; border-top: 1px solid var(--line);
  color: var(--cyan-hover); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pa-faq .sug-all:hover { background: var(--cyan-soft); }

/* ---------- INLINE UNIVERSAL RESULTS ---------- */
.pa-faq .uni-results { padding: 32px 0 16px; }
.pa-faq .uni-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.pa-faq .uni-count { font-size: 15px; color: var(--muted); }
.pa-faq .uni-count strong { color: var(--ink); }
.pa-faq .uni-back {
  background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: all .15s;
}
.pa-faq .uni-back:hover { border-color: var(--cyan); color: var(--cyan-hover); }
.pa-faq .uni-group { padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.pa-faq .uni-group:last-child { border-bottom: none; }
.pa-faq .uni-group-label {
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px;
}
.pa-faq .uni-group-num { color: var(--cyan); font-size: 12px; font-weight: 900; }
.pa-faq .uni-item { display: block; padding: 16px 0 14px; text-decoration: none; border-top: 1px solid var(--line-soft); }
.pa-faq .uni-group-label + .uni-item { border-top: none; }
.pa-faq .uni-item:hover .uni-q { color: var(--cyan-hover); }
.pa-faq .uni-q { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.4; margin-bottom: 5px; }
.pa-faq .uni-a { font-size: 15px; color: var(--muted); line-height: 1.6; max-width: 74ch; }
.pa-faq .uni-q mark,
.pa-faq .uni-a mark { background: var(--cyan-soft); color: var(--cyan-hover); padding: 0 1px; border-radius: 2px; }
.pa-faq .uni-empty { text-align: center; padding: 70px 20px; }
.pa-faq .uni-empty-num { font-size: 60px; font-weight: 900; color: var(--line); line-height: 1; }
.pa-faq .uni-empty h3 { color: var(--ink); font-size: 22px; margin: 16px 0 8px; font-weight: 700; }
.pa-faq .uni-empty p { color: var(--muted); }

/* Search targets: clear the sticky nav so the question is not hidden under it. */
.pa-faq .qa[id] { scroll-margin-top: 110px; }
.pa-faq .qa.search-flash { animation: paFaqFlash 2.2s ease; border-radius: 10px; }
@keyframes paFaqFlash {
  0%, 18% { background: var(--cyan-soft); box-shadow: 0 0 0 8px var(--cyan-soft); }
  100% { background: transparent; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pa-faq .qa.search-flash { animation: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .pa-faq .wrap { padding-left: 22px; padding-right: 22px; }
  .pa-faq .chapter-jump { gap: 10px; }
  .pa-faq .cj-group-label {
    display: block; width: 100%; margin: 6px 2px -2px; font-size: 11px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  }
  .pa-faq .cj-group-label:first-child { margin-top: 0; }
  .pa-faq .cj-link {
    width: auto; justify-content: center; text-align: center; padding: 11px 16px; font-size: 14px;
    border-radius: 11px; line-height: 1.2; background: var(--white); box-shadow: 0 1px 2px rgba(15, 33, 55, .04);
  }
  .pa-faq .cj-link:hover { transform: none; box-shadow: 0 1px 2px rgba(15, 33, 55, .04); }
  .pa-faq .cj-link.active { box-shadow: 0 5px 14px rgba(23, 179, 228, .26), inset 0 1px 0 rgba(255, 255, 255, .22); }
  .pa-faq .cj-link.active:hover { transform: none; }
  .pa-faq .faq-hero { padding: 64px 0 44px; }
  .pa-faq .chapter { grid-template-columns: 1fr; padding: 44px 0; }
  .pa-faq .chapter-meta { position: static; display: flex; align-items: baseline; gap: 18px; margin-bottom: 20px; }
  .pa-faq .chapter-label { margin-top: 0; }
  .pa-faq .def-letter { font-size: 48px; }
  .pa-faq .chapter-rule { display: none; }
  .pa-faq .contact-inner { grid-template-columns: 1fr; }
  .pa-faq .contact-num { font-size: 54px; margin-bottom: 14px; }
  .pa-faq .qa-q { font-size: 18px; }
  .pa-faq .qa-a-inner { padding-right: 20px; }
}
@media (max-width: 480px) {
  .pa-faq .contact-actions .btn { width: 100%; }
}
