:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --secondary: #7209b7;
    --accent: #f72585;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --dark-gray: #495057;
    --gray: #adb5bd;
    --light-gray: #e9ecef;
    --transition: all 0.3s ease;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --card-padding: 30px;
    --btn-primary: #4361ee;
    --btn-primary-dark: #3a0ca3;
    --surface-invert: #212529;
    --surface-invert-text: #ffffff;
    --surface-invert-muted: #adb5bd;
    /* --primary (#4361ee) only reaches ~4.2:1 on --light-gray (#e9ecef),
       under the 4.5:1 WCAG AA minimum for normal text - fails on every
       card-style section that uses --light-gray as a background (feature
       items, sources list, steps list, author box, etc). --primary-dark
       reaches ~10:1 on the same background, so card headings/links use
       this token instead of --primary directly. */
    --primary-on-surface: var(--primary-dark);
}

.dark-mode {
    --primary: #4cc9f0;
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --light: #121212;
    --dark: #f8f9fa;
    --dark-gray: #b4b4b4;
    --light-gray: #2d2d2d;
    --gray: #6c757d;
    /* In dark mode --light-gray is a dark card background, and --primary
       is already the bright cyan that reads fine on it, so no swap needed. */
    --primary-on-surface: var(--primary);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition);
}

body {
    font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
}

.dark-mode body {
    background: linear-gradient(135deg, #0f0f0f 0%, #232323 100%);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Blog Content Styles */
.blog-container {
    max-width: none;
    margin: 60px 0 50px;
    padding: 40px 85px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dark-mode .blog-container {
    background: var(--light-gray);
}

.blog-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
    padding-top: 20px;
}

.blog-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-meta {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.blog-image-container {
    width: 100%;
    text-align: center;
    margin: 30px 0;
}

.blog-image {
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.cover-credit {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--dark-gray);
    text-align: right;
}

.cover-credit a {
    color: var(--dark-gray);
    text-decoration: underline;
}

.cover-credit a:hover {
    color: var(--primary);
}

.blog-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    /* The site header is position:sticky and sits on top of the page once
       scrolled - without this, clicking a TOC link (or any #anchor link)
       scrolls the heading to the very top of the viewport, right where the
       sticky header now covers it. scroll-margin-top tells the browser to
       stop short and leave this much room above the heading instead,
       clearing the header (~90px tall) with a bit of breathing room. */
    scroll-margin-top: 130px;
}

.dark-mode .blog-content h2 {
    border-bottom-color: var(--dark-gray);
}

.blog-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--primary-dark);
    scroll-margin-top: 130px;
}

.dark-mode .blog-content h3 {
    color: var(--primary-light);
}

.blog-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.blog-content li {
    margin-bottom: 10px;
}

.formula {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    text-align: center;
    font-style: italic;
}

.dark-mode .formula {
    background: var(--dark-gray);
}

.example {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.dark-mode .example {
    background: var(--dark-gray);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--radius);
}

.dark-mode .feature-item {
    background: var(--dark-gray);
}

.feature-item h3 {
    margin-bottom: 15px;
    color: var(--primary-on-surface);
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 20px;
}

