/* =========================================================
   faq.css — /faq page. Uses the tokens from base CSS (:root).
   All classes are prefixed .fq- so nothing clashes with home.css
   ========================================================= */

[hidden] {
  display: none !important;
}

/* ---------- Hero ---------- */
/* Shorter, softer variant of the shared .hero-banner (see base.css). */
.fq-hero {
  --hero-pad-b: clamp(28px, 4vw, 44px);
  --hero-mask-op: .5;
  --hero-mask-pos: 50% 20%;
}

.fq-hero h1 {
  margin: .3em 0 .4em;
}

.fq-hero .lead {
  margin-inline: auto;
  max-width: 62ch;
}

/* ---------- Search ---------- */
.fq-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 28px auto 0;
  padding: 0 14px 0 18px;
  height: 54px;
  border-radius: var(--r);
  border: 1px solid var(--blue-65);
  background: var(--surface-72);
  box-shadow: 0 0 0 4px var(--blue-14), var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.fq-search:focus-within {
  border-color: var(--blue-90);
  box-shadow: 0 0 0 4px var(--blue-14), 0 0 28px var(--blue-14), var(--shadow);
}

.fq-search>.icon {
  color: var(--muted);
  font-size: 1rem;
}

.fq-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}

.fq-search input::placeholder {
  color: var(--muted);
}

.fq-search input::-webkit-search-cancel-button {
  display: none;
}

.fq-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--blue-14);
  color: var(--text);
  cursor: pointer;
}

.fq-clear .icon {
  font-size: .875rem;
}

.fq-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: .875rem;
  color: var(--muted);
}

/* ---------- Category tabs (sticky) ---------- */
.fq-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.fq-tabs-in {
  display: flex;
  gap: 10px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.fq-tabs-in::-webkit-scrollbar {
  display: none;
}

.fq-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--chip);
  color: var(--text-80);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.fq-tab .icon {
  font-size: .85rem;
}

.fq-tab:hover {
  border-color: var(--brand-a-55);
  color: var(--text);
}

.fq-tab.is-active {
  border-color: transparent;
  background: var(--grad);
  color: var(--on-brand);
}

.fq-tab:focus-visible,
.fq-q:focus-visible,
.fq-clear:focus-visible {
  outline: 2px solid var(--brand-b);
  outline-offset: 2px;
}

/* ---------- Sections ---------- */
/* /faq page wrapper (a div, not the shared .section FAQ block) */
.fq-main:not(.section) {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.fq-sec {
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 70px);
}

.fq-sec:first-child {
  border-top: 0;
}

.fq-sec-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.fq-sec-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: var(--on-brand);
  font-size: 1.35rem;
}

.fq-sec-txt {
  flex: 1;
  min-width: 0;
}

.fq-kicker {
  display: block;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-b);
  margin-bottom: 2px;
}

.fq-sec-txt h2 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.fq-sec-txt p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  max-width: 62ch;
}

.fq-count {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--blue-32);
  background: var(--blue-12);
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Single column layout ---------- */
.fq-cols {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Question card ---------- */
.fq-item {
  min-width: 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  scroll-margin-top: calc(var(--header-h) + 80px);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

/* alt sections use --bg-2, so the card steps up one surface level to stay visible */
.section.alt .fq-item {
  background: var(--surface-2);
}

.fq-item.is-open {
  border-color: var(--line-2);
}

.fq-h {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.fq-q {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--head);
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.fq-q:hover {
  background: var(--surface-light);
}

.fq-q:hover .fq-chev {
  background: var(--surface);
  border-color: var(--line);
}

.fq-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2) !important;
  background: var(--blue-12);
  color: var(--brand-b);
  font-size: 1.05rem;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.fq-item.is-open .fq-ico {
  border-color: transparent;
  background: var(--grad);
  color: var(--on-brand);
}

.fq-qt {
  flex: 1;
  min-width: 0;
}

.fq-chev {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--muted);
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), color .25s ease, background .25s ease, border-color .25s ease;
}

