/*
 * Factory blog stylesheet.
 *
 * Scoped under .cf-* class names so it cannot conflict with shop-side CSS
 * (which uses .post, .header, .body, .product, etc. without prefixes).
 *
 * Source of truth: bifrost-content-factory-service-frontend/pipeline/renderers/blog/templates/cf-blog.css.
 * Published copy lives at picanova.de:_default/blog-content/_layouts/cf-blog.css.
 */

/* Page wrapper -------------------------------------------------------- */
.cf-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 16px 80px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Blog index needs extra breathing room between the shop nav and the
   "Blog" heading + chip grid */
.cf-page--blog-index {
    padding-top: 60px;
}

/* Article ------------------------------------------------------------- */
.cf-article__hero {
    margin: 0 0 32px;
}

.cf-article__hero picture,
.cf-article__hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Hero image stays inside the .cf-page wrapper so body text and hero
   image have identical horizontal extent. aspect-ratio enforces the
   1920x644 master shape on desktop. */
@media (min-width: 1024px) {
    .cf-article__hero picture img {
        aspect-ratio: 1920 / 644;
        object-fit: cover;
        height: 100%;
    }
}

.cf-article h1 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 700;
    color: #404040;
    margin: 24px 0 12px;
}

.cf-article__dek {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.45;
    color: #4a4a4a;
    margin: 0 0 16px;
}

.cf-article__byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b6b6b;
    margin: 0 0 32px;
    padding: 0 0 16px;
    border-bottom: 1px solid #e6e6e6;
}

.cf-article__byline-icon {
    display: inline-block;
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    flex: 0 0 20px;
    margin-left: 10px;
    margin-right: -2px;
    vertical-align: middle;
    opacity: 0.7;
}

.cf-article__byline-icon + .cf-article__author,
.cf-article__byline-icon + time,
.cf-article__byline-icon + .cf-article__reading-time {
    margin-right: 12px;
}

/* Author link uses the corporate cyan everywhere it appears as an anchor:
 * article hero byline, in-article author-bio aside, and blog-index tile.
 * The plain-<span> form (collective bylines without bio pages) stays in
 * the inherited grey colour so the chip-style cyan signals "clickable". */
a.cf-article__author,
a.cf-post-card__author,
.cf-article__author-bio-more a {
    color: rgb(53, 178, 182);
    text-decoration: none;
}
a.cf-article__author:hover,
a.cf-article__author:focus-visible,
a.cf-post-card__author:hover,
a.cf-post-card__author:focus-visible,
.cf-article__author-bio-more a:hover,
.cf-article__author-bio-more a:focus-visible {
    text-decoration: underline;
}

.cf-article__body {
    font-size: 16px;
    line-height: 1.7;
}

.cf-article__body h2 {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    margin: 48px 0 16px;
}

.cf-article__body h3 {
    font-size: 20px;
    margin: 32px 0 12px;
}

/* Halve the top-margin on H2/H3 that immediately follow a body image
   paragraph (same container). Without this, the image's bottom margin
   plus the heading's 48px / 32px top margin stacks to a too-large gap. */
.cf-article__body p:has(> img) + h2,
.cf-article__body p:has(> a > img) + h2,
.cf-article__body .cf-img-overlay + h2 {
    margin-top: 24px;
}

.cf-article__body p:has(> img) + h3,
.cf-article__body p:has(> a > img) + h3,
.cf-article__body .cf-img-overlay + h3 {
    margin-top: 16px;
}

/* The intro section (.cf-article__body--intro) ends with the body's
   first image (hero/banner/coupon). The main `.cf-article__body` that
   follows opens with an H2 — and lives in a separate container, so the
   `+ h2` rule above can't reach it. Drop its top margin to match. */
.cf-article__body--intro + .cf-article__body > h2:first-child,
.cf-article__body--intro + .cf-article__body > h3:first-child {
    margin-top: 24px;
}

.cf-article__body p {
    margin: 0 0 20px;
}

.cf-article__body img {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 4px;
}