.dark-mode .faq-item {
    border-bottom-color: var(--dark-gray);
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* Floating "On This Page" rail: a small fixed tick-mark toggle on the right
   edge of the viewport that expands into a scrollable panel of jump-links.
   Fixed positioning takes it out of document flow entirely, so where its
   markup sits in the article makes no visual difference - see
   post-template.php for where {$tocHtml} is emitted. */
.toc-widget {
    position: fixed;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    z-index: 60;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    /* Hints the browser to promote this to its own GPU-composited layer up
       front, so scrolling never has to repaint it from scratch on every
       frame - keeps a fixed-position element buttery smooth even on
       low-end phones/laptops instead of only optimizing once scrolling has
       already started. */
    will-change: transform;
}

.toc-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 14px 10px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.toc-toggle:hover .toc-tick:not(.is-active) {
    background: var(--dark-gray);
}

.dark-mode .toc-toggle:hover .toc-tick:not(.is-active) {
    background: rgba(255, 255, 255, 0.6);
}

.toc-ticks {
    display: flex;
    flex-direction: column;
    /* Right-aligned rather than centered: with center alignment, the active
       tick's extra width (see .toc-tick.is-active below) grew evenly on
       both sides, so every scroll-triggered active-tick change visibly
       shifted the whole rail left AND right - reading as a "shake" while
       scrolling. Anchoring all ticks to a shared right edge means only the
       left edge ever moves, growing toward the content instead of
       wobbling the rail itself. */
    align-items: flex-end;
    gap: 7px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.toc-tick {
    display: block;
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--gray);
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

.dark-mode .toc-tick {
    background: rgba(255, 255, 255, 0.35);
}

/* The tick for whichever section is currently on screen (see the
   scroll-spy logic in post-template.php's inline script) grows wider as
   well as changing color, so the "you are here" marker reads clearly at a
   glance rather than just being a subtle color change. */
.toc-tick.is-active {
    width: 28px;
    height: 4px;
    background: var(--primary);
}

.toc-panel {
    width: min(320px, calc(100vw - 88px));
    max-height: min(70vh, 520px);
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.toc-panel[hidden] {
    display: none;
}

/* Desktop/mouse: hovering anywhere over the rail or the open panel shows
   it, for as long as the pointer stays within the widget - this CSS rule
   alone handles that (it outranks the [hidden] rule above on specificity,
   so it shows the panel even while its hidden attribute is still true).
   Touch/keyboard users, who have no hover, still get the click-to-toggle
   behavior wired up in the inline script instead. */
.toc-widget:hover .toc-panel {
    display: flex;
}

.dark-mode .toc-panel {
    background: var(--dark-gray);
}

.toc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.dark-mode .toc-panel-head {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.toc-panel-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dark-gray);
}

.dark-mode .toc-panel-label {
    color: var(--light);
}

.toc-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--dark-gray);
    cursor: pointer;
}

.toc-panel-close:hover {
    background: var(--gray);
    color: white;
}

.toc-panel-close svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.toc-panel-list {
    list-style: none;
    overflow-y: auto;
    padding: 10px 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}

.toc-panel-list::-webkit-scrollbar {
    width: 6px;
}

.toc-panel-list::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 999px;
}

.toc-panel-list::-webkit-scrollbar-track {
    background: transparent;
}

.toc-item a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
}

.dark-mode .toc-item a {
    color: var(--light);
}

.toc-item--sub a {
    margin-left: 16px;
    font-weight: 400;
    font-size: 0.86rem;
    color: var(--dark-gray);
}

.dark-mode .toc-item--sub a {
    color: var(--gray);
}

.toc-item a:hover,
.toc-item a:focus-visible {
    background: var(--light-gray);
    color: var(--primary-on-surface);
}

.dark-mode .toc-item a:hover,
.dark-mode .toc-item a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.toc-item.is-active > a {
    background: var(--light-gray);
    border-left-color: var(--primary);
    color: var(--primary-dark);
}

