/*
 * Native single research-article presentation.
 * WordPress post content remains authoritative; the preserved child-theme
 * single.php file is the immediate rollback path.
 */

.plp-article-page {
    --forest:        #409e4a;
    --forest-tint:   #eaf5ec;
    --munsell:       #178e9d;
    --munsell-light: #dff1f3;
    --munsell-tint:  #f3f9fa;
    --electric:      #214d7d;
    --onyx:          #26323e;
    --onyx-light:    #64717d;
    --onyx-fade:     #8b98a3;
    --line:          #d9e5eb;
    --line-soft:     #edf3f6;
    --white:         #ffffff;
    --warning-bg:    #fdf3eb;
    --warning:       #a94a1d;
    width: 100%;
    margin: 0;
    background: var(--white);
    color: var(--onyx);
    font-family: "PLP Manrope", Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.plp-article-page,
.plp-article-page *,
.plp-article-page *::before,
.plp-article-page *::after {
    box-sizing: border-box;
}

.plp-article {
    color: var(--onyx);
    background: var(--white);
    line-height: 1.65;
}
.plp-article ol, .plp-article ul { margin: 0; padding: 0; }

.plp-progress-bar {
    position: fixed; top: 0; left: 0;
    width: 0%; height: 3px;
    background: var(--munsell);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

.plp-breadcrumbs {
    background: var(--munsell-tint);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    font-size: 13px;
}
.plp-breadcrumbs .wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.plp-breadcrumbs ol {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.plp-breadcrumbs li {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--onyx-light); font-weight: 500;
}
.plp-breadcrumbs a { color: var(--onyx-light); text-decoration: none; transition: color 0.15s ease; }
.plp-breadcrumbs a:hover { color: var(--munsell); }
.plp-breadcrumbs li[aria-current="page"] {
    color: var(--electric); font-weight: 600;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 60%;
}
.plp-breadcrumbs .sep { color: var(--onyx-fade); font-size: 12px; }

.plp-article-header { background: var(--white); padding: 40px 0 0; }
.plp-article-header .wrap { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* CATEGORY TAG — high specificity + !important to defeat theme <a> styling.
   Themes apply their own background/color/hover to anchor links, often making
   the tag invisible (text same color as background) or hiding on hover. */
.plp-article .plp-article-header a.plp-category-tag,
.plp-article-header a.plp-category-tag,
a.plp-category-tag,
.plp-category-tag--static {
    display: inline-block !important;
    background: var(--munsell-tint) !important;
    background-color: var(--munsell-tint) !important;
    background-image: none !important;
    color: var(--munsell) !important;
    font-family: "PLP Manrope", sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    padding: 6px 14px !important;
    border: none !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    text-decoration-color: transparent !important;
    margin: 0 0 20px 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    text-shadow: none !important;
    transition: all 0.15s ease;
}

.plp-article .plp-article-header a.plp-category-tag:hover,
.plp-article .plp-article-header a.plp-category-tag:focus,
.plp-article-header a.plp-category-tag:hover,
.plp-article-header a.plp-category-tag:focus,
a.plp-category-tag:hover,
a.plp-category-tag:focus {
    background: var(--munsell) !important;
    background-color: var(--munsell) !important;
    background-image: none !important;
    color: var(--white) !important;
    border: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/* ARTICLE TITLE — high specificity + !important to defeat theme H1 / post-title styles.
   Themes commonly apply text-transform: capitalize (turning "How to Read" into
   "How To Read") and use their own color. Force our brand styling. */
.plp-article .plp-article-header h1.plp-article-title,
.plp-article-header .plp-article-title,
.plp-article-title {
    font-family: "PLP Manrope", sans-serif !important;
    font-size: clamp(32px, 5vw, 52px) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em !important;
    color: var(--electric) !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    text-transform: none !important;
    text-align: left !important;
    text-shadow: none !important;
    background: transparent !important;
    border: none !important;
}
.plp-article-meta {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 24px; padding: 16px 0 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-top: 24px;
    font-size: 13px; color: var(--onyx-light);
}
.plp-meta-item { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.plp-meta-item strong {
    color: var(--electric); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-size: 11px;
}
.plp-meta-divider { flex: 1; height: 1px; }
.plp-share-buttons { display: inline-flex; gap: 8px; }

/* SHARE BUTTONS — high specificity + !important to defeat theme <a> and <button> defaults.
   Both anchor and button elements share the same .plp-share-btn class, but themes
   style them very differently by default. We force them to match. */
.plp-article .plp-share-buttons a.plp-share-btn,
.plp-article .plp-share-buttons button.plp-share-btn,
.plp-share-buttons .plp-share-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: var(--white) !important;
    background-color: var(--white) !important;
    background-image: none !important;
    border: 1.5px solid var(--line) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--onyx-light) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: inherit !important;
    line-height: 1 !important;
    font-family: inherit !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: all 0.2s ease;
}

.plp-article .plp-share-buttons a.plp-share-btn:hover,
.plp-article .plp-share-buttons button.plp-share-btn:hover,
.plp-share-buttons .plp-share-btn:hover {
    background: var(--munsell) !important;
    background-color: var(--munsell) !important;
    border-color: var(--munsell) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* Force SVG icon fill to inherit from button color (defeats theme svg/path rules) */
.plp-article .plp-share-buttons .plp-share-btn svg,
.plp-share-buttons .plp-share-btn svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
    color: currentColor !important;
}
.plp-article .plp-share-buttons .plp-share-btn svg path,
.plp-share-buttons .plp-share-btn svg path {
    fill: currentColor !important;
}

.plp-featured-image { margin: 32px auto 0; max-width: 1100px; padding: 0 32px; }
.plp-featured-image img {
    width: 100%; height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 81, 143, 0.08);
    display: block;
}

.plp-main {
    max-width: 1280px; margin: 56px auto 0; padding: 0 32px;
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 48px; align-items: flex-start;
}
/* When no related posts exist, the .plp-related <aside> is not rendered.
   Constrain the layout to 1100px to match the hero header and featured
   image widths above — keeps the TOC + article column visually aligned
   with the title/category/meta section above. Older browsers without
   :has() support fall back to the wider 1280px layout (still readable). */
.plp-main:not(:has(.plp-related)) {
    max-width: 1100px;
    grid-template-columns: 240px 1fr;
}
@media (max-width: 1100px) {
    .plp-main { grid-template-columns: 220px 1fr; gap: 32px; }
    .plp-main:not(:has(.plp-related)) { grid-template-columns: 220px 1fr; }
    .plp-related { grid-column: 1 / -1; margin-top: 64px; position: relative !important; }
    .plp-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 768px) {
    .plp-main, .plp-main:not(:has(.plp-related)) { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
    .plp-toc { order: -1; position: relative !important; max-height: none !important; }
    .plp-toc-body { max-height: 280px !important; overflow-y: auto !important; }
    .plp-related-grid { grid-template-columns: 1fr !important; }
}

.plp-toc {
    position: sticky; top: 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 81, 143, 0.04);
    max-height: calc(100vh - 48px);
    display: flex; flex-direction: column;
}
.plp-toc-header {
    background: var(--electric);
    padding: 18px 22px; flex-shrink: 0;
}
/* TOC HEADER TITLE — high specificity + !important to defeat theme H2 defaults */
.plp-article .plp-toc-header h2.plp-toc-header-title,
.plp-toc .plp-toc-header-title {
    font-family: "PLP Manrope", sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--white) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    border: none !important;
    background: transparent !important;
}
/* TOC BODY — macOS-style scrollbar: fades in while scrolling, fades out when idle.
   The .is-scrolling class is added/removed by JavaScript (see script section).
   Default state: scrollbar invisible (transparent thumb + track).
   Active state: thumb fades in to subtle Munsell teal. */
.plp-article .plp-toc .plp-toc-body,
.plp-toc .plp-toc-body,
.plp-toc-body {
    padding: 8px 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 !important;
    /* Firefox baseline: hidden by default */
    scrollbar-width: thin !important;
    scrollbar-color: transparent transparent !important;
    transition: scrollbar-color 0.4s ease !important;
}
/* Firefox active state: thumb visible, track stays transparent */
.plp-article .plp-toc .plp-toc-body.is-scrolling,
.plp-toc-body.is-scrolling {
    scrollbar-color: rgba(0, 154, 177, 0.5) transparent !important;
}

/* Webkit (Chrome, Safari, modern Edge): always-present 6px overlay-style track */
.plp-article .plp-toc .plp-toc-body::-webkit-scrollbar,
.plp-toc .plp-toc-body::-webkit-scrollbar,
.plp-toc-body::-webkit-scrollbar {
    width: 6px !important;
    background: transparent !important;
}
.plp-article .plp-toc .plp-toc-body::-webkit-scrollbar-track,
.plp-toc-body::-webkit-scrollbar-track {
    background: transparent !important;
}
/* Default: thumb invisible (zero opacity, fades on transition) */
.plp-article .plp-toc .plp-toc-body::-webkit-scrollbar-thumb,
.plp-toc-body::-webkit-scrollbar-thumb {
    background: transparent !important;
    border-radius: 3px !important;
    transition: background-color 0.4s ease !important;
    min-height: 30px !important;
}
/* Active state (while scrolling or on hover): thumb fades in */
.plp-article .plp-toc .plp-toc-body.is-scrolling::-webkit-scrollbar-thumb,
.plp-article .plp-toc:hover .plp-toc-body::-webkit-scrollbar-thumb,
.plp-toc-body.is-scrolling::-webkit-scrollbar-thumb,
.plp-toc:hover .plp-toc-body::-webkit-scrollbar-thumb {
    background: rgba(0, 154, 177, 0.5) !important;
}
.plp-article .plp-toc .plp-toc-body.is-scrolling::-webkit-scrollbar-thumb:hover,
.plp-toc-body.is-scrolling::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 154, 177, 0.85) !important;
}
.plp-toc-list { list-style: none; margin: 0; padding: 0; }
.plp-toc-item {
    margin: 0; padding: 0;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}