/* Popular products module (Phase A demo) */
.cf-popular-products {
    margin: 40px 0;
}

.cf-popular-products__heading {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 24px;
}

.cf-popular-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.cf-popular-products__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
    padding: 16px;
}

.cf-popular-products__image-wrap {
    position: relative;
    margin-bottom: 12px;
}

.cf-popular-products__image-link {
    display: block;
}

.cf-popular-products__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.cf-popular-products__discount-badge {
    position: absolute;
    right: 8px;
    top: 8px;
    background: #35b2b6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1.2;
}

.cf-popular-products__name {
    color: #4a4a4a;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    margin-bottom: 8px;
}

.cf-popular-products__prices {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    line-height: 1.3;
}

.cf-popular-products__price-regular {
    color: #999;
    font-size: 13px;
}

.cf-popular-products__price-discounted {
    color: #d12d2d;
    font-weight: 700;
    font-size: 16px;
}

.cf-popular-products__upload-cta {
    background: #35b2b6;
    color: #fff;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
    /* The element is either <a> (uploadUrl override) or <label>
       (default inline-file-picker). Both default to inline display,
       which strands width:100% and breaks the card's bottom-align. */
    display: block;
    box-sizing: border-box;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    width: 100%;
}

.cf-popular-products__upload-cta:hover,
.cf-popular-products__upload-cta:focus-visible {
    background: #2a8f93;
}

/* "Ungetestet" badge for pre-version product tiles. Pinned top-left on
   the image so editors spot unverified entries without inspecting the
   source. Image-wrap is already position:relative (line ~172) so the
   absolute positioning resolves correctly. Hidden on production via
   the `cf-prod` root class set by productionBadgeFix in renderArticle.ts. */
.cf-prod .cf-popular-products__untested-badge {
    display: none;
}

.cf-popular-products__untested-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Inline file-upload form: wraps the button so the global fileupload.js
   picks up the js-du-* hooks and opens the file picker on click instead
   of navigating to /singleupload.jsf?productId=… */
.cf-popular-products__upload-form {
    margin: 0;
    margin-top: auto;
    width: 100%;
}

.cf-popular-products__upload-button {
    position: relative;
    width: 100%;
}

.cf-popular-products__upload-button .fileinput {
    /* The shop's global .fileinput rule hides it anyway; this is a
       defensive belt-and-braces so the picker stays invisible even on
       pages that load before the shop CSS. */
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Tables — comparison grids inside article body. Matches the live MFDE
   teal-header / bordered-cell look */
.cf-article__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.5;
}

.cf-article__body table th,
.cf-article__body table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.cf-article__body table thead th {
    background-color: #4dbab3;
    color: #fff;
    font-weight: 600;
}

/* First-column bold on normal article tables (e.g. format / age / category).
   Matches the live `.styled-table tbody td:first-child` look. */
.cf-article__body table tbody td:first-child {
    font-weight: 600;
}

/* Quote tables (demoted from <thead> by demoteQuoteTableHead) are styled
   like the live `.styled-table.kurzzitate-table`: all cells in italic,
   no bold first column, no teal header (already gone via demotion), plus
   zebra striping on alternate rows. Scoped to .cf-quotes-table so the
   normal article tables (no zebra on live) stay solid white. */
.cf-article__body table.cf-quotes-table tbody td {
    font-style: italic;
    font-weight: normal;
}

.cf-article__body table.cf-quotes-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.cf-article__body a {
    color: #35b2b6;
    text-decoration: none;
}

.cf-article__cta {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin: 40px 0;
    text-align: center;
}

.cf-article__cta a {
    display: inline-block;
    background: #35b2b6;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.cf-article__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
}

.cf-article__topic-chip {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 16px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
}

.cf-article__topic-chip:hover {
    background: #e0e0e0;
}

/* Index / list page --------------------------------------------------- */
.cf-blog-index__title {
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 32px;
}

.cf-post-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.cf-post-card {
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.cf-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cf-post-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.cf-post-card__media img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.cf-post-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.cf-post-card__title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 8px;
    font-weight: 600;
}

