/* FAQ — buying work, in eight answers. */

.faq-hero .page-hero__plate {
  object-position: 50% 58%;
}

.faq-hero::before {
  background:
    linear-gradient(to top, color-mix(in oklab, var(--bg-deep) 94%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 50%, transparent) 50%, transparent 86%),
    linear-gradient(90deg, color-mix(in oklab, var(--bg-deep) 80%, transparent), color-mix(in oklab, var(--bg-deep) 18%, transparent) 58%, transparent 80%);
}

[data-theme="dark"] .faq-hero .page-hero__plate {
  filter: brightness(0.62) saturate(0.9);
}

.faq-body {
  padding-top: clamp(56px, 7vw, 104px);
}

.faq-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}

/* ── side column ───────────────────────────── */

.faq-side {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  display: grid;
  gap: 22px;
}

.faq-side__head {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.faq-side__lede {
  max-width: 30ch;
  margin-top: -4px;
}

.faq-index {
  width: 100%;
  margin: 8px 0 6px;
}

.faq-index ol {
  display: grid;
  border-left: 1px solid var(--line);
}

.faq-index a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-3);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.faq-index a:hover {
  color: var(--ink);
}

.faq-index a.is-active {
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 13px;
}

.faq-more {
  display: grid;
  gap: 10px;
  justify-items: start;
  width: 100%;
  padding: 22px 22px 24px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

.faq-more .t-small {
  max-width: 34ch;
  margin-bottom: 6px;
}

/* ── the answers ───────────────────────────── */

.faq-item {
  scroll-margin-top: calc(var(--header-h) + 36px);
}

.faq-list .qa summary {
  padding: 26px 0;
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  font-weight: 620;
  letter-spacing: -0.012em;
}

.faq-list .qa__body {
  font-family: var(--font-read);
  font-size: 1.125rem;
  line-height: 1.66;
  color: var(--ink-2);
  padding-bottom: 32px;
  max-width: 62ch;
}

:lang(zh) .faq-list .qa__body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
}

.faq-list .qa__body .t-num {
  font-family: var(--font-sans);
  font-weight: 620;
  color: var(--ink);
}

.faq-item:target .qa summary,
.faq-item.is-flash .qa summary {
  color: var(--link);
}

@media (max-width: 960px) {
  .faq-body__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* on one column the "not answered" card belongs after the answers */
  .faq-side {
    display: contents;
  }

  .faq-side__head {
    order: 1;
  }

  .faq-list {
    order: 2;
  }

  .faq-more {
    order: 3;
    margin-top: 12px;
  }

  .faq-index {
    display: none;
  }
}

/* ── the money timeline ─────────────────────── */

.faq-money {
  margin-top: clamp(28px, 4vw, 48px);
}

.faq-money__panel {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 28px clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
}

.faq-money__head .t-small {
  margin-top: 8px;
  max-width: 30ch;
}

.faq-money__rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-top: 30px;
}

.faq-money__stop {
  --tone: var(--held);
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 16px;
}

.faq-money__stop[data-tone="wait"] {
  --tone: var(--warn);
}

.faq-money__stop[data-tone="out"] {
  --tone: var(--ok);
}

/* each stop paints its own stretch of the band, so the colour changes exactly where the state does */
.faq-money__stop::before {
  content: "";
  position: absolute;
  top: -21px;
  left: 0;
  right: 3px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--tone) 70%, transparent);
}

.faq-money__stop::after {
  content: "";
  position: absolute;
  top: -26px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--tone) inset;
}

.faq-money__stop[data-tone="out"]::after {
  background: var(--tone);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.faq-money__when {
  font-size: 0.9375rem;
  font-weight: 640;
  color: var(--ink);
}

.faq-money__state {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 640;
  line-height: 1.25;
  background: color-mix(in oklab, var(--tone) 14%, transparent);
  color: color-mix(in oklab, var(--tone) 78%, var(--ink));
}

.faq-money__note {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.faq-money__note .t-num {
  font-weight: 640;
  color: var(--ink);
}

/* ── keep reading ──────────────────────────── */

.faq-next {
  margin-top: clamp(40px, 5vw, 64px);
}

.faq-next__title {
  margin-bottom: 14px;
}

.faq-next ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.faq-next__card {
  display: grid;
  gap: 6px;
  height: 100%;
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}

.faq-next__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-float), 0 0 0 1px var(--line) inset;
}

.faq-next__name {
  font-weight: 640;
  color: var(--link);
}

.faq-next__desc {
  font-size: 0.875rem;
  color: var(--ink-2);
}

@media (max-width: 1000px) {
  .faq-money__panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .faq-money__rail {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 0 0 30px;
  }

  .faq-money__stop {
    padding-right: 0;
  }

  .faq-money__stop::before {
    top: 16px;
    bottom: -18px;
    left: -24px;
    right: auto;
    width: 3px;
    height: auto;
  }

  .faq-money__stop:last-child::before {
    display: none;
  }

  .faq-money__stop::after {
    top: 3px;
    left: -29.5px;
  }

  .faq-next ul {
    grid-template-columns: 1fr;
  }
}

/* phones: the copy spans the full width, so the veil does too */
@media (max-width: 640px) {
  .faq-hero::before {
    background: linear-gradient(to bottom, color-mix(in oklab, var(--bg-deep) 70%, transparent) 0%, color-mix(in oklab, var(--bg-deep) 84%, transparent) 40%, color-mix(in oklab, var(--bg-deep) 94%, transparent) 100%);
  }

  [data-theme="dark"] .faq-hero::before {
    background: linear-gradient(to bottom, rgb(5 17 25 / 0.7) 0%, rgb(5 17 25 / 0.86) 40%, rgb(5 17 25 / 0.94) 100%);
  }
}

/* Chinese headings break at phrase boundaries (punctuation, spaces, <wbr>), never inside a
   word; a phrase wider than the line still wraps rather than overflowing. */
:lang(zh) main :is(h1, h2, h3, h4) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
