/* Reusable single-article presentation for The Keto Lady. */

.tkl-article-shell {
    --tkl-ink: #2c2b28;
    --tkl-muted: #6f6b64;
    --tkl-green: #476b50;
    --tkl-green-dark: #294b34;
    --tkl-green-soft: #eef3ee;
    --tkl-cream: #faf7f2;
    --tkl-border: rgba( 71, 107, 80, 0.2 );
}

/* Astra's narrow container and article padding otherwise compound our gutters. */
body.tkl-article-shell #content > .ast-container {
    max-width: 1100px;
    padding: 0 24px;
}

body.tkl-article-shell #primary {
    width: 100%;
    margin: 0;
    padding: 112px 0 56px;
}

body.tkl-article-shell .site-main > article.ast-article-single {
    padding: 0;
    background: transparent;
}

.tkl-article-shell .site-main > article.ast-article-single > .entry-content,
.tkl-article-shell .site-main > article.ast-article-single > .ast-single-related-posts-container,
.tkl-article-shell .comments-area,
.tkl-article-shell .post-navigation {
    width: min( 100%, 740px );
    margin-right: auto;
    margin-left: auto;
}

.tkl-article-shell .entry-content {
    font-size: 1.125rem;
    line-height: 1.7;
}

.tkl-article-shell .entry-content .elementor-widget-text-editor,
.tkl-article-shell .entry-content .elementor-widget-text-editor p,
.tkl-article-shell .entry-content > p,
.tkl-article-shell .entry-content > ul,
.tkl-article-shell .entry-content > ol,
.tkl-article-shell .entry-content .who-text {
    font-size: 1.125rem;
    line-height: 1.7;
}

.tkl-article-shell .entry-content > .elementor > .e-con:not( .tkl-summary ),
.tkl-article-shell .entry-content > .elementor > .elementor-section:not( .tkl-summary ) {
    --padding-left: 0px;
    --padding-right: 0px;
    padding-left: 0;
    padding-right: 0;
}

.tkl-article-shell .entry-content .faq-btn {
    border-radius: 4px;
    padding-left: 12px;
    padding-right: 12px;
    text-transform: none;
    text-align: left;
}

.tkl-article-shell .entry-content .faq-icon {
    font-size: 0;
}

.tkl-article-shell .entry-content .faq-icon::before {
    content: '+';
    font-size: 18px;
}

.tkl-article-shell .entry-content .faq-item.open .faq-icon::before {
    content: '−';
}

.tkl-article-shell .entry-content .faq-item.open .faq-icon,
.tkl-article-shell .entry-content .faq-item.open .faq-icon::before {
    transform: none;
}

.tkl-article-shell .entry-content .faq-btn:focus-visible {
    outline: 3px solid var( --tkl-green );
    outline-offset: -3px;
}

.tkl-article-shell .entry-content .who-list {
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0;
}

.tkl-article-shell .entry-content .who-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 12px;
    padding: 0;
}

.tkl-article-shell .entry-content .who-list li:last-child {
    margin-bottom: 0;
}

.tkl-article-shell .entry-content .who-check {
    flex: 0 0 16px;
    margin: 0;
    font-size: 0;
}

.tkl-article-shell .entry-content .who-check::before {
    content: '•';
    font-size: 1rem;
}

.tkl-article-shell .entry-content .tkl-summary {
    margin: 0 0 28px;
    padding: 24px 28px;
    border: 1px solid var( --tkl-border );
    border-radius: 16px;
    background: var( --tkl-green-soft );
}

.tkl-article-shell .entry-content .tkl-summary .elementor-widget-wrap {
    padding: 0;
    background: transparent;
}

.tkl-article-shell .entry-content .tkl-summary .elementor-column {
    background: transparent;
    border-radius: 0;
}

.tkl-article-shell .site-main > article.ast-article-single .entry-header {
    width: min( 100%, 740px );
    margin-right: auto;
    margin-bottom: 16px;
    margin-left: auto;
    padding: 0;
}

.tkl-article-shell .site-main > article.ast-article-single .entry-title {
    max-width: 26ch;
    margin-bottom: 0;
    color: var( --tkl-ink );
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp( 2.25rem, 4.2vw, 3.5rem );
    font-weight: 400;
    line-height: 1.1;
    text-wrap: balance;
}

.tkl-article-kicker {
    margin-bottom: 14px;
}

.tkl-article-kicker a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var( --tkl-border );
    border-radius: 999px;
    background: var( --tkl-green-soft );
    color: var( --tkl-green-dark );
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.tkl-article-kicker a:hover {
    border-color: var( --tkl-green );
    background: #e4ece5;
}

.tkl-article-kicker a:focus-visible,
.tkl-article-meta a:focus-visible,
.tkl-author-card a:focus-visible {
    outline: 3px solid var( --tkl-green );
    outline-offset: 3px;
}

.tkl-article-meta-wrap {
    width: min( 100%, 740px );
    margin: 0 auto 28px;
}

.tkl-article-shell .tkl-article-dek {
    margin: 20px 0 0;
    color: #4f4c47;
    font-size: 1.125rem;
    line-height: 1.65;
}

.tkl-article-hero {
    width: min( 100%, 740px );
    margin: 0 auto 32px;
}

.tkl-article-hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.tkl-article-toc {
    margin: 0 0 28px;
    padding: 16px 20px;
    border-top: 1px solid var( --tkl-border );
    border-bottom: 1px solid var( --tkl-border );
    font-size: 1rem;
}