.cf-post-card__dek {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 12px;
}

.cf-post-card__byline {
    font-size: 12px;
    color: #888;
    margin: 0;
    margin-top: auto;
}

/* Quick-navigation TOC ---------------------------------------------- */
.cf-article__toc {
    margin: 24px 0 32px;
    font-size: 14px;
}

.cf-article__toc-heading {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0 0 12px;
    color: #4a4a4a;
}

.cf-article__toc-list {
    list-style: disc;
    padding: 0 0 0 28px;
    margin: 0;
}

.cf-article__toc-list li {
    margin: 10px 0;
    line-height: 1.4;
}

.cf-article__toc-list li a {
    color: #1a1a1a;
    text-decoration: none;
}

.cf-article__toc-list li a:hover,
.cf-article__toc-list li a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.cf-article__toc-list li.cf-article__toc-sub a {
    color: #555;
}

/* Show-more toggle for long TOCs — items beyond the first 6 are marked
 * .cf-article__toc-extra and hidden by default; the inline IIFE flips
 * `data-cf-expanded` on the nav to reveal them. Single <ul> keeps the
 * list visually contiguous; toggle stays at the bottom on both states. */
.cf-article__toc-extra {
    display: none;
}

.cf-article__toc[data-cf-expanded="1"] .cf-article__toc-extra {
    display: list-item;
}

.cf-article__toc-toggle {
    margin-top: 10px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: rgb(53, 178, 182);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cf-article__toc-toggle::after {
    content: "\25BE"; /* ▾ */
    transition: transform 0.15s ease;
    display: inline-block;
}

.cf-article__toc-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.cf-article__toc-toggle-label--less {
    display: none;
}

.cf-article__toc-toggle[aria-expanded="true"] .cf-article__toc-toggle-label--more {
    display: none;
}

.cf-article__toc-toggle[aria-expanded="true"] .cf-article__toc-toggle-label--less {
    display: inline;
}

/* Social-media embeds ----------------------------------------------- */
.cf-embed {
    margin: 32px auto;
    max-width: 540px;
}

.cf-embed iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #f5f5f5;
}

.cf-embed--instagram iframe {
    /* Instagram embed renders header + media + caption — fixed height
       avoids the iframe collapsing before Instagram's script measures. */
    height: 720px;
}

.cf-embed--twitter iframe {
    min-height: 420px;
    aspect-ratio: 4 / 5;
    height: auto;
}

.cf-embed--youtube iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* TL;DR / At-a-glance summary block --------------------------------- */
.cf-article__tldr {
    margin: 16px 0 32px;
    padding: 20px 24px;
    background: #d9efe9;
    border-left: 4px solid #1f6b5a;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.55;
    color: #1a1a1a;
}

.cf-article__tldr p {
    margin: 0;
}

/* Categories chip nav ----------------------------------------------- */
.cf-blog-index__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 12px;
}

.cf-blog-index__chip {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    color: #1a1a1a;
    background: #f1f1f1;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.cf-blog-index__chip:hover,
.cf-blog-index__chip:focus-visible {
    background: rgba(53, 178, 182, 0.12);
    border-color: rgb(53, 178, 182);
    color: rgb(53, 178, 182);
}

.cf-blog-index__chip--active {
    background: rgb(53, 178, 182);
    color: #fff;
    border-color: rgb(53, 178, 182);
}

.cf-blog-index__chip--all {
    background: transparent;
    border-color: rgba(53, 178, 182, 0.4);
}

.cf-blog-index__chip--all.cf-blog-index__chip--active {
    background: rgb(53, 178, 182);
    color: #fff;
    border-color: rgb(53, 178, 182);
}

/* Search input ------------------------------------------------------ */
.cf-blog-index__search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    max-width: 480px;
}