.fq-q:hover .fq-chev {
  background: var(--surface);
  border-color: var(--line);
}

.fq-chev .icon {
  font-size: .875rem;
}

.fq-item.is-open .fq-chev {
  transform: rotate(180deg);
  background: var(--grad);
  border-color: transparent;
  color: var(--on-brand);
}

/* ---------- Answer (grid 0fr → 1fr; collapsed only when JS is running) ---------- */
.fq-a {
  display: grid;
  grid-template-rows: 1fr;
}

.fq-a-in {
  min-height: 0;
  overflow: hidden;
  padding: 0 20px 18px 70px;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.7;
}

.fq-a-in p {
  margin: 0 0 10px;
}

.fq-a-in p:last-child {
  margin-bottom: 0;
}

.js .fq-a {
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows .4s cubic-bezier(.22, .61, .36, 1),
    opacity .3s ease,
    visibility 0s linear .4s;
}

.js .fq-item.is-open .fq-a {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.js .fq-item:not(.is-open) .fq-a-in {
  padding-bottom: 0;
}

.fq-steps {
  margin: 0 0 12px;
  padding-left: 1.15em;
  display: grid;
  gap: 6px;
}

.fq-steps li::marker {
  color: var(--brand-b);
  font-weight: 700;
}

.fq-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-a);
  font-weight: 650;
  font-size: .875rem;
}

.fq-more a:hover {
  text-decoration: underline;
}

.fq-more .icon {
  font-size: .875rem;
}

/* ---------- Empty state ---------- */
.fq-empty {
  text-align: center;
  padding: clamp(36px, 6vw, 64px) 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  margin-top: 24px;
}

.fq-empty>.icon {
  font-size: 1.6rem;
  color: var(--muted);
}

.fq-empty h2 {
  margin: 12px 0 6px;
  font-size: 1.2rem;
}

.fq-empty p {
  margin: 0 auto 18px;
  max-width: 46ch;
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 639px) {
  .fq-sec-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .fq-sec-ico {
    grid-column: 1;
    grid-row: 1;
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
  }

  .fq-sec-txt {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .fq-sec-txt h2,
  .fq-sec-txt p {
    overflow-wrap: anywhere;
  }

  .fq-count {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    padding: 6px 12px;
    font-size: .8rem;
  }

  .fq-q {
    min-width: 0;
  }

  .fq-qt {
    overflow-wrap: anywhere;
  }

  .fq-a-in {
    overflow-wrap: anywhere;
  }

  .fq-q {
    padding: 12px 12px;
    gap: 12px;
    font-size: .875rem;
  }

  .fq-ico {
    width: 36px;
    height: 36px;
  }

  .fq-a-in {
    padding: 0 16px 16px 16px;
    font-size: .875rem;
  }

  .fq-search {
    height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .fq-item,
  .fq-chev,
  .fq-ico,
  .fq-tab,
  .js .fq-a {
    transition: none !important;
  }
}

/* ---------- Community section ---------- */
.cm-panel {
  gap: 32px;
}

.cm-copy {
  min-width: 0;
}

.cm-feats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cm-feat strong {
  display: block;
  color: var(--head);
  font-size: .9rem;
  line-height: 1.3;
}

.cm-feat small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
}

/* tone tiles (shared by features + stats) */
.cm-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  font-size: 1.05rem;
  /* one brand colour for every icon tile (site-wide icon rule) */
  color: var(--brand-b);
  background: var(--brand-b-12);
  border: 1px solid var(--brand-b-32);
}

.cm-ico.tone-pink {
  --t: 255, 10, 142;
}

.cm-ico.tone-violet {
  --t: 167, 123, 255;
}

.cm-ico.tone-amber {
  --t: 255, 160, 48;
}

.cm-ico.tone-blue {
  --t: 96, 165, 250;
}

.cm-ico.tone-green {
  --t: 45, 212, 160;
}

@media (min-width: 560px) {
  .cm-feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .cm-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 40px;
  }
}