/*
 * EDGE blog pages — practical workshop editorial styling.
 * Load after content.css so shared site typography and colors stay in control.
 */

.blog-shell {
    width: min(100%, 66rem);
    margin-inline: auto;
    color: var(--edge-copy, #263b4f);
}

.blog-page-heading {
    max-width: 52rem;
    margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
    padding: clamp(1.25rem, 3vw, 2.2rem) 0 1.75rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--edge-line, #d6e0e8);
}

.blog-eyebrow {
    margin: 0 0 0.7rem;
    color: var(--edge-blue-dark, #1d4ed8);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.blog-page-heading h1 {
    max-width: 13ch;
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 6vw, 4.15rem);
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.blog-intro {
    max-width: 42rem;
    margin: 0 0 1rem;
    color: var(--edge-muted, #526579);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.blog-rss-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    color: var(--edge-blue-dark, #1d4ed8);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.blog-rss-link::before {
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.55rem;
    background: var(--edge-yellow, #facc15);
    border: 2px solid var(--edge-ink, #17324d);
    border-radius: 50%;
    content: "";
}

.blog-rss-link:hover,
.blog-text-link:hover,
.blog-card-link:hover,
.blog-back-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.22em;
}

.blog-section-heading {
    margin: 0 0 1.2rem;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    letter-spacing: -0.025em;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.blog-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: clamp(1.2rem, 3vw, 1.8rem);
    background: var(--edge-surface, #fff);
    border: 1px solid var(--edge-line, #d6e0e8);
    border-top: 3px solid var(--edge-blue, #2563eb);
    border-radius: var(--edge-radius, 0.75rem);
    box-shadow: 0 0.25rem 1rem rgb(23 50 77 / 5%);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    border-color: #bdcddd;
    box-shadow: 0 0.55rem 1.3rem rgb(23 50 77 / 10%);
}

.blog-card--featured {
    grid-column: 1 / -1;
    padding: clamp(1.5rem, 4vw, 2.3rem);
    background: linear-gradient(112deg, #eef4f8 0%, #fff 72%);
    border-top-color: var(--edge-yellow, #facc15);
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin-bottom: 0.95rem;
    color: var(--edge-muted, #526579);
    font-size: 0.84rem;
    font-weight: 600;
}

.blog-card-meta time {
    white-space: nowrap;
}

.blog-category {
    max-width: 100%;
    padding: 0.2rem 0.55rem;
    overflow-wrap: anywhere;
    color: var(--edge-ink, #17324d);
    background: #eaf0f5;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 750;
}

.blog-card h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.blog-card h2 a {
    color: var(--edge-ink, #17324d);
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: var(--edge-blue-dark, #1d4ed8);
}

.blog-card-description {
    max-width: 54rem;
    margin-bottom: 1.35rem;
    color: var(--edge-muted, #526579);
    overflow-wrap: anywhere;
}

.blog-card-link,
.blog-text-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.45rem;
    min-height: 2.5rem;
    margin-top: auto;
    color: var(--edge-blue-dark, #1d4ed8);
    font-weight: 750;
    text-decoration: none;
}

.blog-card-link span,
.blog-text-link span {
    transition: transform 180ms ease;
}

.blog-card-link:hover span,
.blog-text-link:hover span {
    transform: translateX(3px);
}

.blog-empty,
.blog-message {
    max-width: 47rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3rem);
    background: var(--edge-surface, #fff);
    border: 1px solid var(--edge-line, #d6e0e8);
    border-radius: calc(var(--edge-radius, 0.75rem) + 0.15rem);
    box-shadow: var(--edge-shadow, 0 0.35rem 1.2rem rgb(23 50 77 / 8%));
}

.blog-empty {
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--edge-yellow, #facc15);
}

.blog-empty-mark {
    position: absolute;
    top: -2.8rem;
    right: -2rem;
    width: 9rem;
    height: 9rem;
    border: 1px solid #d6e0e8;
    border-radius: 50%;
    box-shadow: 0 0 0 1.1rem #f7f9fb, 0 0 0 2.2rem #eef4f8;
    opacity: 0.8;
    pointer-events: none;
}

.blog-empty h2,
.blog-message h2 {
    position: relative;
    margin: 0 0 0.7rem;
    font-size: clamp(1.55rem, 4vw, 2.1rem);
    overflow-wrap: anywhere;
}

.blog-empty > p:not(.blog-eyebrow),
.blog-message p {
    max-width: 37rem;
    color: var(--edge-muted, #526579);
}

.blog-message--unavailable {
    border-left: 4px solid var(--edge-notice-line, #e6c653);
}

.blog-practice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: clamp(3rem, 7vw, 5.5rem);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    color: #e8f0f6;
    background: var(--edge-ink, #17324d);
    border-radius: var(--edge-radius, 0.75rem);
}

.blog-practice h2 {
    max-width: 22ch;
    margin: 0 0 0.5rem;
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 2rem);
    overflow-wrap: anywhere;
}

.blog-practice p:not(.blog-eyebrow) {
    max-width: 40rem;
    margin: 0;
}

.blog-practice .blog-eyebrow {
    color: var(--edge-yellow, #facc15);
}

.blog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem 1.1rem;
    color: var(--edge-ink-deep, #10283d);
    background: var(--edge-yellow, #facc15);
    border: 1px solid var(--edge-yellow, #facc15);
    border-radius: 0.5rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

.blog-button:hover {
    color: var(--edge-ink-deep, #10283d);
    background: #ffdb45;
    transform: translateY(-2px);
}

.blog-post {
    width: min(100%, 48rem);
    margin-inline: auto;
}

.blog-post-header {
    margin-bottom: 2rem;
    padding: 0 0 1.6rem;
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--edge-line, #d6e0e8);
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.7rem;
    margin-bottom: 1.1rem;
    color: var(--edge-blue-dark, #1d4ed8);
    font-size: 0.93rem;
    font-weight: 750;
    text-decoration: none;
}

.blog-post-header h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 6vw, 3.55rem);
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

.blog-post-description {
    max-width: 43rem;
    margin: 0;
    color: var(--edge-muted, #526579);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.blog-post-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.blog-post-content img,
.blog-post-content video,
.blog-post-content iframe {
    max-width: 100%;
}

.blog-post-content pre,
.blog-post-content table {
    max-width: 100%;
}

.blog-post-content pre {
    overflow-x: auto;
}

.blog-post-content table {
    display: block;
    overflow-x: auto;
}

.blog-post-content :is(p, li, td, th, a, code) {
    overflow-wrap: anywhere;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0 0;
    padding: 1.2rem 0 0;
    border-top: 1px solid var(--edge-line, #d6e0e8);
    list-style: none;
}

.blog-tags li {
    max-width: 100%;
    padding: 0.35rem 0.7rem;
    color: var(--edge-ink, #17324d);
    background: #eaf0f5;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.blog-faq {
    margin-top: clamp(2.5rem, 6vw, 4rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--edge-line, #d6e0e8);
}

.blog-faq h2 {
    margin: 0 0 1rem;
}

.blog-faq-list {
    display: grid;
    gap: 0.75rem;
}

.blog-faq-item {
    min-width: 0;
    padding: 1.15rem 1.25rem;
    background: var(--edge-surface, #fff);
    border: 1px solid var(--edge-line, #d6e0e8);
    border-radius: 0.6rem;
}

.blog-faq-item h3 {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}

.blog-faq-item p {
    margin: 0;
    color: var(--edge-muted, #526579);
    overflow-wrap: anywhere;
}

.blog-cta {
    margin-top: clamp(2.5rem, 6vw, 4rem);
    padding: clamp(1.5rem, 4vw, 2.4rem);
    color: #e8f0f6;
    background: var(--edge-ink, #17324d);
    border-radius: var(--edge-radius, 0.75rem);
}

.blog-cta .blog-eyebrow {
    color: var(--edge-yellow, #facc15);
}

.blog-cta h2 {
    margin: 0 0 0.55rem;
    color: #fff;
    font-size: clamp(1.45rem, 4vw, 2.15rem);
    overflow-wrap: anywhere;
}

.blog-cta > p:not(.blog-eyebrow) {
    margin: 0;
}

.blog-cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.2rem;
    margin-top: 1.25rem;
}

.blog-cta-pricing {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    color: #fff;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.blog-cta-pricing:hover {
    color: var(--edge-yellow, #facc15);
}

.blog-post-footer {
    margin: 1.8rem 0 0;
}

.blog-not-found {
    max-width: 48rem;
    padding-block: clamp(1rem, 5vw, 3rem);
}

.blog-not-found-code {
    margin: 0;
    color: var(--edge-blue, #2563eb);
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: 850;
    letter-spacing: -0.08em;
    line-height: 0.95;
}

.blog-not-found h1 {
    margin: 1rem 0 0.65rem;
    font-size: clamp(2rem, 6vw, 3.4rem);
    overflow-wrap: anywhere;
}

.blog-not-found > p:not(.blog-eyebrow, .blog-not-found-code) {
    max-width: 39rem;
    color: var(--edge-muted, #526579);
}

.blog-not-found .blog-cta-pricing {
    color: var(--edge-blue-dark, #1d4ed8);
}

@media (max-width: 767px) {
    .blog-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-card--featured {
        grid-column: auto;
    }

    .blog-practice {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-practice .blog-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .blog-card-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-card-meta time {
        white-space: normal;
    }

    .blog-cta-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .blog-cta-actions .blog-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-button,
    .blog-card-link span,
    .blog-text-link span {
        transition: none;
    }

    .blog-card:hover,
    .blog-button:hover,
    .blog-card-link:hover span,
    .blog-text-link:hover span {
        transform: none;
    }
}