.cf-blog-index__search-label {
    /* Visually hidden — placeholder carries the user-facing prompt;
       label is kept for screen readers only. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cf-blog-index__search-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cf-blog-index__search-input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

/* Sidebar layout (Kishan #11) ---------------------------------------- */
.cf-blog-index__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

.cf-blog-index__sidebar-wrap {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: start;
}

.cf-blog-index__sidebar-wrap .cf-landing__hero {
    margin: 0;
}

.cf-blog-index__sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cf-blog-index__sidebar .cf-blog-index__categories {
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
}

.cf-blog-index__sidebar .cf-blog-index__chip {
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.cf-blog-index__sidebar .cf-blog-index__search {
    margin: 0;
    max-width: none;
}

@media (max-width: 767px) {
    .cf-blog-index__layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cf-blog-index__sidebar-wrap {
        position: static;
    }

    .cf-blog-index__sidebar .cf-blog-index__categories {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cf-blog-index__sidebar .cf-blog-index__chip {
        width: auto;
    }
}

/* Read-more CTA per tile (Kishan #14) -------------------------------- */
/* <span> not <a> because the whole tile is already wrapped in
   .cf-post-card__link; nesting <a> inside <a> is invalid. */
.cf-post-card__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: rgb(53, 178, 182);
    text-decoration: none;
    border-top: 1px solid #e6e6e6;
}

.cf-post-card__cta::after {
    content: "\2192"; /* → */
    transition: transform 0.15s ease;
}

.cf-post-card:hover .cf-post-card__cta::after,
.cf-post-card:focus-within .cf-post-card__cta::after {
    transform: translateX(3px);
}

/* FAQ accordion (Shadab #1) ----------------------------------------- */
/* Native <details>/<summary> — no JS. Each Q+A in the FAQ section is
   collapsed by default; the summary chevron flips on open via the
   [open] attribute. */
.cf-article__faq {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    margin: 8px 0;
    background: #fff;
    overflow: hidden;
}

.cf-article__faq + .cf-article__faq {
    margin-top: 0;
    border-top: 0;
    border-radius: 0;
}

.cf-article__faq:first-of-type {
    border-radius: 4px 4px 0 0;
}

.cf-article__faq:last-of-type {
    border-radius: 0 0 4px 4px;
}

.cf-article__faq > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cf-article__faq > summary::-webkit-details-marker {
    display: none;
}

.cf-article__faq > summary::after {
    content: "\002B"; /* + */
    font-weight: 400;
    font-size: 22px;
    color: #6b6b6b;
    transition: transform 0.15s ease;
}

.cf-article__faq[open] > summary::after {
    content: "\2212"; /* − */
}

.cf-article__faq > summary:hover,
.cf-article__faq > summary:focus-visible {
    background: #fafafa;
}

.cf-article__faq > p {
    margin: 0;
    padding: 0 20px 20px;
    font-size: 16px;
    line-height: 1.7;
    color: #4a4a4a;
}

/* Prev/Next article navigation -------------------------------------- */
/* Sits between the Related Articles grid and the Popular Products
 * block. Prev pins left, next pins right; an empty <span> placeholder
 * preserves the layout when only one direction is available (oldest or
 * newest article). */
.cf-article__nav-prev-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 24px 0 32px;
}

.cf-article__nav-link {
    background: #35b2b6;
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: background-color 120ms ease-in-out;
}

.cf-article__nav-link:hover,
.cf-article__nav-link:focus-visible {
    background: #2a8f93;
    color: #fff;
    text-decoration: none;
}

/* Related-articles grid (Shadab #2) --------------------------------- */
/* Replaces the legacy <ul><li><a> related list with a card grid. Each
   card is the full link target — image + title + read-more affordance.
   Same shop CDN convention as the blog index tiles. */
.cf-related-grid__heading {
    /* Match .cf-article__body h2 so the related-grid heading sits visually
     * on the same level as the body section headings. Previously it used
     * 1.5rem + smaller top-margin which made it look like a sub-heading
     * floating between body and grid (user feedback 2026-05-11). */
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    margin: 48px 0 16px;
}

.cf-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 0 0 32px;
}

