/* =====================================================================
   examina.io — Blog (/blog, /blog/{slug})
   Built only from the examina-2026.css tokens. No new colours, no new
   fonts, no Bootstrap.
   ===================================================================== */

/* ------------------------------ Header ------------------------------ */
.blog-head h1 { margin-bottom: 12px; }

.blog-head__lead {
    font-size: 1.1rem;
    color: var(--ex-muted);
    max-width: 46rem;
    margin: 0 auto;
}

/* --------------------------- Category chips -------------------------- */
.blog-filter { padding-top: 28px; }

.blog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.blog-chip {
    display: inline-block;
    padding: 9px 20px;
    border: 1px solid var(--ex-border-strong);
    border-radius: var(--ex-radius-pill);
    background: var(--ex-white);
    color: var(--ex-body);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.blog-chip:hover, .blog-chip:focus {
    border-color: var(--ex-teal);
    color: var(--ex-teal-darker);
    text-decoration: none;
}

.blog-chip.is-active {
    background: var(--ex-gradient);
    border-color: transparent;
    color: var(--ex-white);
}

/* ------------------------- Covers & fallbacks ------------------------ */
.blog-card__media,
.blog-featured__media {
    display: block;
    overflow: hidden;
    background: var(--ex-soft-grey);
}

.blog-card__media img,
.blog-featured__media img,
.blog-cover-fallback {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Stands in for a missing cover so a card never collapses or shows a broken image. */
.blog-cover-fallback {
    background: linear-gradient(135deg, var(--ex-soft-teal) 0%, var(--ex-soft-blue) 100%);
}

/* ---------------------------- Featured post -------------------------- */
.blog-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 0;
    background: var(--ex-white);
    border: 1px solid var(--ex-border);
    border-radius: var(--ex-radius-lg);
    box-shadow: var(--ex-shadow-sm);
    overflow: hidden;
}

.blog-featured__body { padding: 34px; align-self: center; }
.blog-featured__body h2 { font-size: 1.9rem; margin: 14px 0 12px; }
.blog-featured__body h2 a { color: var(--ex-heading); text-decoration: none; }
.blog-featured__body h2 a:hover { color: var(--ex-teal-darker); }

/* ------------------------------- Grid -------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--ex-white);
    border: 1px solid var(--ex-border);
    border-radius: var(--ex-radius-lg);
    box-shadow: var(--ex-shadow-sm);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.blog-card:hover { transform: translateY(-3px); box-shadow: var(--ex-shadow); }

.blog-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__body h3 { font-size: 1.2rem; margin: 0; }
.blog-card__body h3 a { color: var(--ex-heading); text-decoration: none; }
.blog-card__body h3 a:hover { color: var(--ex-teal-darker); }

.blog-card__excerpt {
    color: var(--ex-muted);
    font-size: .95rem;
    margin: 0;
    /* Two lines keeps every card the same height without trimming the source text. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: var(--ex-faint);
    font-size: .85rem;
}

.blog-card__body .blog-meta { margin-top: auto; }

/* ---------------------------- Pagination ----------------------------- */
.blog-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding-bottom: 72px;
}

.blog-pager__status { color: var(--ex-muted); font-size: .9rem; }

/* ---------------------------- Breadcrumb ----------------------------- */
.blog-crumbs { padding: 26px 0 0; }
.blog-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.blog-crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--ex-faint); }
.blog-crumbs a { color: var(--ex-muted); }

/* ------------------------------ Article ------------------------------ */
.blog-article__head { padding: 30px 0 8px; text-align: center; }
.blog-article__head h1 { font-size: 2.6rem; margin: 16px 0 14px; }

.blog-article__standfirst {
    font-size: 1.18rem;
    color: var(--ex-muted);
    margin: 0 auto 26px;
    max-width: 42rem;
}

