.page-faq {
  --faq-border: rgba(138, 148, 166, 0.16);
  --faq-line: #232B36;
  color: var(--text-paper);
  background: var(--bg-night);
  font-family: var(--font-body);
}

/* ---------- Breadcrumb ---------- */
.page-faq .faq-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 38px;
  font-size: 0.875rem;
}

.page-faq .faq-breadcrumb-link {
  color: var(--text-mist);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-faq .faq-breadcrumb-link:hover,
.page-faq .faq-breadcrumb-link:focus-visible {
  color: var(--accent-orange);
}

.page-faq .faq-breadcrumb-sep {
  color: var(--text-mist);
}

.page-faq .faq-breadcrumb-current {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ---------- Directory header ---------- */
.page-faq .faq-directory {
  padding: 60px 0 40px;
}

.page-faq .faq-directory-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 520px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--faq-border);
}

.page-faq .faq-directory-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-orange);
}

.page-faq .faq-directory-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mist);
}

.page-faq .faq-directory-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 5.2rem);
  line-height: 1.05;
  font-weight: 900;
  margin: 0 0 20px;
  max-width: 900px;
  letter-spacing: -0.01em;
}

.page-faq .faq-directory-title em {
  position: relative;
  font-style: normal;
  color: var(--accent-orange);
}

.page-faq .faq-directory-title em::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.08em;
  width: 100%;
  height: 0.18em;
  background: linear-gradient(90deg, rgba(255, 122, 0, 0.35), transparent 80%);
  pointer-events: none;
}

.page-faq .faq-directory-desc {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--text-mist);
  font-size: 1rem;
  line-height: 1.8;
}

.page-faq .faq-directory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-faq .faq-directory-meta .tag-chip {
  border-color: rgba(212, 175, 55, 0.55);
  color: var(--text-paper);
  background: rgba(212, 175, 55, 0.08);
}

.page-faq .faq-directory-visual {
  position: relative;
  margin-top: 36px;
  background: var(--bg-panel);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 0 100%);
}

.page-faq .faq-directory-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- FAQ layout ---------- */
.page-faq .faq-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: 8px 0 0;
}

/* ---------- Index / directory ---------- */
.page-faq .faq-index-head {
  background: var(--bg-panel);
  border-left: 3px solid var(--accent-gold);
  padding: 20px 18px 18px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.page-faq .faq-index-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 6px;
}

.page-faq .faq-index-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.page-faq .faq-index-sub {
  margin: 6px 0 0;
  color: var(--text-mist);
  font-size: 0.85rem;
}

.page-faq .faq-index-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.page-faq .faq-index-item {
  margin: 0;
}

.page-faq .faq-index-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--faq-border);
  border-left: 3px solid rgba(138, 148, 166, 0.5);
  color: var(--text-paper);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.page-faq .faq-index-link:hover,
.page-faq .faq-index-link:focus-visible {
  border-left-color: var(--accent-orange);
  border-color: rgba(255, 122, 0, 0.45);
  background: #1b222d;
  transform: translateX(3px);
  outline: none;
}

.page-faq .faq-index-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.page-faq .faq-index-label {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
}

.page-faq .faq-index-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mist);
  background: rgba(138, 148, 166, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.page-faq .faq-index-note {
  margin-top: 18px;
  padding: 16px 16px 14px;
  border: 1px dashed rgba(255, 122, 0, 0.4);
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.1), rgba(212, 175, 55, 0.04));
}

.page-faq .faq-index-note-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-orange);
  transform: rotate(45deg);
  margin-bottom: 10px;
}

.page-faq .faq-index-note-text {
  margin: 0 0 12px;
  color: var(--text-mist);
  font-size: 0.85rem;
  line-height: 1.6;
}

.page-faq .faq-index-note-link {
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.page-faq .faq-index-note-link:hover,
.page-faq .faq-index-note-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ---------- FAQ sections ---------- */
.page-faq .faq-section {
  scroll-margin-top: 90px;
  padding: 48px 0 12px;
  border-top: 1px solid var(--faq-border);
}

.page-faq .faq-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.page-faq .faq-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 26px;
}

.page-faq .faq-section-index {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-orange);
  border: 1px solid rgba(255, 122, 0, 0.45);
  background: rgba(255, 122, 0, 0.06);
  padding: 5px 10px;
  transform: rotate(-4deg);
  white-space: nowrap;
}

.page-faq .faq-section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 6px;
}

.page-faq .faq-section-heading p {
  margin: 0;
  color: var(--text-mist);
  font-size: 0.9rem;
  line-height: 1.6;
}

.page-faq .faq-section-line {
  flex: 1;
  height: 14px;
  align-self: flex-end;
  margin-left: auto;
  border-bottom: 1px solid var(--faq-border);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

/* ---------- FAQ list & accordion item ---------- */
.page-faq .faq-list {
  display: grid;
  gap: 14px;
}

.page-faq .faq-item {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--faq-border);
  border-left: 3px solid rgba(255, 122, 0, 0.5);
  border-radius: 2px 10px 10px 2px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.page-faq .faq-item:hover,
.page-faq .faq-item[open] {
  border-color: rgba(255, 122, 0, 0.35);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 122, 0, 0.08);
}