.plp-toc-item a {
    display: block; padding: 11px 22px;
    font-family: "PLP Manrope", sans-serif;
    font-size: 13px; font-weight: 500;
    line-height: 1.4;
    color: var(--onyx-light);
    text-decoration: none;
    border-bottom: 1px solid var(--line-soft);
    transition: all 0.2s ease;
}
.plp-toc-item:last-child a { border-bottom: none; }
.plp-toc-item:hover { background: var(--munsell-tint); border-left-color: var(--munsell-light); }
.plp-toc-item:hover a { color: var(--munsell); }
.plp-toc-item.active { background: var(--munsell-tint); border-left-color: var(--munsell); }
.plp-toc-item.active a { color: var(--electric); font-weight: 700; }
.plp-toc-item.passed a { color: var(--onyx-fade); }
.plp-toc-item.toc-h3 a {
    padding-left: 38px;
    font-size: 12px; font-weight: 400;
    color: var(--onyx-fade);
}
.plp-toc-item.toc-h3.active a { color: var(--munsell); font-weight: 600; }

.plp-content {
    font-family: "PLP Manrope", sans-serif;
    font-size: 18px; line-height: 1.75;
    color: var(--onyx); min-width: 0;
}
@media (max-width: 720px) {
    .plp-content { font-size: 17px; line-height: 1.7; }
}
.plp-content > p:first-of-type {
    font-size: 20px; line-height: 1.55;
    color: var(--onyx); font-weight: 400;
    margin-bottom: 28px; padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) {
    .plp-content > p:first-of-type { font-size: 18px; }
}
.plp-content h2 {
    font-family: "PLP Manrope", sans-serif;
    font-size: clamp(26px, 3.4vw, 32px);
    font-weight: 700; line-height: 1.2;
    letter-spacing: -0.018em;
    color: var(--electric);
    margin: 56px 0 16px; padding-top: 32px;
    border-top: 1px solid var(--line);
    position: relative;
    scroll-margin-top: 24px;
}
.plp-content h2::before {
    content: ""; position: absolute;
    top: -1px; left: 0;
    width: 48px; height: 2px;
    background: var(--munsell);
}
.plp-content > h2:first-of-type,
.plp-content > p:first-of-type + h2 {
    border-top: none; padding-top: 0; margin-top: 24px;
}
.plp-content > h2:first-of-type::before,
.plp-content > p:first-of-type + h2::before { display: none; }
.plp-content h3 {
    font-family: "PLP Manrope", sans-serif;
    font-size: clamp(20px, 2.4vw, 23px);
    font-weight: 700; line-height: 1.3;
    letter-spacing: -0.012em;
    color: var(--electric);
    margin: 36px 0 12px;
    scroll-margin-top: 24px;
}
.plp-content h4 {
    font-family: "PLP Manrope", sans-serif;
    font-size: 18px; font-weight: 600;
    color: var(--onyx); margin: 24px 0 8px;
    line-height: 1.4;
}
.plp-content p {
    font-size: 18px; line-height: 1.75;
    color: var(--onyx);
    margin: 0 0 22px;
    margin-block-end: 22px; /* override site-wide `p { margin-block-end: 0 }` */
}
.plp-content strong, .plp-content b { font-weight: 600; color: var(--electric); }
.plp-content em, .plp-content i { font-style: italic; }
.plp-content a {
    color: var(--munsell);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(0, 154, 177, 0.4);
    font-weight: 500;
    transition: all 0.15s ease;
    word-break: break-word;
}
.plp-content a:hover { color: var(--electric); text-decoration-color: var(--electric); }

