/* FAQ page. Colors and base components come from market.css. */

.faq-page { width: 100%; max-width: 860px; margin: 0 auto; padding: 8px 0 60px; display: flex; flex-direction: column; gap: 18px; }

/* ---- hero + search ---- */
.faq-hero {
    padding: 38px 28px 30px; text-align: center;
    background: radial-gradient(620px 240px at 50% -10%, rgba(59, 130, 246, 0.22), transparent 70%), var(--bg-1);
    border: 1px solid var(--border); border-radius: 16px;
}
.faq-eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; }
.faq-hero h1 { margin: 14px 0 10px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.faq-hero p { max-width: 540px; margin: 0 auto; font-size: 15px; line-height: 1.6; color: var(--text-dim); }
.faq-search { position: relative; max-width: 560px; margin: 24px auto 0; }
.faq-search > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); pointer-events: none; }
.faq-search input {
    width: 100%; padding: 14px 44px 14px 42px; font-size: 14.5px; color: var(--text);
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; outline: none;
    -webkit-appearance: none; appearance: none;
}
.faq-search input::-webkit-search-cancel-button { display: none; }
.faq-search input::placeholder { color: var(--text-muted); }
.faq-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.faq-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; font-size: 12px; color: var(--text-muted); background: transparent; border: 0; border-radius: 50%; }
.faq-clear:hover { color: var(--text); background: var(--bg-3); }
.faq-clear[hidden] { display: none; }

/* ---- topic chips ---- */
.faq-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-cat { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); background: var(--bg-1); border: 1px solid var(--border); border-radius: 999px; transition: all 0.15s ease; }
.faq-cat:hover { color: var(--text); border-color: #34424e; }
.faq-cat.is-active { color: #fff; background: var(--accent-soft); border-color: rgba(59, 130, 246, 0.5); }
.faq-cat-count { padding: 0 6px; font-size: 10.5px; font-weight: 800; color: var(--text-muted); background: var(--bg-3); border-radius: 999px; }
.faq-cat.is-active .faq-cat-count { color: #fff; background: rgba(59, 130, 246, 0.4); }
.faq-status { min-height: 0; font-size: 13px; color: var(--text-muted); }
.faq-status:empty { display: none; }

/* ---- groups + accordion ---- */
.faq-group { margin-bottom: 26px; }
.faq-group[hidden] { display: none; }
.faq-group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 16px; font-weight: 800; }
.faq-group-title i { width: 30px; height: 30px; display: grid; place-items: center; font-size: 13px; color: var(--accent); background: var(--accent-soft); border-radius: 9px; }
.faq-items { display: grid; gap: 8px; }
.faq-item { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.15s ease; scroll-margin-top: 90px; }
.faq-item[hidden] { display: none; }
.faq-item:hover { border-color: #34424e; }
.faq-item[open] { border-color: rgba(59, 130, 246, 0.45); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; font-size: 14.5px; font-weight: 700; line-height: 1.4; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.faq-item summary i { flex-shrink: 0; font-size: 12px; color: var(--text-muted); transition: transform 0.2s ease; }
.faq-item[open] summary i { transform: rotate(180deg); color: var(--accent); }

.faq-answer { padding: 0 18px 18px; font-size: 13.75px; line-height: 1.65; color: var(--text-dim); }
.faq-answer > * + * { margin-top: 10px; }
.faq-answer strong { color: var(--text); font-weight: 700; }
.faq-answer ul { list-style: disc; padding-left: 20px; }
.faq-answer ol { list-style: decimal; padding-left: 22px; }
.faq-answer li + li { margin-top: 6px; }
.faq-answer li::marker { color: var(--text-muted); }
.faq-answer a { color: var(--accent); font-weight: 600; }
.faq-answer a:hover { text-decoration: underline; }
.faq-answer code { padding: 2px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text); background: var(--bg-3); border-radius: 5px; }
.faq-cols { columns: 2; column-gap: 28px; }
.faq-cols li { break-inside: avoid; }

/* ---- empty state ---- */
.faq-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; font-size: 13.5px; color: var(--text-muted); background: var(--bg-1); border: 1px dashed var(--border); border-radius: 12px; }
.faq-empty[hidden] { display: none; }
.faq-empty i { font-size: 26px; opacity: 0.6; }
.faq-empty strong { font-size: 15px; color: var(--text); }
.faq-link-btn { padding: 0; font-size: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; }
.faq-link-btn:hover { text-decoration: underline; }

/* ---- still need help ---- */
.faq-help { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px; background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), var(--bg-1) 70%); border: 1px solid var(--border); border-radius: 14px; }
.faq-help-icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; color: var(--accent); background: var(--accent-soft); border-radius: 12px; }
.faq-help h2 { margin-bottom: 4px; font-size: 17px; font-weight: 800; }
.faq-help p { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.faq-help a { color: var(--accent); font-weight: 700; }
.faq-help a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .faq-hero { padding: 28px 16px 24px; }
    .faq-hero h1 { font-size: 27px; }
    .faq-item summary { padding: 14px; font-size: 14px; }
    .faq-answer { padding: 0 14px 16px; }
    .faq-cols { columns: 1; }
    .faq-help { padding: 18px 16px; }
}
