.faq-doc {
    --doc-bg: rgba(18, 18, 19, 0.78);
    --doc-line: rgba(120, 120, 124, 0.28);
    --doc-line-soft: rgba(120, 120, 124, 0.16);
    --doc-text: #dcdcdc;
    --doc-text-soft: #b2b6b9;
    --doc-muted: #8f9599;
    --doc-accent: #d4a76a;
    --doc-accent-dim: #7a5b32;
    --font-mono: 'Share Tech Mono', 'IBM Plex Mono', ui-monospace, monospace;

    max-width: 980px;
    margin: 0 auto;
    padding-bottom: 56px;
    color: var(--doc-text);
    line-height: 1.65;
}

.faq-doc__head {
    padding: 24px 26px;
    margin-bottom: 20px;
    background: var(--doc-bg);
    border: 1px solid var(--doc-line);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.faq-doc__title {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #f2f2f2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.55);
}

.faq-doc__subtitle {
    margin: 8px 0 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--doc-accent);
}

.faq-doc__intro {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--doc-line-soft);
    color: var(--doc-text-soft);
    text-wrap: pretty;
}

.faq-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.faq-search__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--doc-line);
    color: var(--doc-text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq-search__input::placeholder {
    color: var(--doc-muted);
}

.faq-search__input:focus {
    outline: none;
    border-color: var(--doc-accent);
    background: rgba(0, 0, 0, 0.5);
}

.faq-search__count {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--doc-muted);
}

.faq-cat {
    margin-bottom: 22px;
    padding: 20px 24px 22px;
    background: var(--doc-bg);
    border: 1px solid var(--doc-line);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.faq-cat[hidden] {
    display: none;
}

.faq-cat__title {
    margin: 0 0 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--doc-accent-dim);
    font-family: var(--font-mono);
    font-size: 1.08rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--doc-accent);
}

.faq-cat__desc {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: var(--doc-muted);
}

.faq-list {
    margin-top: 14px;
}

.faq-item {
    margin-bottom: 9px;
    background: rgba(30, 30, 32, 0.6);
    border: 1px solid var(--doc-line-soft);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.faq-item[hidden] {
    display: none;
}

.faq-item:hover {
    border-color: var(--doc-line);
    background: rgba(36, 36, 38, 0.72);
}

.faq-item.is-open {
    border-color: var(--doc-accent-dim);
}

.faq-item__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(40, 40, 42, 0.5);
    border: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.faq-item.is-open .faq-item__q {
    background: rgba(52, 52, 55, 0.6);
    border-bottom: 1px solid var(--doc-line-soft);
}

.faq-item__q:focus-visible {
    outline: 1px solid var(--doc-accent);
    outline-offset: -2px;
}

.faq-item__q-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #f0f0f0;
    line-height: 1.35;
}

.faq-item__sign {
    position: relative;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.faq-item__sign::before,
.faq-item__sign::after {
    content: "";
    position: absolute;
    background: #8b4513;
    transition: opacity 0.3s ease;
}

.faq-item__sign::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.faq-item__sign::after {
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.faq-item.is-open .faq-item__sign {
    transform: rotate(90deg);
}

.faq-item.is-open .faq-item__sign::after {
    opacity: 0;
}

.faq-item__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.34s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(22, 22, 24, 0.55);
}

.faq-item.is-open .faq-item__panel {
    grid-template-rows: 1fr;
}

.faq-item__inner {
    overflow: hidden;
    min-height: 0;
}

.faq-item.is-open .faq-item__inner {
    padding: 18px;
}

.faq-item__inner p {
    margin: 0 0 12px;
    color: #cccccc;
    text-wrap: pretty;
}

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

.faq-item__inner ul,
.faq-item__inner ol {
    margin: 12px 0;
    padding-left: 22px;
}

.faq-item__inner li {
    margin-bottom: 6px;
    color: #cccccc;
}

.faq-item__inner a {
    color: #e0646b;
    text-decoration: none;
    border-bottom: 1px dotted rgba(224, 100, 107, 0.4);
}

.faq-item__inner a:hover {
    color: #f29ca0;
}

.faq-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--doc-line-soft);
}

.faq-tag {
    padding: 2px 8px;
    border: 1px solid var(--doc-accent-dim);
    background: rgba(90, 58, 42, 0.16);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: #d4c39c;
}

.warning-note,
.info-note {
    margin: 12px 0;
    padding: 12px 14px;
    font-size: 0.94rem;
}

.warning-note {
    background: rgba(139, 69, 19, 0.2);
    border-left: 4px solid #8b4513;
}

.info-note {
    background: rgba(76, 114, 176, 0.2);
    border-left: 4px solid #4c72b0;
}

.faq-empty,
.faq-noresults {
    padding: 26px;
    text-align: center;
    background: var(--doc-bg);
    border: 1px dashed var(--doc-line);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--doc-muted);
}

.faq-noresults[hidden] {
    display: none;
}

.js [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition: opacity 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 720px) {
    .faq-doc__head {
        padding: 18px 16px;
    }

    .faq-cat {
        padding: 16px 14px 18px;
    }

    .faq-item__q {
        padding: 12px 14px;
    }

    .faq-item__q-text {
        font-size: 0.94rem;
    }

    .faq-item.is-open .faq-item__inner {
        padding: 14px;
    }

    .faq-search {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .faq-search__count {
        text-align: right;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .faq-item__panel {
        transition: none;
    }
}