.blog-byline { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.blog-byline__mark { width: 40px; height: 40px; border-radius: var(--ex-radius-pill); }
.blog-byline__name { display: block; font-weight: 700; color: var(--ex-heading); font-size: .95rem; }

.blog-cover { margin: 34px auto 0; }
.blog-cover img { width: 100%; border-radius: var(--ex-radius-lg); }
.blog-cover figcaption { margin-top: 12px; color: var(--ex-faint); font-size: .85rem; text-align: center; }

/* --------------------------- Article body ---------------------------- */
/* A measure of roughly 68 characters — long-form prose is the whole point of
   these pages, so the column is sized for reading rather than for the grid. */
.blog-body {
    padding: 40px 0 8px;
    font-size: 1.075rem;
    line-height: 1.8;
    color: var(--ex-body);
}

.blog-body > * { max-width: 42rem; margin-left: auto; margin-right: auto; }
.blog-body h2 { font-size: 1.65rem; margin: 2.2rem auto 1rem; }
.blog-body h3 { font-size: 1.3rem; margin: 1.8rem auto .8rem; }
.blog-body p { margin: 0 auto 1.25rem; }
.blog-body ul, .blog-body ol { margin: 0 auto 1.25rem; padding-left: 1.4rem; }
.blog-body li { margin-bottom: .5rem; }
.blog-body a { text-decoration: underline; }

.blog-body blockquote {
    margin: 1.8rem auto;
    padding: 4px 0 4px 22px;
    border-left: 4px solid var(--ex-teal);
    color: var(--ex-heading);
    font-family: var(--ex-font-display);
    font-size: 1.25rem;
    font-style: normal;
}

.blog-body img { border-radius: var(--ex-radius); }
.blog-body figure { margin: 1.8rem auto; }
.blog-body figcaption { color: var(--ex-faint); font-size: .85rem; text-align: center; margin-top: 10px; }
.blog-body hr { margin: 2.4rem auto; }

.blog-body pre {
    background: var(--ex-soft-grey);
    border: 1px solid var(--ex-border);
    border-radius: var(--ex-radius-sm);
    padding: 16px 18px;
    overflow-x: auto;
    font-size: .92rem;
}

.blog-body code { background: var(--ex-soft-grey); padding: 2px 6px; border-radius: 4px; font-size: .92em; }
.blog-body pre code { background: none; padding: 0; }

.blog-body table { width: 100%; border-collapse: collapse; margin: 1.6rem auto; font-size: .95rem; }
.blog-body th, .blog-body td { border: 1px solid var(--ex-border); padding: 10px 12px; text-align: left; }
.blog-body th { background: var(--ex-soft-grey); color: var(--ex-heading); }

/* ------------------------------- Share ------------------------------- */
.blog-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 26px 0 8px;
    border-top: 1px solid var(--ex-border);
    margin-top: 34px;
}

.blog-share__label { font-weight: 700; color: var(--ex-heading); font-size: .9rem; }

/* -------------------------------- CTA -------------------------------- */
.blog-cta {
    background: var(--ex-soft-teal);
    border-radius: var(--ex-radius-lg);
    padding: 38px;
    text-align: center;
}

.blog-cta h2 { font-size: 1.6rem; margin-bottom: 10px; }
.blog-cta p { color: var(--ex-body); max-width: 34rem; margin: 0 auto 22px; }
.blog-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ----------------------------- Responsive ---------------------------- */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .blog-featured { grid-template-columns: 1fr; }
    .blog-featured__body { padding: 26px; }
    .blog-featured__body h2 { font-size: 1.5rem; }
    .blog-article__head h1 { font-size: 2rem; }
}

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-chips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
    .blog-chip { flex: 0 0 auto; }
    .blog-body { font-size: 1.02rem; }
    .blog-cta { padding: 26px; }
}

/* ------------------------- Editorial review -------------------------- */
.blog-edit { display: flex; flex-direction: column; gap: 4px; }
.blog-edit .ex-field { margin-bottom: 18px; }
.blog-edit__body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; line-height: 1.6; }

/* The preview is the reader's view dropped into an admin card, so it keeps the article
   typography but loses the centred page measure. */
.blog-preview { padding: 0; }
.blog-preview > * { margin-left: 0; margin-right: 0; max-width: none; }
