/* ==========================================================================
   FAQ page (/sss/, /en/faq/) — tokens only, see style.css
   ========================================================================== */

.faq-page { padding-top: clamp(48px, 6vw, 80px); }

.faq-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* ---------- Side column: topics + help card ---------- */
.faq-side { display: grid; gap: 24px; align-content: start; }

@media (min-width: 961px) and (min-height: 700px) {
  .faq-side { position: sticky; top: calc(var(--header-h) + 24px); }
}

.faq-nav-title {
  margin: 0 0 10px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.faq-chips { display: grid; gap: 6px; }
.faq-chips a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px 8px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.3;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.faq-chips a:hover { background: var(--bg-elev); border-color: var(--line); color: var(--ink); }
.faq-chips a.is-active {
  background: var(--bg-elev);
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--accent);
}
.faq-chip-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.faq-chip-icon .icon { width: 18px; height: 18px; }
.faq-chip-label { flex: 1; min-width: 0; }
.faq-chip-count {
  flex: none;
  min-width: 26px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-3);
}

.faq-help {
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.faq-help-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.faq-help-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.faq-help-icon .icon { width: 20px; height: 20px; }
.faq-help h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.faq-help-text { margin: 0 0 18px; color: var(--ink-2); font-size: .95rem; }
.faq-help-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.faq-help-actions .btn { width: 100%; white-space: normal; text-align: center; }
.faq-help-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
  font-size: .86rem;
  color: var(--ink-3);
}
.faq-help-meta a,
.faq-help-meta span { display: inline-flex; align-items: center; gap: 8px; }
.faq-help-meta a { font-weight: 600; color: var(--ink-2); }
.faq-help-meta a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.faq-help-meta .icon { width: 16px; height: 16px; }

/* ---------- Question groups ---------- */
.faq-group + .faq-group { margin-top: clamp(56px, 7vw, 88px); }

.faq-group-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.faq-group-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  flex: none;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.faq-group-icon .icon { width: 24px; height: 24px; }
.faq-group-copy { flex: 1; min-width: 0; }
.faq-group-head h2 { font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.2rem); margin-bottom: 6px; }
.faq-group-head p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.faq-group-count { flex: none; margin-top: 8px; }

.faq-item:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-side { gap: 20px; }
  .faq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .faq-chips a {
    min-height: 44px;
    padding: 5px 12px 5px 5px;
    border-color: var(--line);
    border-radius: 999px;
    background: var(--bg-elev);
    font-size: .95rem;
  }
  .faq-chips a.is-active { box-shadow: none; border-color: var(--accent); }
  .faq-chip-icon { width: 32px; height: 32px; border-radius: 50%; }
  .faq-chip-icon .icon { width: 16px; height: 16px; }
}

@media (max-width: 640px) {
  /* Compact help card above the questions: the hero lead already says the same thing. */
  .faq-help { padding: 18px 16px; }
  .faq-help-head { margin-bottom: 14px; }
  .faq-help h2 { font-size: 1.15rem; }
  .faq-help-text { display: none; }
  .faq-help-actions { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
  .faq-help-actions .btn { padding: 0 12px; font-size: .9rem; }
  .faq-help-meta { margin-top: 14px; padding-top: 12px; }
  .faq-group-head { gap: 14px; }
  .faq-group-icon { width: 42px; height: 42px; border-radius: 12px; }
  .faq-group-icon .icon { width: 21px; height: 21px; }
  .faq-group-count { display: none; }
  .faq-item summary { padding: 18px 16px; font-size: 1rem; }
  .faq-answer { padding: 0 16px 18px; }
}

@media (max-width: 380px) {
  .faq-chips a { font-size: .9rem; }
  .faq-help-actions { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .faq-side { display: none; }
  .faq-layout { grid-template-columns: 1fr; }
}
