.faq-public {
    width: 100%;
}

.faq-public a {
    text-underline-offset: .14em;
}

.faq-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1rem;
    font-size: .95em;
}

.faq-entry-title,
.faq-category-title {
    margin-top: 0;
}

.faq-entry-answer {
    font-size: 1.03em;
    line-height: 1.65;
}

.faq-entry-answer > :first-child,
.faq-category-description > :first-child {
    margin-top: 0;
}

.faq-entry-answer > :last-child,
.faq-category-description > :last-child {
    margin-bottom: 0;
}

.faq-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin: 1.25rem 0 0;
    padding-top: .9rem;
    border-top: 1px solid rgba(127, 127, 127, .28);
    font-size: .92em;
}

.faq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 1rem;
}

.faq-category-list,
.faq-question-list {
    display: grid;
    gap: .85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-category-card,
.faq-question-card {
    padding: 1rem;
    border: 1px solid rgba(127, 127, 127, .28);
    border-radius: .5rem;
}

.faq-category-card h2,
.faq-question-card h2 {
    margin: 0 0 .35rem;
    font-size: 1.1rem;
}

.faq-category-card p,
.faq-question-card p {
    margin: .35rem 0 0;
}

.faq-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin-top: .65rem;
    font-size: .88em;
    opacity: .78;
}

.faq-category-header {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(127, 127, 127, .28);
    border-radius: .5rem;
}

@media (min-width: 760px) {
    .faq-category-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .faq-meta,
    .faq-actions,
    .faq-card-meta {
        flex-direction: column;
    }
}

/* Contextual FAQ fragments injected through PLG_itemDisplay() or
 * the Geeklog article template hook. Theme-neutral and visually aligned
 * with Hub contextual blocks.
 */
.faq-context-block {
    width: 100%;
    max-width: var(--eclipse-reading, 72ch);
    margin: 1.25rem 0;
    padding: .8rem 1rem .85rem;
    border-left: 3px solid rgba(127, 127, 127, .28);
    background: rgba(127, 127, 127, .02);
    line-height: 1.55;
}

.faq-context-title {
    margin: 0 0 .65rem;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.3;
}

.faq-contextual-item {
    margin: 0;
    border: 0;
}

.faq-contextual-item + .faq-contextual-item {
    margin-top: .8rem;
}

.faq-contextual-question {
    position: relative;
    display: block;
    margin: 0;
    padding: .15rem 0 .15rem 1.15rem;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
}

.faq-contextual-question::-webkit-details-marker {
    display: none;
}

.faq-contextual-question::marker {
    content: "";
}

.faq-contextual-question::before {
    content: "›";
    position: absolute;
    left: 0;
    top: .08rem;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1.4;
    transform-origin: 50% 50%;
    transition: transform .15s ease;
    opacity: .72;
}

.faq-contextual-item[open] > .faq-contextual-question::before {
    transform: rotate(90deg);
}

.faq-contextual-question:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: .15rem;
}

.faq-contextual-answer {
    margin: .55rem 0 .35rem 1.15rem;
}

.faq-contextual-answer > :first-child {
    margin-top: 0;
}

.faq-contextual-answer > :last-child {
    margin-bottom: 0;
}

.faq-contextual-permalink {
    margin: .6rem 0 0;
    font-size: .82em;
    opacity: .62;
}

.faq-contextual-permalink a {
    text-decoration-thickness: from-font;
}

.faq-context-block a {
    text-underline-offset: .14em;
}

@media (max-width: 640px) {
    .faq-context-block {
        padding: .75rem .85rem .8rem;
    }

    .faq-contextual-answer {
        margin-left: 1rem;
    }
}

/* Standalone FAQ and category pages.
 * Follow the root FAQ page structure: breadcrumb first, then one content card.
 */
.faq-view {
    width: 100%;
    margin: 0;
}

.faq-view .faq-breadcrumbs {
    margin: 0 0 1rem;
}

.faq-view-card {
    width: 100%;
    box-sizing: border-box;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(127, 127, 127, .22);
    border-radius: .55rem;
    background: rgba(127, 127, 127, .012);
}

.faq-category-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin: 0 0 1rem;
    padding: 0 0 .95rem;
    border: 0;
    border-bottom: 1px solid rgba(127, 127, 127, .20);
    border-radius: 0;
}

.faq-category-heading {
    min-width: 0;
}

.faq-category-title {
    margin: 0 0 .35rem;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    line-height: 1.25;
}

.faq-category-description {
    max-width: 72ch;
    line-height: 1.65;
}

.faq-category-header .faq-actions {
    flex: 0 0 auto;
    margin-top: .15rem;
}

.faq-question-list {
    grid-template-columns: 1fr;
}

.faq-question-card {
    padding: .9rem 1rem;
    background: rgba(127, 127, 127, .018);
}

.faq-entry-article {
    padding-top: 1.2rem;
    padding-bottom: 1.1rem;
}

.faq-entry-header {
    max-width: 72ch;
    margin: 0 0 1.1rem;
}

.faq-entry-title {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    line-height: 1.2;
    letter-spacing: -.015em;
}

.faq-entry-reading {
    max-width: 72ch;
}

.faq-entry-answer {
    font-size: 1.02rem;
    line-height: 1.72;
}

.faq-entry-answer p {
    margin: .9rem 0;
}

.faq-related {
    margin-top: 1.5rem;
    padding: .85rem 1rem;
    border-left: 3px solid rgba(127, 127, 127, .28);
    background: rgba(127, 127, 127, .025);
}

.faq-related h2 {
    margin: 0 0 .55rem;
    font-size: .95rem;
    line-height: 1.3;
}

.faq-related-links {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    font-size: .94rem;
    line-height: 1.5;
}

.faq-related-links a {
    width: fit-content;
    max-width: 100%;
}

.faq-entry-footer {
    margin-top: 1.65rem;
    padding-top: .9rem;
    border-top: 1px solid rgba(127, 127, 127, .22);
}

.faq-entry-view .faq-meta {
    margin: 0;
    padding: 0;
    border: 0;
    gap: .4rem 1.1rem;
    opacity: .72;
    font-size: .88rem;
}

.faq-entry-view .faq-actions {
    margin-top: .8rem;
    font-size: .9rem;
}

@media (max-width: 640px) {
    .faq-view-card {
        padding: 1rem;
    }

    .faq-category-header {
        flex-direction: column;
    }

    .faq-category-header .faq-actions {
        margin-top: .35rem;
    }

    .faq-entry-header,
    .faq-entry-reading,
    .faq-category-description {
        max-width: 100%;
    }

    .faq-related {
        padding: .75rem .85rem;
    }
}
