.page-faq {
  --faq-toc-width: 240px;
  --faq-text-muted: #c9c9de;
}

.page-faq .ayx-breadcrumb {
  margin-bottom: var(--ayx-space-lg);
}

.page-faq__masthead {
  position: relative;
  background: var(--ayx-grad-main);
  border: var(--ayx-border-width) solid var(--ayx-ink);
  border-radius: var(--ayx-border-radius);
  padding: var(--ayx-space-lg);
  margin-bottom: var(--ayx-space-xl);
  box-shadow: var(--ayx-shadow);
  overflow: hidden;
}

.page-faq__masthead::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 140px;
  height: 140px;
  background: var(--ayx-grad-accent);
  border-radius: var(--ayx-border-radius);
  transform: rotate(18deg);
  opacity: 0.25;
  pointer-events: none;
}

.page-faq__man-title {
  font-family: var(--ayx-font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ayx-yellow);
  margin-bottom: var(--ayx-space-md);
  text-transform: uppercase;
}

.page-faq__masthead .ayx-page-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: var(--ayx-text-primary);
  margin-bottom: var(--ayx-space-md);
  position: relative;
  z-index: 1;
}

.page-faq__masthead .ayx-page-lead {
  color: var(--faq-text-muted);
  max-width: 56ch;
  margin-bottom: var(--ayx-space-md);
  position: relative;
  z-index: 1;
}

.page-faq__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ayx-space-md);
  align-items: center;
  position: relative;
  z-index: 1;
}

.page-faq__meta-note {
  font-family: var(--ayx-font-mono);
  font-size: 13px;
  color: var(--faq-text-muted);
}

.page-faq__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ayx-space-lg);
}

.page-faq__toc {
  border: var(--ayx-border-width) solid var(--ayx-ink);
  border-radius: var(--ayx-border-radius);
  padding: var(--ayx-space-lg);
  background: var(--ayx-ink);
  color: var(--ayx-text-primary);
}

.page-faq__toc-label {
  font-family: var(--ayx-font-mono);
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--ayx-yellow);
  margin-bottom: var(--ayx-space-md);
  border-bottom: var(--ayx-border-width) solid currentColor;
  padding-bottom: var(--ayx-space-sm);
}

.page-faq__toc-list {
  display: flex;
  flex-direction: column;
}

.page-faq__toc-link {
  font-family: var(--ayx-font-mono);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ayx-text-primary);
  text-decoration: none;
  padding: var(--ayx-space-sm) 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.22);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.page-faq__toc-link:hover,
.page-faq__toc-link:focus {
  color: var(--ayx-yellow);
  padding-left: var(--ayx-space-sm);
}

.page-faq__toc-num {
  display: inline-block;
  min-width: 28px;
  color: var(--ayx-electric-blue);
}

.page-faq__toc-help {
  margin-top: var(--ayx-space-lg);
  padding-top: var(--ayx-space-md);
  border-top: var(--ayx-border-width) solid rgba(255, 255, 255, 0.25);
}

.page-faq__toc-help p {
  font-size: 14px;
  color: var(--ayx-text-secondary);
  margin-bottom: var(--ayx-space-md);
}

.page-faq__content {
  display: flex;
  flex-direction: column;
  gap: var(--ayx-space-xl);
}

.page-faq__section {
  border: var(--ayx-border-width) solid var(--ayx-ink);
  border-radius: var(--ayx-border-radius);
  padding: var(--ayx-space-lg);
  background: var(--ayx-deep-purple);
  box-shadow: var(--ayx-shadow-sm);
  scroll-margin-top: var(--ayx-space-lg);
}

.page-faq__section-head {
  display: flex;
  align-items: baseline;
  gap: var(--ayx-space-md);
  margin-bottom: var(--ayx-space-md);
}

.page-faq__section-num {
  font-family: var(--ayx-font-mono);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--ayx-orange);
}

.page-faq__section-head .ayx-section-head__title {
  font-size: 26px;
  font-weight: 900;
  color: var(--ayx-text-primary);
  margin: 0;
}