.dark-mode .toc-item.is-active > a {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.data-t-sec {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: auto;
    height: auto;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table thead tr {
    background-color: var(--btn-primary);
    color: white;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.data-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.data-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.dark-mode .data-table tbody tr:nth-of-type(even) {
    background-color: #2a2a2a;
}

.data-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary);
}

.data-table tbody tr.active-row {
    font-weight: bold;
    color: var(--primary);
}

.chart-container {
    background: white;
    padding: 15px;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.dark-mode .chart-container {
    background: var(--dark-gray);
}

.chart-bar {
    height: 30px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    margin: 10px 0;
    border-radius: 5px;
    position: relative;
    transition: width 1s ease-in-out;
}

.chart-label {
    position: absolute;
    right: 26px;
    top: 2px;
    color: white;
    font-weight: bold;
    /* A short bar (a small data value) isn't wide enough to contain its own
       label, which then spills onto the white chart-container background
       behind it - invisible there, since it's plain white text with
       nothing to contrast against. This outline (a layered text-shadow,
       the standard CSS text-stroke workaround) keeps the label readable
       either way, without changing how it already looks on a wide bar. */
    text-shadow:
        -1px -1px 0 var(--dark),
        1px -1px 0 var(--dark),
        -1px 1px 0 var(--dark),
        1px 1px 0 var(--dark);
}

.chart-container h3,
.pie-chart-container h3 {
    margin-bottom: 12px;
    color: var(--primary-on-surface);
}

.chart-note {
    background: rgba(67, 97, 238, 0.06);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin: 14px 0 20px;
    font-size: 0.92em;
}

.dark-mode .chart-note {
    background: rgba(76, 201, 240, 0.1);
}

.data-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    font-size: 1.05em;
    color: var(--primary-on-surface);
    padding: 0 0 10px;
    /* A caption's box can end up sized to the table's narrow content width
       rather than its own text, wrapping a short title across several
       lines. nowrap forces it to one line; .data-t-sec's existing
       overflow-x: auto (the same fallback already used for a too-wide
       table) takes over if a caption is ever long enough to need it. */
    white-space: nowrap;
}

/* The pie is the component's centerpiece - large, no card/background of
   its own (sits directly on the page), with each label positioned out at
   its own slice's real angular position (see .pie-chart-legend li below)
   so the explanation reads as arranged around the chart, not stacked
   beside or under it. .pie-chart-body is the circular arrangement's
   positioning context; on a screen too narrow to fit that arrangement
   without labels colliding, the media query near the end of this file
   switches it back to a plain centered column instead. */
.pie-chart-container {
    margin: 25px 0;
    padding: 10px 0 20px;
    text-align: center;
}

.pie-chart-body {
    position: relative;
    width: min(540px, 100%);
    aspect-ratio: 1;
    margin: 15px auto 0;
}

.pie-chart-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.pie-chart-legend {
    list-style: none;
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
}

/* Each li is centered on its own anchor point (the standard
   left:50%/translate(-50%) trick), then pushed outward from that center
   by trigonometry: --pie-angle (0-359, set inline per item by
   owc_render_piechart_block() in import-parser.php - see
   admin/lib/sanitize-html.php for how that one value is validated) is the
   slice's own angular midpoint, 0deg = top, clockwise - matching the
   conic-gradient on .pie-chart-visual, which also starts at 0% at the top
   and sweeps clockwise, so a label really does sit next to the wedge it
   describes. */
.pie-chart-legend li {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85em;
    line-height: 1.3;
    text-align: center;
    transform:
        translate(-50%, -50%)
        translate(
            calc(sin(var(--pie-angle, 0) * 1deg) * 195px),
            calc(cos(var(--pie-angle, 0) * 1deg) * -195px)
        );
}

.pie-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* Ordered for maximum visual distinction between adjacent slots, not brand
   priority: primary and primary-light are both blue and hard to tell apart
   at a glance (confirmed in a real rendered screenshot), so they're placed
   at opposite ends (1 and 6) - a chart with 5 or fewer slices (the common
   case) never shows both. */
.pie-color-1 {
    background: var(--primary);
}

.pie-color-2 {
    background: var(--accent);
}

.pie-color-3 {
    background: var(--success);
}

.pie-color-4 {
    background: var(--secondary);
}

.pie-color-5 {
    background: var(--primary-dark);
}

.pie-color-6 {
    background: var(--primary-light);
}

.reading-time-comparison {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    flex-wrap: wrap;
}

.comparison-card {
    flex: 1;
    min-width: 250px;
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--radius);
    margin: 10px;
    text-align: center;
}