/* CITATION PILLS: <a class="plp-cite">[7]</a> — auto-applied by cleanup function */
.plp-content a.plp-cite {
    display: inline-block;
    font-size: 0.7em;
    vertical-align: super;
    line-height: 1;
    background: var(--munsell-tint);
    color: var(--munsell);
    padding: 1px 5px;
    border-radius: 3px;
    text-decoration: none !important;
    text-decoration-color: transparent !important;
    font-weight: 700;
    margin: 0 1px;
    border: none;
    word-break: keep-all;
    transition: all 0.15s ease;
}
.plp-content a.plp-cite:hover {
    background: var(--munsell);
    color: var(--white);
    text-decoration: none !important;
}

.plp-content ul:not(.plp-diagram-routes):not(.plp-diagram-bars) { list-style: none; padding: 0; margin: 0 0 24px; }
.plp-content ul:not(.plp-diagram-routes):not(.plp-diagram-bars) > li {
    position: relative; padding-left: 28px;
    margin-bottom: 10px; line-height: 1.7;
}
.plp-content ul:not(.plp-diagram-routes):not(.plp-diagram-bars) > li::before {
    content: ""; position: absolute;
    left: 0; top: 14px;
    width: 14px; height: 2px;
    background: var(--munsell);
}
.plp-content ol:not(.plp-diagram-flow) { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: blog-list; }
.plp-content ol:not(.plp-diagram-flow) > li {
    counter-increment: blog-list;
    position: relative; padding-left: 36px;
    margin-bottom: 14px; line-height: 1.7;
}
.plp-content ol:not(.plp-diagram-flow) > li::before {
    content: counter(blog-list) ".";
    position: absolute; left: 0; top: 0;
    font-weight: 700; color: var(--munsell);
    min-width: 28px;
}