.tkl-article-toc summary {
    cursor: pointer;
    color: var( --tkl-green-dark );
    font-weight: 700;
    padding: 6px 0;
}

.tkl-article-toc ol {
    margin: 14px 0 0;
    padding-left: 22px;
}

.tkl-article-toc li {
    margin-bottom: 8px;
}

.tkl-article-toc a {
    color: var( --tkl-green-dark );
    text-decoration: underline;
}

.tkl-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 16px 0;
    border-top: 1px solid var( --tkl-border );
    border-bottom: 1px solid var( --tkl-border );
    color: var( --tkl-muted );
    font-size: 0.9rem;
    line-height: 1.5;
}

.tkl-article-meta a {
    color: var( --tkl-green-dark );
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.tkl-article-meta__separator {
    color: #aaa69e;
}

.tkl-author-card {
    width: min( 100%, 760px );
    margin: clamp( 44px, 7vw, 72px ) auto 24px;
    padding: 24px;
    border: 1px solid var( --tkl-border );
    border-radius: 20px;
    background: linear-gradient( 135deg, var( --tkl-cream ), #f2f6f2 );
    color: var( --tkl-ink );
    box-shadow: 0 14px 40px rgba( 44, 43, 40, 0.06 );
}

.tkl-article-shell .tkl-author-card__eyebrow {
    margin: 0 0 8px;
    color: var( --tkl-green );
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tkl-related-reading {
    margin: 40px 0;
}

.tkl-related-reading__grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( min( 100%, 260px ), 1fr ) );
    gap: 20px;
}

.tkl-reading-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid var( --tkl-border );
    border-radius: 16px;
    background: #fff;
    color: var( --tkl-ink );
    text-decoration: none;
}

.tkl-reading-card:hover {
    border-color: var( --tkl-green );
    color: var( --tkl-green-dark );
}

.tkl-reading-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
}

.tkl-reading-card__title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.2;
}

.tkl-reading-card__excerpt {
    color: #4f4c47;
    font-size: 1rem;
    line-height: 1.6;
}

.tkl-reading-card__link {
    margin-top: auto;
    color: var( --tkl-green-dark );
    font-size: 1rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tkl-author-card h2 {
    margin: 0 0 12px;
    color: var( --tkl-ink );
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp( 1.8rem, 4vw, 2.45rem );
    font-weight: 400;
    line-height: 1.1;
}

.tkl-author-card p:not( .tkl-author-card__eyebrow ) {
    max-width: 64ch;
    margin: 0 0 18px;
    color: #4f4c47;
    font-size: 1rem;
    line-height: 1.7;
}

.tkl-author-card__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var( --tkl-green-dark );
    font-weight: 750;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.tkl-article-shell .entry-content :where( h2, h3 ) {
    color: var( --tkl-ink );
    text-wrap: balance;
}

.tkl-article-shell .entry-content :where( a:not( .elementor-button ) ) {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.tkl-article-shell .entry-content :where( a:not( .elementor-button ) ):focus-visible {
    border-radius: 3px;
    outline: 3px solid var( --tkl-green );
    outline-offset: 3px;
}

/* Keep the invitation readable against a consistent forest-green surface. */
.tkl-article-shell .entry-content .blog-post-cta {
    background: var( --tkl-green-dark );
    color: var( --tkl-cream );
}

.tkl-article-shell .entry-content .blog-post-cta :is( h2, h3, p, .blog-post-cta-label, .blog-post-cta-note ) {
    color: var( --tkl-cream );
}

.tkl-article-shell .entry-content .blog-post-cta .blog-post-cta-btn {
    background: var( --tkl-cream );
    color: var( --tkl-green-dark );
}

.tkl-article-shell .entry-content .blog-post-cta .blog-post-cta-btn:hover {
    background: #fff;
    color: var( --tkl-green-dark );
}

.tkl-article-shell .entry-content .blog-post-cta .blog-post-cta-btn:focus-visible {
    outline: 3px solid var( --tkl-cream );
    outline-offset: 4px;
}

@media ( max-width: 544px ) {
    body.tkl-article-shell #content > .ast-container {
        padding: 0 20px;
    }

    body.tkl-article-shell #primary {
        padding-top: 92px;
    }

    .tkl-article-shell .site-main > article.ast-article-single .entry-header,
    .tkl-article-meta-wrap {
        width: 100%;
    }

    .tkl-article-shell .site-main > article.ast-article-single .entry-header {
        padding-top: 0;
    }

    .tkl-article-shell .site-main > article.ast-article-single .entry-title {
        font-size: clamp( 2rem, 8.8vw, 2.25rem );
        line-height: 1.12;
    }

    .tkl-article-meta {
        align-items: flex-start;
        gap: 7px;
        font-size: 0.875rem;
    }

    .tkl-article-meta__separator {
        display: none;
    }

    .tkl-article-meta__item,
    .tkl-article-meta__language {
        flex: 0 0 100%;
    }

    .tkl-author-card {
        border-radius: 16px;
    }

    .tkl-article-shell .entry-content .tkl-summary {
        padding: 18px;
    }

    .tkl-article-shell .entry-content .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
        padding-left: 0;
        padding-right: 0;
    }
}

@media ( prefers-reduced-motion: reduce ) {
    .tkl-article-shell *,
    .tkl-article-shell *::before,
    .tkl-article-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