.page-faq__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--faq-text-muted);
  margin-bottom: var(--ayx-space-lg);
}

.page-faq__quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ayx-space-lg);
}

.page-faq__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: faq-step;
}

.page-faq__step {
  position: relative;
  padding: var(--ayx-space-sm) 0 var(--ayx-space-md) 48px;
  counter-increment: faq-step;
}

.page-faq__step::before {
  content: counter(faq-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--ayx-space-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--ayx-border-width) solid var(--ayx-ink);
  background: var(--ayx-paper);
  color: var(--ayx-ink);
  font-family: var(--ayx-font-mono);
  font-size: 14px;
  font-weight: 700;
}

.page-faq__step h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ayx-text-primary);
  margin-bottom: 4px;
}

.page-faq__step p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--faq-text-muted);
}

.page-faq__media {
  border: var(--ayx-border-width) solid var(--ayx-ink);
  border-radius: var(--ayx-border-radius);
  background: var(--ayx-paper);
  padding: var(--ayx-space-sm);
  margin: 0;
  align-self: start;
}

.page-faq__media--wide {
  margin-top: var(--ayx-space-lg);
}

.page-faq__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: calc(var(--ayx-border-radius) - 4px);
}

.page-faq__media figcaption {
  font-family: var(--ayx-font-mono);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ayx-ink);
  padding: var(--ayx-space-sm) var(--ayx-space-sm) 0;
}

.page-faq__qa-list {
  display: flex;
  flex-direction: column;
  gap: var(--ayx-space-md);
}

.page-faq__qa {
  border: var(--ayx-border-width) solid var(--ayx-ink);
  border-radius: var(--ayx-border-radius);
  background: var(--ayx-paper);
  overflow: hidden;
}

.page-faq__qa-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ayx-space-md);
  cursor: pointer;
  list-style: none;
  padding: var(--ayx-space-md);
  font-size: 16px;
  font-weight: 700;
  color: var(--ayx-ink);
  transition: background 0.2s ease;
}

.page-faq__qa-title::-webkit-details-marker {
  display: none;
}

.page-faq__qa-title::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--ayx-font-mono);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--ayx-orange);
  transition: transform 0.3s ease;
}

.page-faq__qa[open] .page-faq__qa-title {
  background: rgba(217, 248, 33, 0.18);
  border-bottom: var(--ayx-border-width) solid var(--ayx-ink);
}

.page-faq__qa[open] .page-faq__qa-title::after {
  transform: rotate(45deg);
}

.page-faq__qa-body {
  padding: var(--ayx-space-md);
  animation: page-faq-fade-in 0.3s ease;
}

.page-faq__qa-body p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ayx-ink);
  margin-bottom: var(--ayx-space-sm);
}

.page-faq__qa-body a {
  color: var(--ayx-electric-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-faq__note {
  display: flex;
  align-items: center;
  gap: var(--ayx-space-md);
  margin-top: var(--ayx-space-lg);
  padding: var(--ayx-space-md);
  border: var(--ayx-border-width) solid var(--ayx-ink);
  border-radius: var(--ayx-border-radius);
  background: var(--ayx-ink);
}

.page-faq__note p {
  margin: 0;
  font-size: 14px;
  color: var(--ayx-text-primary);
}

.page-faq__note a {
  color: var(--ayx-yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes page-faq-fade-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  .page-faq__layout {
    grid-template-columns: var(--faq-toc-width) minmax(0, 1fr);
    gap: var(--ayx-space-xl);
  }

  .page-faq__section {
    padding: var(--ayx-space-xl);
  }

  .page-faq__section-num {
    font-size: 40px;
  }

  .page-faq__section-head .ayx-section-head__title {
    font-size: 32px;
  }

  .page-faq__quick-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .page-faq__masthead {
    padding: var(--ayx-space-xl);
  }
}

@media (max-width: 560px) {
  .page-faq__section-head .ayx-section-head__title {
    font-size: 22px;
  }

  .page-faq__step {
    padding-left: 40px;
  }

  .page-faq__step::before {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .page-faq__section-num {
    font-size: 26px;
  }
}