.plp-content table {
    width: 100%; margin: 32px 0;
    border-collapse: separate; border-spacing: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px; overflow: hidden;
    font-size: 15px;
}

/* TABLE WRAPPER — wraps every <table> via PHP cleanup function.
   Prevents wide tables from expanding the article grid column and
   overlapping the related-articles sidebar. Provides horizontal scroll
   when the table is wider than the article column. */
.plp-content .plp-table-wrap {
    margin: 32px 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}
.plp-content .plp-table-wrap table {
    /* Container handles margin; table just fills the scrollable area */
    margin: 0 !important;
    /* Allow table to expand to its natural width inside the scrollable wrap */
    min-width: 100%;
    width: max-content;
    max-width: none;
    word-break: normal;
}
/* Prevent overly aggressive cell shrinking — give cells a sensible
   minimum so text wraps reasonably before triggering horizontal scroll. */
.plp-content .plp-table-wrap table th,
.plp-content .plp-table-wrap table td {
    min-width: 140px;
}

/* TABLE HEADER — high specificity + !important to defeat theme cell color rules.
   Themes commonly apply color: inherit or dark text colors to all td/th cells,
   which makes our white header text invisible against the Electric Blue bg. */
.plp-article .plp-content table thead,
.plp-content table thead {
    background: var(--electric) !important;
    background-color: var(--electric) !important;
}
.plp-article .plp-content table thead tr,
.plp-content table thead tr {
    background: var(--electric) !important;
    background-color: var(--electric) !important;
}
.plp-article .plp-content table thead th,
.plp-article .plp-content table thead td,
.plp-content table thead th,
.plp-content table thead td {
    padding: 14px 18px !important;
    text-align: left !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: var(--white) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    font-family: "PLP Manrope", sans-serif !important;
}
.plp-article .plp-content table thead th *,
.plp-article .plp-content table thead td *,
.plp-content table thead th *,
.plp-content table thead td * {
    color: var(--white) !important;
}

