/* ══════════════════════════════════════════════════════════════
   FAQ PAGE — Design System v2
══════════════════════════════════════════════════════════════ */

main { display: block; } /* Ensure sticky works correctly by overriding base.css flex */

/* ── Page Hero blobs ─────────────────────────────────────────── */
.page-hero__blob-1 {
    width: 440px; height: 440px;
    background: radial-gradient(circle at 40% 40%, var(--sage-100), transparent 70%);
    top: -100px; right: -80px;
    opacity: 0.6;
}

.page-hero__blob-2 {
    width: 220px; height: 220px;
    background: var(--clay-100);
    bottom: -80px; left: 10%;
    opacity: 0.4;
}

/* ── Search ────────────────────────────────────────────────── */
.search-wrap {
    margin-top: 36px;
    max-width: 520px;
    position: relative;
}

.search-input {
    width: 100%;
    appearance: none;
    font-family: inherit;
    font-size: 0.98rem;
    padding: 18px 24px 18px 52px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    transition: all var(--dur-fast);
}

/* Hide native search clear button */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    display: none;
}

.search-input::-ms-clear,
.search-input::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

.search-input:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    appearance:none;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    display: none;
}

.search-clear.is-shown { display: block; }

/* ── Doc Layout (Privacy Style) ─────────────────────────────── */
.doc {
    padding: 64px 0 112px;
    overflow: visible;
}

.doc__grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 72px;
    max-width: 1040px;
    margin: 0 auto;
    align-items: start;
    overflow: visible;
}

/* ── TOC Sidebar (Privacy Style) ────────────────────────────── */
.doc__toc {
    position: sticky;
    top: 96px;
    padding: 24px 0;
    font-size: 0.85rem;
}

.doc__toc-label {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
    padding-left: 14px;
}

.doc__toc ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    counter-reset: toc;
}

.doc__toc li { counter-increment: toc; }

.doc__toc a {
    display: block;
    padding: 8px 14px;
    border-left: 2px solid var(--border);
    color: var(--text-muted);
    transition: all var(--dur-fast);
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}

.doc__toc a::before {
    content: counter(toc, decimal-leading-zero) ' ';
    color: var(--ink-300);
    margin-right: 6px;
    font-variant-numeric: tabular-nums;
}

.doc__toc a:hover { color: var(--text); border-left-color: var(--border-strong); }
.doc__toc a.is-active { color: var(--primary); border-left-color: var(--primary); }

/* ── FAQ Body ───────────────────────────────────────────────── */
.doc__body { max-width: 720px; }

.cat {
    margin-bottom: 48px;
}

.cat:last-child { margin-bottom: 0; }

.cat__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.cat__head h2 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.015em;
}

.cat__head span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
}

.q {
    border-bottom: 1px solid var(--border);
    transition: all var(--dur-fast);
}

.q__trigger {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
    padding: 20px 48px 20px 0;
    position: relative;
    font-size: 1.02rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.45;
    transition: color var(--dur-fast);
    letter-spacing: -0.005em;
}

.q__trigger:hover { color: var(--primary); }

.q__trigger::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 14px; height: 14px;
    transform: translateY(-50%) rotate(0);
    transition: transform var(--dur-base) var(--ease-soft);
    background-image:
      linear-gradient(var(--text-muted), var(--text-muted)),
      linear-gradient(var(--text-muted), var(--text-muted));
    background-size: 14px 1px, 1px 14px;
    background-position: center, center;
    background-repeat: no-repeat;
}

.q.is-open .q__trigger::after { transform: translateY(-50%) rotate(135deg); }

.q__body {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--dur-base) var(--ease-soft);
}

.q__content {
    padding: 0 32px 28px 0;
}

.q__body p {
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.75;
}

.q__body p + p { margin-top: 14px; }

/* ── Empty state ────────────────────────────────────────────── */
.empty {
    padding: 80px 32px;
    text-align: center;
    border: 1px dashed var(--cream-300);
    border-radius: var(--radius-lg);
    background: var(--cream-50);
    display: none;
}

.empty.is-shown { display: block; }

.empty h3 {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: -0.015em;
}

.empty p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 10px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Still curious CTA ──────────────────────────────────────── */
.still {
    padding: 80px 0 120px;
    background: var(--cream-100);
}

.still__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 56px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.still h2 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.still h2 em {
    font-style: italic;
    color: var(--primary);
    font-weight: 300;
}

.still p {
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.75;
    margin-top: 14px;
}

.still__ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Search highlight ───────────────────────────────────────── */
mark {
    background: var(--clay-100);
    color: var(--text);
    padding: 1px 2px;
    border-radius: 2px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .doc__grid { grid-template-columns: 1fr; gap: 40px; }
    .doc__toc { position: static; padding: 0; }
    .doc__toc ol { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .doc__toc li { counter-increment: none; }
    .doc__toc a {
        border-left: none;
        border: 1px solid var(--border);
        border-radius: var(--radius-pill);
        padding: 6px 12px;
        font-size: 0.78rem;
    }
    .doc__toc a::before { display: none; }
    .doc__toc a.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

    .still__inner { grid-template-columns: 1fr; padding: 36px; }
    .still__ctas {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .still__ctas {
        flex-direction: column;
        align-items: stretch;
    }
}

