.page-faq {
  --faq-border: 1px solid var(--c-ink);
  --faq-shadow: 6px 6px 0 rgba(25, 24, 19, 0.18);
  --faq-shadow-hot: 10px 10px 0 rgba(230, 57, 23, 0.28);
  padding-bottom: 96px;
}

.page-faq .container {
  padding-top: 32px;
}

.page-faq .faq-hero {
  margin: 48px 0 28px;
}

.page-faq .faq-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  transform: skewX(var(--skew));
  margin: 12px 0 16px;
  max-width: 900px;
}

.page-faq .faq-lead {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-gray);
  margin: 0;
}

.page-faq .faq-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  margin: 32px 0 20px;
  background: var(--c-paper-deep);
  border: var(--faq-border);
  box-shadow: var(--faq-shadow);
}

.page-faq .faq-toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--c-ink);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.page-faq .faq-toc a:hover,
.page-faq .faq-toc a:focus-visible {
  background: var(--c-orange-soft);
  border-color: var(--c-orange);
  color: var(--c-orange);
  outline: none;
}

.page-faq .faq-toc a span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--c-night);
  color: var(--c-paper);
  font-size: 0.7rem;
}

.page-faq .faq-diagram {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  margin: 8px auto 40px;
}

.page-faq .faq-section {
  position: relative;
  margin: 0 0 64px;
  padding: 48px 0 56px;
  border-top: 2px solid var(--c-ink);
}

.page-faq .faq-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 4px;
  background: var(--c-orange);
  transform: skewX(var(--skew));
}

.page-faq .faq-section-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.page-faq .faq-section-head {
  flex: 0 0 auto;
}

.page-faq .faq-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--c-orange);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  transform: skewX(var(--skew));
  margin-bottom: 16px;
}

.page-faq .faq-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  transform: skewX(var(--skew));
  margin: 0;
}

.page-faq .faq-section-desc {
  color: var(--c-gray);
  line-height: 1.7;
  margin-top: 12px;
  max-width: 320px;
}

.page-faq .faq-section-body {
  flex: 1 1 auto;
  min-width: 0;
}

.page-faq .faq-list {
  display: grid;
  gap: 14px;
}

.page-faq .faq-item {
  background: var(--c-paper);
  border: var(--faq-border);
  box-shadow: var(--faq-shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.page-faq .faq-item[open] {
  background: var(--c-orange-soft);
  box-shadow: var(--faq-shadow-hot);
  transform: translateY(-2px);
}

.page-faq .faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.page-faq .faq-item summary:hover {
  background: rgba(255, 90, 0, 0.06);
}

.page-faq .faq-index {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-night);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: background 0.3s ease;
}

.page-faq .faq-item[open] .faq-index {
  background: var(--c-red);
}

.page-faq .faq-qtext {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}

.page-faq .faq-arrow {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.page-faq .faq-item[open] .faq-arrow {
  transform: rotate(-135deg);
}

.page-faq .faq-answer {
  padding: 0 16px 20px;
  border-top: 1px dashed rgba(25, 24, 19, 0.15);
  margin-top: 2px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--c-ink);
}

.page-faq .faq-answer p {
  margin: 12px 0 0;
}

.page-faq .faq-answer a {
  color: var(--c-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.page-faq .faq-answer a:hover,
.page-faq .faq-answer a:focus-visible {
  color: var(--c-red);
  outline: none;
}

.page-faq .faq-figure {
  margin: 28px auto 0;
  max-width: 560px;
}

.page-faq .faq-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: var(--faq-border);
  box-shadow: var(--faq-shadow);
}

.page-faq .faq-figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-gray);
  margin-top: 10px;
  line-height: 1.6;
}

@keyframes pageFaqFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-faq .faq-item[open] .faq-answer {
  animation: pageFaqFade 0.3s ease;
}

@media (min-width: 900px) {
  .page-faq .faq-section-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 4%;
  }

  .page-faq .faq-section-head {
    flex: 0 0 34%;
    width: 34%;
    position: sticky;
    top: 28px;
  }

  .page-faq .faq-section-body {
    flex: 0 0 62%;
    width: 62%;
  }

  .page-faq .faq-section--flip .faq-section-inner {
    flex-direction: row-reverse;
  }

  .page-faq .faq-answer {
    padding: 0 24px 22px 64px;
  }

  .page-faq .faq-figure {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-faq *,
  .page-faq *::before,
  .page-faq *::after {
    animation: none !important;
    transition: none !important;
  }
}
