/* FAQ — help section (shared visual base with legal-page.css) */

.faq-page .faq-doc {
    margin-top: 4px;
}

.faq-intro {
    margin: 0 0 1rem;
    padding: 1rem 1.05rem;
    border-radius: 12px;
    background: rgba(30, 20, 60, 0.55);
    border: 1px solid rgba(200, 180, 255, 0.22);
    color: #d7c9f5;
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: center;
}

.faq-intro a {
    color: var(--text-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-intro a:hover {
    color: var(--text-link-hover);
}

.faq-toc {
    margin: 0 0 1.35rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(20, 12, 45, 0.45);
    border: 1px solid rgba(200, 180, 255, 0.16);
}

.faq-toc__title {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #b8a4f0;
}

.faq-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
}

.faq-toc a {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    color: #e8deff;
    background: rgba(58, 39, 102, 0.45);
    border: 1px solid rgba(183, 148, 244, 0.32);
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease;
}

.faq-toc a:hover,
.faq-toc a:focus-visible {
    color: #fff;
    background: rgba(139, 92, 246, 0.38);
    border-color: rgba(196, 168, 255, 0.55);
}

.faq-section {
    scroll-margin-top: 1rem;
}

.faq-item {
    margin: 0 0 0.55rem;
    border: 1px solid rgba(200, 180, 255, 0.14);
    border-radius: 12px;
    background: rgba(15, 10, 35, 0.35);
    overflow: hidden;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item > summary {
    padding: 0.85rem 1rem;
    font-weight: 600;
    color: #f0e6ff;
    cursor: pointer;
    list-style: none;
    line-height: 1.45;
}

.faq-item > summary::-webkit-details-marker {
    display: none;
}

.faq-item > summary::after {
    content: '+';
    float: right;
    margin-left: 0.75rem;
    font-size: 1.1rem;
    font-weight: 400;
    color: #b8a4f0;
    transition: transform 0.2s ease;
}

.faq-item[open] > summary::after {
    content: '−';
}

.faq-item__body {
    padding: 0 1rem 1rem;
    border-top: 1px solid rgba(200, 180, 255, 0.1);
}

.faq-item__body > :first-child {
    margin-top: 0.85rem;
}

.faq-table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.faq-table {
    width: 100%;
    min-width: 280px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.faq-table th,
.faq-table td {
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(200, 180, 255, 0.18);
    text-align: left;
    vertical-align: top;
}

.faq-table th {
    background: rgba(58, 39, 102, 0.35);
    color: #e0d7ff;
    font-weight: 600;
}

.faq-table td:first-child {
    font-weight: 500;
    color: #e8deff;
    white-space: nowrap;
}

.faq-disclaimer {
    margin-top: 0.25rem;
    padding: 1rem 1.05rem;
    border-radius: 12px;
    background: rgba(58, 39, 102, 0.28);
    border: 1px solid rgba(183, 148, 244, 0.28);
    font-size: 0.92rem;
}

.help-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(200, 180, 255, 0.18);
}

.help-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    color: #e8deff;
    background: rgba(58, 39, 102, 0.5);
    border: 1px solid rgba(183, 148, 244, 0.38);
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease;
}

.help-footer a:hover,
.help-footer a:focus-visible {
    color: #fff;
    background: rgba(139, 92, 246, 0.42);
    border-color: rgba(196, 168, 255, 0.62);
}

[data-theme="light"] .faq-intro {
    background: rgba(255, 252, 248, 0.92);
    border-color: rgba(139, 94, 60, 0.2);
    color: rgba(74, 54, 44, 0.92);
}

[data-theme="light"] .faq-toc {
    background: rgba(139, 94, 60, 0.06);
    border-color: rgba(139, 94, 60, 0.16);
}

[data-theme="light"] .faq-toc__title {
    color: #6b4423;
}

[data-theme="light"] .faq-toc a {
    color: var(--text-heading);
    background: rgba(139, 94, 60, 0.08);
    border-color: rgba(139, 94, 60, 0.22);
}

[data-theme="light"] .faq-toc a:hover,
[data-theme="light"] .faq-toc a:focus-visible {
    color: #fff;
    background: rgba(107, 68, 35, 0.75);
    border-color: rgba(107, 68, 35, 0.75);
}

[data-theme="light"] .faq-item {
    background: rgba(255, 252, 248, 0.65);
    border-color: rgba(139, 94, 60, 0.14);
}

[data-theme="light"] .faq-item > summary {
    color: var(--text-heading);
}

[data-theme="light"] .faq-item > summary::after {
    color: #8b5e3c;
}

[data-theme="light"] .faq-item__body {
    border-top-color: rgba(139, 94, 60, 0.12);
}

[data-theme="light"] .faq-table th,
[data-theme="light"] .faq-table td {
    border-color: rgba(139, 94, 60, 0.18);
}

[data-theme="light"] .faq-table th {
    background: rgba(139, 94, 60, 0.1);
    color: var(--text-heading);
}

[data-theme="light"] .faq-table td:first-child {
    color: var(--text-heading);
}

[data-theme="light"] .faq-disclaimer {
    background: rgba(139, 94, 60, 0.08);
    border-color: rgba(139, 94, 60, 0.2);
}

[data-theme="light"] .help-footer {
    border-top-color: rgba(139, 94, 60, 0.15);
}

[data-theme="light"] .help-footer a {
    color: var(--text-heading);
    background: rgba(139, 94, 60, 0.08);
    border-color: rgba(139, 94, 60, 0.22);
}

[data-theme="light"] .help-footer a:hover,
[data-theme="light"] .help-footer a:focus-visible {
    color: #fff;
    background: rgba(107, 68, 35, 0.75);
    border-color: rgba(107, 68, 35, 0.75);
}

@media (max-width: 767px) {
    .faq-item > summary {
        padding: 0.78rem 0.85rem;
        font-size: 0.93rem;
    }

    .faq-item__body {
        padding: 0 0.85rem 0.85rem;
    }

    .help-footer a {
        font-size: 0.78rem;
        padding: 0.42rem 0.7rem;
        white-space: normal;
        text-align: center;
    }
}