.cf-related-grid__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
}

.cf-related-grid__card:hover,
.cf-related-grid__card:focus-visible {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cf-related-grid__card img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

.cf-related-grid__title {
    display: block;
    padding: 12px 14px 4px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    color: #1a1a1a;
}

.cf-related-grid__date {
    display: block;
    padding: 0 14px 6px;
    font-size: 12px;
    color: #888;
}

.cf-related-grid__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 10px 14px 14px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(53, 178, 182);
}

.cf-related-grid__cta::after {
    content: "\2192"; /* → */
    transition: transform 0.15s ease;
}

.cf-related-grid__card:hover .cf-related-grid__cta::after,
.cf-related-grid__card:focus-visible .cf-related-grid__cta::after {
    transform: translateX(3px);
}

/* Author bio block (Shadab #3) -------------------------------------- */
/* Short bio at the foot of the article body. Editorial-team fallback
   currently fills every article — content team can override per-author
   later by setting `author: <slug>` in the source frontmatter. */
.cf-article__author-bio {
    margin: 32px 0 0;
    padding: 20px 24px;
    background: #fafafa;
    border-radius: 4px;
    border-left: 3px solid #1a1a1a;
}

/* Horizontal layout when an author portrait is present: portrait on the
 * left (120px square, circular), bio content (heading + tagline + body +
 * more-link) on the right. Collapses to vertical stacking under 480px. */