.dark-mode .comparison-card {
    background: var(--dark-gray);
}

.comparison-card h4 {
    color: var(--primary-on-surface);
    margin-bottom: 15px;
}

.comparison-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.dark-mode .comparison-value {
    color: var(--primary-light);
}

.unique-insight {
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    margin: 25px 0;
    background-color: rgba(67, 97, 238, 0.05);
}

.dark-mode .unique-insight {
    background-color: rgba(76, 201, 240, 0.1);
}

/* Responsive image styling */
.responsive-image {
    width: 100%;
    height: auto;
    display: block;
    margin: auto;
    border-radius: 25px;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-dark));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .blog-title {
        font-size: 2.2rem;
    }

    /* .blog-container's own side padding keeps shrinking at every
       breakpoint below this one (30px, then 20px/15px, then less) - nowhere
       near enough clearance for a fixed side rail at any width down here.
       Hidden rather than continuing to shrink it: the floating TOC is a
       desktop/tablet convenience, not something worth cramming in at the
       cost of overlapping the article text - visitors on these narrower
       screens still have the normal in-article heading structure to
       scroll through. */
    .toc-widget {
        display: none;
    }
}

@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }

    .blog-content h2 {
        font-size: 1.6rem;
    }

    .blog-content h3 {
        font-size: 1.3rem;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .blog-container {
        padding: 30px;
        margin: 40px auto;
    }

    .reading-time-comparison {
        flex-direction: column;
    }
}

/* Below this width, the desktop pie chart's radial label ring (up to 6
   labels positioned by fixed-pixel trigonometry, see .pie-chart-legend li
   above) doesn't have enough room and labels start crowding or clipping
   against the edge of the content column. Switches back to a plain
   centered column - chart on top, legend below - the same safe layout
   used before the radial arrangement existed. */
