/**
 * Superfície artigo — body.post-template
 * Onda A: hierarquia do header + coluna de leitura perceptível.
 * Onda B: comentários + secção "Leia também".
 */

/* --- Onda A: cabeçalho --- */
body.post-template .gh-article-header {
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
    border-bottom: 1px solid var(--color-border, rgb(0 0 0 / 0.08));
}

.has-light-text body.post-template .gh-article-header {
    border-bottom-color: rgb(255 255 255 / 0.12);
}

body.post-template .gh-article-tag {
    display: inline-block;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--agni-brand, #00608a);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--agni-brand, #00608a);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.has-light-text body.post-template .gh-article-tag {
    color: var(--agni-brand-2, #73b3f3);
    border-bottom-color: var(--agni-brand-2, #73b3f3);
}

body.post-template .gh-article-tag:hover {
    color: var(--agni-brand-2, #73b3f3);
    border-bottom-color: var(--agni-brand-2, #73b3f3);
}

body.post-template .gh-article-title {
    max-width: 18ch;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

body.post-template .gh-article-excerpt {
    max-width: 42rem;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.65;
    color: var(--color-secondary-text, rgb(0 0 0 / 0.65));
    margin-bottom: 1.5rem;
}

.has-light-text body.post-template .gh-article-excerpt {
    color: rgb(255 255 255 / 0.72);
}

body.post-template .gh-article-meta {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border, rgb(0 0 0 / 0.06));
}

.has-light-text body.post-template .gh-article-meta {
    border-top-color: rgb(255 255 255 / 0.1);
}

/* --- Onda A: corpo — coluna de leitura --- */
body.post-template .gh-content {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.07rem;
    line-height: 1.75;
}

body.post-template .gh-content > p {
    margin-bottom: 1.35em;
}

body.post-template .gh-content > h2,
body.post-template .gh-content > h3,
body.post-template .gh-content > h4 {
    margin-top: 2em;
    margin-bottom: 0.65em;
    letter-spacing: -0.02em;
}

body.post-template .gh-content a:not(.kg-bookmark-container):not(.kg-file-card-container) {
    color: var(--agni-brand, #00608a);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.has-light-text body.post-template .gh-content a:not(.kg-bookmark-container):not(.kg-file-card-container) {
    color: var(--agni-brand-2, #73b3f3);
}

body.post-template .gh-content a:not(.kg-bookmark-container):not(.kg-file-card-container):hover {
    text-decoration-thickness: 2px;
}

/* Largura total para blocos largos Koenig */
body.post-template .gh-content .kg-width-wide,
body.post-template .gh-content .kg-width-full {
    max-width: none;
}

/* --- Onda B: comentários --- */
body.post-template .gh-comments {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--agni-radius-card, 14px);
    border: 1px solid var(--color-border, rgb(0 0 0 / 0.1));
    background: var(--color-lighter-gray, rgb(0 0 0 / 0.03));
}

.has-light-text body.post-template .gh-comments {
    border-color: rgb(255 255 255 / 0.12);
    background: rgb(255 255 255 / 0.04);
}

/* --- Onda B: relacionados --- */
body.post-template .agni-post-related {
    margin-top: clamp(3rem, 8vw, 5rem);
    padding-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--color-border, rgb(0 0 0 / 0.08));
}

.has-light-text body.post-template .agni-post-related {
    border-top-color: rgb(255 255 255 / 0.1);
}

body.post-template .agni-post-related .gh-container-title {
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
}

body.post-template .agni-post-related .gh-feed .gh-card-link:focus-visible {
    outline: 2px solid var(--agni-brand, #00608a);
    outline-offset: 3px;
}

.has-light-text body.post-template .agni-post-related .gh-feed .gh-card-link:focus-visible {
    outline-color: var(--agni-brand-2, #73b3f3);
}

@media (prefers-reduced-motion: reduce) {
    body.post-template .gh-article-tag {
        transition: none;
    }
}