.cf-article__author-bio--has-portrait {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.cf-article__author-bio-photo {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px;
    flex: 0 0 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
}

.cf-article__author-bio-content {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 480px) {
    .cf-article__author-bio--has-portrait {
        flex-direction: column;
        align-items: flex-start;
    }
}

.cf-article__author-bio-heading {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.cf-article__author-bio-tagline {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    letter-spacing: 0.02em;
}

.cf-article__author-bio-body {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: #4a4a4a;
}

.cf-article__author-bio-body > p {
    margin: 0;
}

.cf-article__author-bio-body--collapsible[data-cf-bio-expanded="0"] > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf-article__author-bio-toggle {
    margin-top: 8px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: rgb(53, 178, 182);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cf-article__author-bio-toggle::after {
    content: "\25BE"; /* ▾ */
    transition: transform 0.15s ease;
    display: inline-block;
}

.cf-article__author-bio-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.cf-article__author-bio-toggle-label--less {
    display: none;
}

.cf-article__author-bio-toggle[aria-expanded="true"] .cf-article__author-bio-toggle-label--more {
    display: none;
}

.cf-article__author-bio-toggle[aria-expanded="true"] .cf-article__author-bio-toggle-label--less {
    display: inline;
}

/* FAQ accordion ------------------------------------------------------ */
/* Each question collapsed by default — matches the live MFDE/MPUK blogs'
   FAQ UX. Native <details> handles open/close. */
.cf-faq__heading {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    margin: 48px 0 16px;
}

.cf-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 32px;
}

.cf-faq__item {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    background: #fafafa;
}

.cf-faq__item[open] {
    background: #fff;
}

.cf-faq__question {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    padding: 14px 16px;
    list-style: none;
    position: relative;
    padding-right: 40px;
}

.cf-faq__question::-webkit-details-marker {
    display: none;
}

.cf-faq__question::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain;
    transition: transform 0.15s ease;
}

.cf-faq__item[open] .cf-faq__question::after {
    transform: translateY(-50%) rotate(180deg);
}

.cf-faq__answer {
    padding: 0 16px 14px;
    font-size: 16px;
    line-height: 1.6;
}

.cf-faq__answer p:last-child {
    margin-bottom: 0;
}

/* Breadcrumbs (Shadab #1) ------------------------------------------- */
/* Sits between the shop's top nav and the article hero image. Generous
   top + bottom margin (24px each) for separation from shop chrome above
   and the hero image below. */
.cf-breadcrumbs {
    margin: 0 0 30px;
    font-size: 13px;
    color: #6b6b6b;
}

.cf-breadcrumbs__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cf-breadcrumbs__item {
    display: inline-flex;
    align-items: center;
}

.cf-breadcrumbs__item + .cf-breadcrumbs__item::before {
    content: "\203A"; /* › */
    margin-right: 6px;
    color: #999;
}

.cf-breadcrumbs__item a {
    color: #4a4a4a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.cf-breadcrumbs__item a:hover,
.cf-breadcrumbs__item a:focus-visible {
    text-decoration-thickness: 2px;
}

.cf-breadcrumbs__item--current {
    color: #1a1a1a;
}

/* Reading time (Shadab #3) ------------------------------------------ */
/* Slot inside .cf-article__byline; the byline already lays out items
   in a horizontal flex row with a 16px gap, so no extra margins. */
.cf-article__readtime {
    color: #6b6b6b;
}

/* Social share (Shadab #2) ------------------------------------------ */
.cf-article__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 32px;
    padding: 12px 0;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    font-size: 13px;
    color: #6b6b6b;
}

.cf-article__share-label {
    font-weight: 600;
    color: #1a1a1a;
}

.cf-article__share-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cf-article__share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f1f1;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.cf-article__share-link:hover,
.cf-article__share-link:focus-visible {
    background: #1a1a1a;
    color: #fff;
}

.cf-article__share-link svg {
    width: 18px;
    height: 18px;
}

/* Visually-hide the platform name; aria-label carries it for AT.
   clip-path: inset(50%) is the modern recipe; the kept clip rect is the
   pre-clip-path fallback for legacy IE/Edge that doesn't recognize it. */
.cf-article__share-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Newsletter signup (Shadab #4) ------------------------------------- */
.cf-article__newsletter {
    margin: 32px 0 0;
    padding: 24px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    text-align: center;
}

.cf-article__newsletter-heading {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.cf-article__newsletter-body {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #d6d6d6;
}

.cf-article__newsletter-cta {
    display: inline-block;
    padding: 10px 22px;
    background: #fff;
    color: #1a1a1a;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.cf-article__newsletter-cta:hover,
.cf-article__newsletter-cta:focus-visible {
    background: #f1f1f1;
}

/* Blog-index pagination nav (Shadab pagination PR) ------------------- */
/* Prev/Next links rendered by renderLanding.ts renderPagination() for
   blog-index page 2+ (and page 1 next-link). */
.cf-landing__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    margin: 40px 0 16px;
}

.cf-landing__pager-prev,
.cf-landing__pager-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    background: #f1f1f1;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cf-landing__pager-prev:hover,
.cf-landing__pager-prev:focus-visible,
.cf-landing__pager-next:hover,
.cf-landing__pager-next:focus-visible {
    background: #e2e2e2;
    border-color: #b0b0b0;
}

.cf-landing__pager-prev::before {
    content: "\2190"; /* ← */
}

.cf-landing__pager-next::after {
    content: "\2192"; /* → */
}

.cf-landing__pager-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cf-landing__pager-page:hover,
.cf-landing__pager-page:focus-visible {
    background: #f1f1f1;
    border-color: #cfcfcf;
}

.cf-landing__pager-page--current {
    background: rgb(53, 178, 182);
    color: #fff;
    border-color: rgb(53, 178, 182);
    font-weight: 600;
    pointer-events: none;
}

.cf-landing__pager-gap {
    padding: 0 4px;
    color: #888;
}

/* cf-landing__intro: subtitle text below the H1 on index pages */
.cf-landing__intro {
    font-size: 16px;
    color: #555;
    margin: 0 0 24px;
    max-width: 640px;
}

/* cf-img-overlay: hover overlay on body images. Pinterest "Save" pin-it
   (top-left) on every body image; shop discount CTA (bottom-right) on
   every image EXCEPT the discount banner itself (suppressed via the
   --banner modifier). Mirrors the live shop's `-toBeCloned` JS pattern
   but emitted statically by wrapDiscountImageOverlay.ts.

   Color !important: shop-side CSS sets default `a { color: ... }` rules
   that would otherwise paint our button text in the shop's link colour.
   We need the chip background to remain readable, so the white text is
   pinned. */
.cf-img-overlay {
    position: relative;
    margin: 16px 0;
    line-height: 0;
}

.cf-img-overlay__link,
.cf-img-overlay__link img,
.cf-img-overlay > img {
    display: block;
    width: 100%;
}

.cf-img-overlay__pin,
.cf-img-overlay__cta {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease-out;
    line-height: 1.2;
    text-decoration: none;
    font-weight: 600;
    color: #fff !important;
}

.cf-img-overlay:hover .cf-img-overlay__pin,
.cf-img-overlay:hover .cf-img-overlay__cta,
.cf-img-overlay:focus-within .cf-img-overlay__pin,
.cf-img-overlay:focus-within .cf-img-overlay__cta {
    opacity: 1;
    pointer-events: auto;
}

.cf-img-overlay__pin {
    top: 10px;
    left: 10px;
    background: #e60023;
    font-size: 14px;
    padding: 6px 10px 6px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cf-img-overlay__pin-text {
    color: #fff !important;
}

.cf-img-overlay__pin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #fff;
    color: #e60023 !important;
    border-radius: 50%;
    font-weight: 700;
    font-style: italic;
    font-size: 13px;
}

.cf-img-overlay__cta {
    bottom: 10px;
    right: 10px;
    background: #2a8f93;
    font-size: 16px;
    padding: 10px 18px;
    border-radius: 3px;
}

.cf-img-overlay__cta:hover,
.cf-img-overlay__pin:hover {
    filter: brightness(1.1);
}

/* cf-quotes-grid: 3-column tile layout for canonical 3-quote clusters
   under listicle H2/H3 sections. Mirrors live MFDE `.quotes-grid`. */
.cf-quotes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

@media (max-width: 720px) {
    .cf-quotes-grid {
        grid-template-columns: 1fr;
    }
}

.cf-quotes-grid__tile {
    background: #f2f2f2;
    color: #555;
    padding: 28px 24px;
    border-radius: 6px;
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    transition: background 160ms ease-out, color 160ms ease-out;
}

.cf-quotes-grid__tile:hover {
    background: #2a8f93;
    color: #fff;
}

/* cf-quotes-grid-list: table-style 2-column layout for dense quote lists
   (≥ 8 items). Mirrors live MFDE `.quotes-grid-list` look — white
   cells joined by thin grey borders, no rounded corners, no tile fill. */
.cf-quotes-grid-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid #e3e3e3;
}

@media (max-width: 720px) {
    .cf-quotes-grid-list {
        grid-template-columns: 1fr;
    }
}

.cf-quotes-grid-list > li {
    padding: 14px 18px;
    border: 1px solid #e3e3e3;
    margin: -1px 0 0 -1px;
    color: #444;
    font-style: italic;
    line-height: 1.5;
}

/* Alternating row backgrounds: rows 1-2 white, rows 3-4 light grey,
   rows 5-6 white, etc. Items are emitted left-to-right (col 1, col 2,
   col 1, col 2, …) so 4n+1/+2 are the white row pair and 4n+3/+4 are
   the grey row pair. */
.cf-quotes-grid-list > li:nth-child(4n+1),
.cf-quotes-grid-list > li:nth-child(4n+2) {
    background-color: #ffffff;
}

.cf-quotes-grid-list > li:nth-child(4n+3),
.cf-quotes-grid-list > li:nth-child(4n+4) {
    background-color: #f9f9f9;
}

/* cf-quotes-list: plain italic bullet list for shorter all-quote lists
   (3-7 items). Mirrors live MFDE `.quotes-list` — keeps the default
   browser bullet markers, just adds italic styling. */
.cf-quotes-list {
    margin: 16px 0;
    padding-left: 24px;
    color: #444;
    font-style: italic;
    line-height: 1.6;
}

.cf-quotes-list > li {
    margin: 6px 0;
}