.page-faq .faq-item[open] {
  transform: translateX(2px);
}

.page-faq .faq-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(212, 175, 55, 0.08), transparent 30%);
  border-radius: inherit;
}

.page-faq details.faq-item > summary {
  list-style: none;
}

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

.page-faq .faq-item-heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 18px 14px;
  cursor: pointer;
  color: var(--text-paper);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  transition: color 0.2s ease;
  user-select: none;
}

.page-faq .faq-item-heading:hover,
.page-faq .faq-item-heading:focus-visible,
.page-faq .faq-item[open] > .faq-item-heading {
  color: var(--accent-orange);
}

.page-faq .faq-item-heading:focus-visible {
  outline: none;
  background: rgba(255, 122, 0, 0.06);
}

.page-faq .faq-item-mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-orange);
  background: rgba(255, 122, 0, 0.1);
  border: 1px solid rgba(255, 122, 0, 0.5);
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.page-faq .faq-item[open] > .faq-item-heading .faq-item-mark {
  background: var(--accent-orange);
  color: #0B0E14;
  transform: rotate(-6deg);
}

.page-faq .faq-item-question {
  flex: 1;
}

.page-faq .faq-item-toggle {
  position: relative;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-left: auto;
}

.page-faq .faq-item-toggle::before,
.page-faq .faq-item-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 2px;
  background: var(--text-mist);
  transition: background 0.2s ease, transform 0.3s ease;
}

.page-faq .faq-item-toggle::after {
  transform: rotate(90deg);
}

.page-faq .faq-item-heading:hover .faq-item-toggle::before,
.page-faq .faq-item-heading:hover .faq-item-toggle::after,
.page-faq .faq-item[open] > .faq-item-heading .faq-item-toggle::before,
.page-faq .faq-item[open] > .faq-item-heading .faq-item-toggle::after {
  background: var(--accent-orange);
}

.page-faq .faq-item[open] > .faq-item-heading .faq-item-toggle::after {
  transform: rotate(0deg);
}

/* ---------- FAQ answer ---------- */
.page-faq .faq-item-answer {
  display: none;
  border-top: 1px solid rgba(138, 148, 166, 0.12);
}

.page-faq .faq-item[open] > .faq-item-answer {
  display: block;
  animation: page-faq-answer-in 0.35s ease both;
}

.page-faq .faq-item-answer-inner {
  padding: 16px 18px 20px;
  color: #C7CDD8;
  font-size: 0.96rem;
  line-height: 1.85;
}

.page-faq .faq-item-answer-inner p {
  margin: 0 0 10px;
}

.page-faq .faq-item-answer-inner p:last-child {
  margin-bottom: 0;
}

.page-faq .faq-inline-link {
  color: var(--accent-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.page-faq .faq-inline-link:hover,
.page-faq .faq-inline-link:focus-visible {
  color: var(--accent-gold);
}

/* ---------- Contact strip ---------- */
.page-faq .faq-contact {
  position: relative;
  margin-top: 72px;
  background: linear-gradient(180deg, rgba(21, 27, 35, 0.6), rgba(11, 14, 20, 0.95));
  border-top: 1px solid rgba(255, 122, 0, 0.3);
  overflow: hidden;
}

.page-faq .faq-contact::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 200px;
  height: 3px;
  background: var(--accent-orange);
}

.page-faq .faq-contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 56px 0 64px;
}

.page-faq .faq-contact-visual {
  order: -1;
  margin: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

.page-faq .faq-contact-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.page-faq .faq-contact-card {
  position: relative;
  background: var(--bg-panel);
  border-left: 3px solid var(--accent-gold);
  padding: 28px 24px;
}

.page-faq .faq-contact-overline {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 10px;
}

.page-faq .faq-contact-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
}

.page-faq .faq-contact-desc {
  color: var(--text-mist);
  line-height: 1.8;
  margin: 0 0 22px;
}

.page-faq .faq-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.page-faq .faq-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.page-faq .faq-contact-note {
  margin: 0;
  color: var(--text-mist);
  font-size: 0.85rem;
  line-height: 1.6;
}

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

/* ---------- Medium: contact two columns ---------- */
@media (min-width: 768px) {
  .page-faq .faq-contact-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: center;
  }

  .page-faq .faq-contact-visual {
    order: 0;
  }

  .page-faq .faq-item-answer-inner {
    padding-left: 60px;
    padding-right: 28px;
  }
}

/* ---------- Desktop: index aside + faq main ---------- */
@media (min-width: 1024px) {
  .page-faq .faq-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }

  .page-faq .faq-index {
    position: sticky;
    top: 28px;
  }

  .page-faq .faq-index-list {
    grid-template-columns: 1fr;
  }
}

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