.pa-root {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 30px 20px 90px;
}

.pa-title {
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 8px 0 6px;
}
.pa-title::after {
    content: '';
    display: block;
    height: 3px;
    width: min(890px, 100%);
    margin-top: 8px;
    background: linear-gradient(to right, var(--accent-color), var(--bg-color));
}

.pa-root h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 28px 0 10px;
    display: inline-block;
    position: relative;
    white-space: nowrap;
}
.pa-root h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    z-index: -1;
    height: var(--section-line-height);
    width: min(890px, calc(100vw - 40px));
    background: linear-gradient(to right, var(--accent-color), var(--bg-color));
}

.pa-root h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 18px 0 6px;
    color: var(--accent-color);
}

.pa-body { font-size: 1.05rem; line-height: 1.6; }
.pa-body p { margin: 0 0 14px; }
.pa-body ul, .pa-body ol { margin: 0 0 14px; padding-left: 1.4em; }
.pa-body li { margin: 4px 0; }
.pa-body code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--accent-soft);
    padding: 1px 5px;
    border-radius: 4px;
}

.pa-figure { margin: 20px 0; }
.pa-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.pa-figure figcaption {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--muted-color);
    max-width: 70ch;
}

.pa-figure .pa-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: var(--surface-tint);
    border: 1px dashed var(--muted-color);
    border-radius: 4px;
    color: var(--muted-color);
    font-size: 0.9rem;
}

/* Render gallery */
.pa-gallery {
    column-width: 300px;
    column-gap: 14px;
    margin: 20px 0;
}
.pa-gallery a {
    border-bottom: none;
    display: block;
    break-inside: avoid;
    margin-bottom: 14px;
}
.pa-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s ease;
}
.pa-gallery a:hover img { border-color: var(--accent-color); }

/* Square carousel */
.gal-square { aspect-ratio: 1 / 1; max-width: 720px; margin: 16px auto 0; }
.gal-square .gal-slide img { object-fit: contain; background: var(--gal-panel); }

/* Comparison table */
.pa-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}
.pa-table th, .pa-table td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}
.pa-table th { color: var(--accent-color); font-weight: 600; }
.pa-table tbody tr:first-child td { color: var(--muted-color); } /* reference row */
.pa-table td:nth-child(4) { color: var(--accent-color); }        /* "vs VDB" column */

.pa-refs {
    margin: 36px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--muted-color);
    font-size: 0.88rem;
    line-height: 1.5;
}
.pa-refs h2 { color: var(--muted-color); }
.pa-refs p { margin: 0 0 8px; font-weight: 600; }
.pa-refs ul { margin: 0; padding-left: 1.2em; }
.pa-refs ul li { margin: 4px 0; padding-left: 0; }
.pa-refs ol { margin: 0; padding-left: 1.6em; font-size: 0.84rem; }
.pa-refs ol li { margin: 6px 0; padding-left: 0.2em; }
.pa-refs a { color: var(--link-color); word-break: break-word; }
.pa-refs-head { margin-top: 14px; }

@media (max-width: 800px) {
    .pa-title { font-size: 1.8rem; }
    .pa-root h2::after { width: calc(100vw - 40px); }
}
