:root {
  --black: #000019;
  --white: #fff;
  --blue: #3f35d7;
  --accent: #8b80ff;
  --muted: rgba(255, 255, 255, 0.7);
  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.28);
  --border-active: rgba(255, 255, 255, 0.45);
}

body.faq-page {
  margin: 0;
  background-color: var(--black);
  color: var(--white);
  font-family: Gilroy, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.faq-header {
  padding: 32px 40px;
  display: flex;
  align-items: center;
}

.faq-header img {
  height: 32px;
  width: auto;
}

.faq-main {
  flex: 1;
  padding: 32px 40px 80px;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.faq-hero {
  text-align: center;
  margin-bottom: 56px;
}

.faq-hero h1 {
  font-size: 56px;
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 700;
}

.faq-hero p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 20px;
  background-color: transparent;
  transition: border-color 0.2s ease;
  overflow: hidden;
  scroll-margin-top: 100px;
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item:has(.faq-toggle[aria-expanded="true"]) {
  border-color: var(--border-active);
}

.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 22px 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--white);
  font-family: inherit;
}

.faq-question-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
}

.faq-permalink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.faq-item:hover .faq-permalink,
.faq-permalink:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.faq-permalink:hover {
  color: var(--accent);
}

@media (hover: none) {
  .faq-permalink {
    opacity: 1;
    pointer-events: auto;
  }
}

.faq-chevron {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-flex;
}

.faq-toggle[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-grid {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq-item:has(.faq-toggle[aria-expanded="true"]) .faq-grid {
  grid-template-rows: 1fr;
}

.faq-grid-inner {
  overflow: hidden;
}

.faq-answer {
  padding: 0 28px 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

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

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

.faq-answer ul,
.faq-answer ol {
  padding-left: 22px;
  margin: 0 0 12px;
}

.faq-answer ul li {
  list-style: disc;
}

.faq-answer ol li {
  list-style: decimal;
}

.faq-answer li {
  margin-bottom: 6px;
}

.faq-answer h4 {
  color: var(--white);
  font-weight: 600;
  font-size: 17px;
  margin: 16px 0 8px;
}

.faq-answer strong {
  color: var(--white);
  font-weight: 600;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
}

.faq-answer a:hover {
  opacity: 0.8;
}

.faq-still-have {
  margin-top: 64px;
  text-align: center;
}

.faq-still-have p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 18px;
}

.faq-still-have a {
  color: var(--accent);
  font-size: 22px;
  text-decoration: underline;
  font-weight: 600;
}

.faq-still-have a:hover {
  opacity: 0.85;
}

/* Detail page */
.faq-detail {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.faq-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.faq-back:hover {
  color: var(--accent);
}

.faq-detail h1 {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 24px;
  font-weight: 700;
}

.faq-detail-body {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.faq-detail-body p {
  margin: 0 0 16px;
}

.faq-detail-body ul,
.faq-detail-body ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.faq-detail-body ul li {
  list-style: disc;
}

.faq-detail-body ol li {
  list-style: decimal;
}

.faq-detail-body li {
  margin-bottom: 8px;
}

.faq-detail-body h4 {
  color: var(--white);
  font-weight: 600;
  font-size: 18px;
  margin: 20px 0 10px;
}

.faq-detail-body strong {
  color: var(--white);
  font-weight: 600;
}

.faq-detail-body a {
  color: var(--accent);
  text-decoration: underline;
}

.faq-detail-body a:hover {
  opacity: 0.8;
}

/* Footer */
.faq-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 32px 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.faq-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.faq-footer a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .faq-header {
    padding: 24px 20px;
  }
  .faq-main {
    padding: 16px 20px 60px;
  }
  .faq-hero h1 {
    font-size: 36px;
  }
  .faq-hero p {
    font-size: 16px;
  }
  .faq-question-text {
    font-size: 17px;
  }
  .faq-toggle {
    padding: 18px 20px;
  }
  .faq-answer {
    padding: 0 20px 18px;
    font-size: 16px;
  }
  .faq-detail h1 {
    font-size: 28px;
  }
  .faq-detail-body {
    font-size: 16px;
  }
  .faq-footer {
    padding: 24px 20px;
    gap: 16px;
  }
}