.plp-content table tbody td {
    padding: 16px 18px; vertical-align: top;
    color: var(--onyx);
    border-bottom: 1px solid var(--line-soft);
    line-height: 1.55;
}
.plp-content table tbody tr:nth-child(even) { background: var(--munsell-tint); }
.plp-content table tbody tr:last-child td { border-bottom: none; }
@media (max-width: 720px) {
    .plp-content table {
        display: block; overflow-x: auto;
        white-space: nowrap; font-size: 14px;
    }
    .plp-content table th, .plp-content table td {
        white-space: normal; min-width: 180px;
    }
}

.plp-content img {
    max-width: 100%; height: auto;
    border-radius: 8px;
    margin: 24px auto; display: block;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.plp-content img:hover { transform: scale(1.005); }
.plp-content blockquote {
    margin: 32px 0; padding: 20px 28px;
    border-left: 3px solid var(--munsell);
    background: var(--munsell-tint);
    border-radius: 0 6px 6px 0;
    font-size: 19px; line-height: 1.55;
    color: var(--onyx);
}
.plp-content code {
    background: var(--munsell-tint);
    color: var(--electric);
    padding: 2px 6px; border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Roboto Mono', monospace;
    font-size: 0.92em;
    border: 1px solid var(--line);
}
.plp-content hr { margin: 48px 0; border: none; border-top: 1px solid var(--line); }

/* CALLOUTS */
.plp-callout {
    background: var(--munsell-tint);
    border-left: 3px solid var(--munsell);
    padding: 20px 28px;
    margin: 16px 0 32px;
    border-radius: 0 8px 8px 0;
}
.plp-callout > *:first-child { margin-top: 0; }
.plp-callout > *:last-child { margin-bottom: 0; }
.plp-callout p {
    font-size: 17px; line-height: 1.65;
    margin-bottom: 12px;
}
.plp-callout p:last-child { margin-bottom: 0; }
.plp-callout-blue { background: var(--munsell-tint); border-left-color: var(--munsell); }
.plp-callout-warning {
    background: var(--warning-bg);
    border-left-color: var(--warning);
    font-style: italic;
}
.plp-callout-warning strong { color: var(--warning); }

/* Dependency-free research diagrams. */
.plp-article-diagram {
    margin: 34px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbfc;
    box-shadow: 0 14px 34px rgba(33, 77, 125, 0.07);
}
.plp-article-diagram figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}
.plp-article-diagram figcaption span,
.plp-article-diagram figcaption:not(:has(span)) {
    color: var(--electric);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.01em;
}
.plp-article-diagram figcaption small {
    color: var(--onyx-light);
    font-size: 13px;
    line-height: 1.5;
}
.plp-diagram-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 20px !important;
    list-style: none !important;
}
.plp-content .plp-diagram-flow > .plp-diagram-step {
    counter-increment: none;
}
.plp-content .plp-diagram-flow > .plp-diagram-step::before,
.plp-content .plp-diagram-routes > li::before,
.plp-content .plp-diagram-bars > li::before {
    display: none !important;
    content: none !important;
}
.plp-diagram-step {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--white);
}
.plp-diagram-step.is-decision {
    border-color: rgba(23, 142, 157, 0.42);
    background: var(--munsell-tint);
}
.plp-diagram-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--electric);
    color: var(--white);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.plp-diagram-step.is-decision .plp-diagram-step__number {
    background: var(--munsell);
}
.plp-diagram-step__body {
    min-width: 0;
}
.plp-diagram-step__body > strong {
    display: block;
    color: var(--electric);
    font-size: 14px;
    line-height: 1.4;
}
.plp-diagram-routes {
    display: grid;
    gap: 6px;
    margin-top: 10px !important;
    list-style: none !important;
}
.plp-diagram-routes li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
    color: var(--onyx-light);
    font-size: 11px;
    line-height: 1.4;
}
.plp-diagram-routes span {
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--munsell-light);
    color: var(--munsell);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.plp-diagram-routes b {
    color: var(--munsell);
}
.plp-diagram-routes em {
    min-width: 0;
    overflow-wrap: anywhere;
}
.plp-diagram-bars {
    display: grid;
    gap: 16px;
    padding: 22px 24px 26px !important;
    list-style: none !important;
}
.plp-diagram-bars li > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 7px;
    color: var(--onyx-light);
    font-size: 13px;
}
.plp-diagram-bars strong {
    color: var(--electric);
}
.plp-diagram-bar {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe9ee;
}
.plp-diagram-bar i {
    display: block;
    width: var(--plp-diagram-width);
    height: 100%;
    border-radius: inherit;
    background: var(--munsell);
}
.plp-article-diagram--source pre {
    margin: 0;
    padding: 22px 24px;
    overflow-x: auto;
    color: var(--onyx);
    font: 13px/1.6 "SFMono-Regular", Consolas, monospace;
    white-space: pre-wrap;
}
@media (max-width: 640px) {
    .plp-diagram-flow {
        grid-template-columns: 1fr;
        padding: 14px !important;
    }
    .plp-article-diagram figcaption {
        padding: 17px 18px;
    }
}

