:root {
  --faq-ink: #2d2922;
  --faq-muted: #716a5e;
  --faq-line: #e8dfcd;
  --faq-soft: #faf7f0;
  --faq-gold: #a77924;
  --faq-alert: #8a5b16;
}

.faq-library-hero .container {
  max-width: 980px;
}

.faq-library-kicker,
.faq-review-badge,
.faq-topic-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid rgba(167, 121, 36, .32);
  border-radius: 999px;
  color: var(--faq-gold);
  background: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}

.faq-library-hero h1 {
  max-width: 900px;
}

.faq-library-hero .lead {
  max-width: 820px;
}

.faq-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.faq-topic-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px;
  border: 1px solid var(--faq-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(58, 43, 20, .055);
}

.faq-topic-card h2 {
  margin: 15px 0 10px;
  color: var(--faq-ink);
  font-size: 24px;
  line-height: 1.35;
}

.faq-topic-card > p {
  color: var(--faq-muted);
  line-height: 1.85;
}

.faq-topic-preview {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.faq-topic-preview a {
  color: #4c4335;
  line-height: 1.6;
  text-decoration-color: rgba(167, 121, 36, .4);
  text-underline-offset: 4px;
}

.faq-topic-card .text-link {
  margin-top: auto;
}

.faq-method-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.faq-method-panel article {
  padding: 24px;
  border: 1px solid var(--faq-line);
  border-radius: 8px;
  background: var(--faq-soft);
}

.faq-method-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--faq-ink);
  font-size: 18px;
}

.faq-method-panel p {
  color: var(--faq-muted);
  line-height: 1.8;
}

.faq-library-section {
  padding-top: 46px;
  overflow: visible;
}

.faq-library-layout {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.faq-library-sidebar {
  position: sticky;
  top: 118px;
  padding: 22px;
  border: 1px solid var(--faq-line);
  border-radius: 9px;
  background: #fff;
}

.faq-library-sidebar strong {
  display: block;
  margin-bottom: 14px;
  color: var(--faq-ink);
  font-size: 16px;
}

.faq-question-toc {
  display: grid;
  gap: 5px;
}

.faq-question-toc a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 1px solid #f1eadc;
  color: #5c5447;
  font-size: 14px;
  line-height: 1.55;
}

.faq-question-toc b {
  color: var(--faq-gold);
  font-variant-numeric: tabular-nums;
}

.faq-library-mobile-toc {
  display: none;
}

.faq-topic-intro {
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid var(--faq-line);
  border-radius: 8px;
  color: #5f5649;
  background: var(--faq-soft);
  line-height: 1.85;
}

.faq-library-list {
  display: grid;
  gap: 20px;
}

.faq-library-item {
  scroll-margin-top: 124px;
  padding: 30px;
  border: 1px solid var(--faq-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(58, 43, 20, .045);
}

.faq-library-item h2 {
  margin: 0 0 18px;
  color: var(--faq-ink);
  font-size: 24px;
  line-height: 1.5;
}

.faq-answer-copy {
  color: #49443c;
  line-height: 1.9;
}

.faq-answer-section {
  padding: 16px 18px;
  border-left: 3px solid #d6bd87;
  background: #fcfaf5;
}

.faq-answer-section + .faq-answer-section {
  margin-top: 10px;
}

.faq-answer-section h3,
.faq-depth-block h3 {
  margin: 0 0 7px;
  color: #6f531d;
  font-size: 15px;
  line-height: 1.5;
}

.faq-answer-section p {
  margin: 0;
}

.faq-depth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.faq-depth-block {
  padding: 18px;
  border: 1px solid #eee4d2;
  border-radius: 8px;
  background: #fff;
}

.faq-depth-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
}

.faq-depth-block li::marker {
  color: var(--faq-gold);
}

.faq-boundary-note {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 7px;
  color: #684a1d;
  background: #fff6df;
  font-size: 14px;
  line-height: 1.75;
}

.faq-official-sources,
.faq-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #f0eadf;
  color: var(--faq-muted);
  font-size: 14px;
  line-height: 1.65;
}

.faq-official-sources strong,
.faq-related-links strong {
  color: #4e463a;
}

.faq-official-sources a,
.faq-related-links a {
  color: #74571d;
  text-decoration: underline;
  text-decoration-color: rgba(167, 121, 36, .35);
  text-underline-offset: 3px;
}

.faq-topic-disclaimer {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid #e8dcc3;
  border-radius: 8px;
  color: #655b4d;
  background: #fcf9f2;
  font-size: 14px;
  line-height: 1.8;
}

.faq-topic-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.faq-topic-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 13px;
  border: 1px solid var(--faq-line);
  border-radius: 999px;
  color: #5b4b2c;
  background: #fff;
}

.faq-topic-switcher a[aria-current="page"] {
  border-color: #c7a765;
  color: #fff;
  background: #8d6a26;
}

@media (max-width: 1024px) {
  .faq-depth-grid {
    grid-template-columns: 1fr;
  }
  .faq-library-layout {
    grid-template-columns: 1fr;
  }

  .faq-library-sidebar {
    display: none;
  }

  .faq-library-mobile-toc {
    display: block;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid var(--faq-line);
    border-radius: 8px;
    background: #fff;
  }

  .faq-library-mobile-toc summary {
    cursor: pointer;
    color: var(--faq-ink);
    font-weight: 700;
  }

  .faq-library-mobile-toc .faq-question-toc {
    margin-top: 14px;
  }
}

@media (max-width: 760px) {
  .faq-hub-grid,
  .faq-method-panel {
    grid-template-columns: 1fr;
  }

  .faq-topic-card,
  .faq-library-item {
    padding: 22px 20px;
  }

  .faq-library-item h2,
  .faq-topic-card h2 {
    font-size: 21px;
  }

  .faq-library-section {
    padding-top: 32px;
  }
}