@media (max-width: 620px) {
    .pie-chart-body {
        position: static;
        width: auto;
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .pie-chart-visual {
        position: static;
        transform: none;
        width: 170px;
        height: 170px;
    }

    .pie-chart-legend {
        position: static;
        inset: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
        max-width: 420px;
        margin: 0 auto;
    }

    .pie-chart-legend li {
        position: static;
        transform: none;
        width: auto;
    }
}

@media (max-width: 576px) {
    .blog-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .blog-content h2 {
        font-size: 1.4rem;
    }

    .blog-content h3 {
        font-size: 1.2rem;
    }

    .blog-container {
        padding: 20px 15px;
        margin: 30px auto;
    }

    .data-table {
        font-size: 0.8em;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 1.6rem;
    }

    .blog-container {
        margin: 25px auto;
    }

    .pie-chart-visual {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 360px) {
    .blog-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
        line-height: 1.3;
        padding: 0 10px;
        text-align: center;
        width: 100%;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
    }

    .blog-content h2 {
        font-size: 1.3rem;
    }

    .blog-content h3 {
        font-size: 1.1rem;
    }

    .blog-header {
        margin-bottom: 30px;
    }

    .blog-container {
        margin: 10px 0;
        padding: 0;
    }

    .data-t-sec {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: fit-content;
        overflow-x: auto;
        padding: 0;
        margin: 0%;
        text-align: center;
    }

    .data-t-sec thead,
    tbody {
        padding: 0%;
        margin: 0%;
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
}

@media (max-width: 320px) {
    .data-table th,
    .data-table td {
        padding: 5px 2px;
    }
}

@media (max-width: 240px) {
    .blog-title {
        font-size: 1.2rem;
        padding: 0 5px;
    }

    .blog-content h2 {
        font-size: 1.1rem;
    }

    .blog-content h3 {
        font-size: 1rem;
    }

    .blog-container {
        padding: 15px 10px;
        margin: 15px auto;
    }

    .toc-toggle {
        padding: 14px 16px;
    }

    .toc-panel-list {
        padding: 4px 16px 16px;
    }

    .toc-item--sub {
        margin-left: 16px;
    }
}

/* CMS-generated post additions */
.blog-excerpt-meta {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.blog-content a {
    color: var(--primary);
}

.blog-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 10px 20px;
    margin: 20px 0;
    background: var(--light-gray);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.dark-mode .blog-content blockquote {
    background: var(--dark-gray);
}

.blog-content pre,
.blog-content code {
    background: var(--light-gray);
    border-radius: 6px;
    font-family: "Consolas", "Monaco", monospace;
}

.dark-mode .blog-content pre,
.dark-mode .blog-content code {
    background: var(--dark-gray);
}

.blog-content code {
    padding: 2px 6px;
    font-size: 0.9em;
}

.blog-content pre {
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.blog-content pre code {
    padding: 0;
    background: none;
}

.blog-content hr {
    border: none;
    border-top: 1px solid var(--light-gray);
    margin: 30px 0;
}

.dark-mode .blog-content hr {
    border-top-color: var(--dark-gray);
}

.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.author-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--light-gray);
    padding: 25px 30px;
    border-radius: var(--radius);
    margin: 30px 0;
}

.dark-mode .author-box {
    background: var(--dark-gray);
}

.author-box img {
    border-radius: 50%;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.author-box h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--primary-on-surface);
}

.author-box-name a {
    color: var(--primary-on-surface);
    text-decoration: none;
}

.author-box-name a:hover {
    text-decoration: underline;
}

.author-credentials {
    color: var(--dark-gray);
    font-size: 0.88rem;
    margin: 4px 0 10px;
}

/* CMS Phase 1 additions: breadcrumbs, key takeaways, steps, key facts,
   sources, CTA, related posts. Definitions/FAQ/Related-Posts reuse the
   existing .feature-list/.feature-item and .faq-item rules above. */

.breadcrumb-nav {
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-bottom: 16px;
}

.breadcrumb-nav a {
    color: var(--dark-gray);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.key-takeaways,
.steps-list,
.key-facts-list,
.sources-list,
.other-links-list {
    background: var(--light-gray);
    padding: 25px 30px;
    border-radius: var(--radius);
    margin: 30px 0;
}

.dark-mode .key-takeaways,
.dark-mode .steps-list,
.dark-mode .key-facts-list,
.dark-mode .sources-list,
.dark-mode .other-links-list {
    background: var(--dark-gray);
}

.key-takeaways h2,
.steps-list h2,
.key-facts-list h2,
.sources-list h2,
.other-links-list h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-on-surface);
}

.other-links-list ul {
    padding-left: 22px;
}

.other-links-list li {
    margin-bottom: 10px;
}

.other-links-list a {
    color: var(--primary-on-surface);
}

.key-takeaways ul,
.key-facts-list ul {
    padding-left: 22px;
}

.key-takeaways li,
.key-facts-list li {
    margin-bottom: 10px;
}

.steps-list ol {
    padding-left: 22px;
    counter-reset: none;
}

.steps-list li {
    margin-bottom: 20px;
}

.steps-list li h3 {
    color: var(--primary-on-surface);
    margin-bottom: 6px;
}

.key-fact-note {
    display: block;
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-top: 2px;
}

.sources-list ol {
    padding-left: 22px;
}

.sources-list li {
    margin-bottom: 12px;
}

.sources-list a {
    color: var(--primary-on-surface);
}

.source-meta {
    display: block;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.post-cta {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-dark));
    color: #fff;
    padding: 30px;
    border-radius: var(--radius);
    margin: 30px 0;
    text-align: center;
}

.post-cta h2 {
    color: #fff;
    margin-bottom: 10px;
}

.post-cta p {
    margin-bottom: 18px;
    opacity: 0.95;
}

.post-cta-button {
    display: inline-block;
    background: #fff;
    color: var(--btn-primary);
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-cta-button:hover,
.post-cta-button:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