/* RUO DISCLAIMER */
.plp-disclaimer {
    background: var(--warning-bg);
    border-left: 3px solid var(--warning);
    padding: 24px 28px;
    margin: 48px 0 32px;
    border-radius: 0 8px 8px 0;
    display: flex; gap: 16px; align-items: flex-start;
}
.plp-disclaimer-icon {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    background: var(--warning); color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px;
    line-height: 1; font-style: italic;
}
.plp-disclaimer-text {
    font-size: 13px; line-height: 1.65;
    color: var(--onyx); font-weight: 500;
}
.plp-disclaimer-text strong { color: var(--warning); font-weight: 600; }

/* RELATED POSTS */
.plp-related { position: sticky; top: 24px; }
/* RELATED HEADING — high specificity + !important to defeat theme H2 defaults */
.plp-article .plp-related h2.plp-related-heading,
.plp-related .plp-related-heading {
    font-family: "PLP Manrope", sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--munsell) !important;
    margin: 0 0 16px !important;
    padding: 0 0 12px 0 !important;
    border: none !important;
    border-bottom: 2px solid var(--munsell-light) !important;
    line-height: 1 !important;
    background: transparent !important;
}
.plp-related-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.plp-related-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px; overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none; color: inherit;
    display: block;
}
.plp-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 81, 143, 0.08);
    border-color: var(--munsell);
}
.plp-related-thumb {
    width: 100%; aspect-ratio: 16 / 9;
    object-fit: cover; display: block;
}
.plp-related-text { padding: 14px 16px 16px; }

/* RELATED CARD TITLE — high specificity + !important to defeat theme H3 defaults
   (themes often apply serif fonts, larger sizes, capitalize, etc. to H3s) */
.plp-article .plp-related .plp-related-card h3.plp-related-title,
.plp-related .plp-related-card .plp-related-title,
.plp-related-card .plp-related-title {
    font-family: "PLP Manrope", -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.005em !important;
    color: var(--electric) !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
    text-transform: none !important;
    text-shadow: none !important;
    background: transparent !important;
}
.plp-article .plp-related .plp-related-card:hover h3.plp-related-title,
.plp-related-card:hover .plp-related-title {
    color: var(--munsell) !important;
}

