/* 问答组件（FAQ）：展开项白底、收起项深色卡片，参数由实例数据驱动。 */
.aoyea-component-faq {
  --aoyea-faq-accent: #39b54a;
  --aoyea-faq-font-size: 15px;
  --aoyea-faq-radius: 12px;
  width: 100%;
  color: #fff;
  font-family: "Lexend Deca", "Inter", sans-serif;
  interpolate-size: allow-keywords;
}

.aoyea-component-faq .aoyea-faq-list {
  display: grid;
  gap: 18px;
}

.aoyea-component-faq .aoyea-faq-item {
  min-height: 69px;
  overflow: hidden;
  border-radius: var(--aoyea-faq-radius);
  background: #212121;
  transition:
    min-height 320ms cubic-bezier(0.2, 0.75, 0.25, 1),
    background-color 320ms ease,
    color 320ms ease;
}

.aoyea-component-faq .aoyea-faq-item::details-content {
  display: block;
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 320ms cubic-bezier(0.2, 0.75, 0.25, 1),
    content-visibility 320ms allow-discrete;
}

.aoyea-component-faq .aoyea-faq-item[open]::details-content {
  block-size: auto;
}

.aoyea-component-faq .aoyea-faq-item[open] {
  min-height: 148px;
  background: #fff;
  color: #111;
}

.aoyea-component-faq .aoyea-faq-item summary {
  display: grid;
  min-height: 69px;
  grid-template-columns: 110px 1fr 38px;
  align-items: center;
  padding: 0 40px 0 54px;
  cursor: pointer;
  list-style: none;
  font-size: var(--aoyea-faq-font-size);
  line-height: 1.5;
}

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

.aoyea-component-faq .aoyea-faq-index {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.aoyea-component-faq .aoyea-faq-question {
  min-width: 0;
}

.aoyea-component-faq .aoyea-faq-toggle {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  /* 字符箭头字形偏上，改用伪元素画箭头并绝对居中 */
  font-size: 0;
  font-style: normal;
  line-height: 1;
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

.aoyea-component-faq .aoyea-faq-toggle::before {
  content: "";
  position: absolute;
  top: calc(50% + 1px);
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 220ms ease;
}

.aoyea-component-faq .aoyea-faq-item[open] .aoyea-faq-toggle {
  background: var(--aoyea-faq-accent);
  color: #fff;
}

.aoyea-component-faq .aoyea-faq-item[open] .aoyea-faq-toggle::before {
  transform: translate(-50%, -50%) rotate(225deg);
}

.aoyea-component-faq .aoyea-faq-answer {
  margin: -2px 40px 26px 164px;
  font-family: "Lexend Deca", "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

/* 编号隐藏：问题整体左移，回答同步对齐 */
.aoyea-component-faq.aoyea-faq--no-number .aoyea-faq-item summary {
  grid-template-columns: 1fr 38px;
  padding-left: 54px;
}

.aoyea-component-faq.aoyea-faq--no-number .aoyea-faq-index {
  display: none;
}

.aoyea-component-faq.aoyea-faq--no-number .aoyea-faq-answer {
  margin-left: 54px;
}

/* 浅色主题 */
.aoyea-component-faq[data-theme="light"] {
  color: #111;
}

.aoyea-component-faq[data-theme="light"] .aoyea-faq-item {
  background: #f1f3f6;
}

.aoyea-component-faq[data-theme="light"] .aoyea-faq-item[open] {
  background: #fff;
}

@media (max-width: 767px) {
  .aoyea-component-faq .aoyea-faq-list {
    gap: 12px;
  }

  .aoyea-component-faq .aoyea-faq-item summary {
    grid-template-columns: 58px 1fr 32px;
    padding: 0 16px 0 18px;
  }

  .aoyea-component-faq .aoyea-faq-index {
    font-size: 20px;
  }

  .aoyea-component-faq .aoyea-faq-toggle {
    width: 32px;
    height: 32px;
  }

  .aoyea-component-faq .aoyea-faq-answer {
    margin: 0 16px 20px 76px;
  }

  .aoyea-component-faq.aoyea-faq--no-number .aoyea-faq-answer {
    margin-left: 18px;
  }
}