/* RELATED CARD META (date) — high specificity + !important for consistent type */
.plp-article .plp-related .plp-related-card .plp-related-meta,
.plp-related .plp-related-card .plp-related-meta,
.plp-related-card .plp-related-meta {
    font-family: "PLP Manrope", -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: var(--onyx-fade) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.plp-lightbox {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center; justify-content: center;
    cursor: zoom-out;
}
.plp-lightbox.open { display: flex; }
.plp-lightbox img {
    max-width: 90vw; max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}
.plp-lightbox-close {
    position: absolute; top: 24px; right: 32px;
    color: var(--white); font-size: 36px;
    font-weight: 300; cursor: pointer; line-height: 1;
    background: none; border: none; padding: 0;
    transition: color 0.2s ease;
}
.plp-lightbox-close:hover { color: var(--munsell); }

.plp-article a:focus-visible, .plp-article button:focus-visible {
    outline: 2px solid var(--munsell);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Premium article refinements shared with the Site Shell archive. */
.plp-featured-image { margin-top: 34px; }
.plp-featured-image img {
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(33, 77, 125, 0.09);
}
.plp-category-tag--static { cursor: default; }
.plp-share-btn.is-copied {
    border-color: var(--forest) !important;
    background: var(--forest) !important;
    color: var(--white) !important;
}
.plp-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.plp-toc-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: -8px -10px -8px 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
}
.plp-toc-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.18s ease;
}
.plp-toc-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.plp-related-eyebrow {
    margin: 0 0 6px;
    color: var(--munsell);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.plp-article .plp-related h2.plp-related-heading,
.plp-related .plp-related-heading {
    margin-bottom: 18px !important;
    padding-bottom: 14px !important;
    color: var(--electric) !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
}
.plp-related-card { border-radius: 12px; }
.plp-related-library-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    color: var(--electric);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}
.plp-related-library-link:hover { color: var(--munsell); }
.plp-article-expandable-image { cursor: zoom-in; }
.plp-article-expandable-image:focus-visible {
    outline: 3px solid var(--munsell);
    outline-offset: 4px;
}
body.plp-article-lightbox-open { overflow: hidden; }
.plp-lightbox-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(12, 27, 42, 0.72);
    color: var(--white);
    font-family: inherit;
    font-size: 30px;
}
.plp-lightbox-close:hover,
.plp-lightbox-close:focus-visible {
    border-color: var(--munsell);
    background: var(--electric);
    color: var(--white);
}
@media (max-width: 768px) {
    .plp-toc-toggle { display: inline-flex; }
    .plp-toc-body[hidden] { display: none !important; }
    .plp-article-header .wrap,
    .plp-featured-image,
    .plp-main,
    .plp-breadcrumbs .wrap {
        padding-left: 20px;
        padding-right: 20px;
    }
    .plp-article-meta { gap: 12px 18px; }
    .plp-meta-divider { display: none; }
    .plp-share-buttons {
        width: 100%;
        padding-top: 4px;
    }
}
@media (max-width: 390px) {
    .plp-article-header .wrap,
    .plp-featured-image,
    .plp-main,
    .plp-breadcrumbs .wrap {
        padding-left: 16px;
        padding-right: 16px;
    }
    .plp-article .plp-article-header h1.plp-article-title,
    .plp-article-header .plp-article-title,
    .plp-article-title { font-size: 31px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .plp-article *, .plp-progress-bar { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
@media print {
    .plp-toc, .plp-related, .plp-share-buttons,
    .plp-progress-bar, .plp-lightbox, .plp-breadcrumbs { display: none !important; }
    .plp-main { display: block !important; }
    .plp-content { font-size: 11pt !important; color: #000 !important; }
    .plp-content h1, .plp-content h2, .plp-content h3 {
        color: #000 !important; page-break-after: avoid;
    }
    .plp-content a { color: #000 !important; }
    .plp-content a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt; color: #555;
    }
}
html { scroll-behavior: smooth; }
