:root {
    scroll-padding-top: 100px;
    --primary-color: #26a69a;
    --primary-dark: #00897b;
    --accent-color: #5c6bc0;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --border-color: #e0e0e0;
    --table-sub-bg: #f0f7f5;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* --- Full width implementation with proper spacing --- */
.abp-shortcode-wrapper { 
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important; 
    padding: 0 !important;
    position: relative;
    background: transparent;
    overflow: visible; /* Must NOT be hidden/auto — that breaks position:sticky on sidebar */
}

/* Main container - flex with sidebar and content */
.abp-main-container {
    display: flex; 
    flex-wrap: nowrap; 
    min-height: auto;
    width: 100% !important; 
    max-width: 100% !important;
    background-color: transparent; 
    overflow: visible; /* Must NOT be hidden/auto — that breaks position:sticky on sidebar */
    margin: 0 !important;
    padding: 0 !important;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

/* --- Sidebar styling - STICKY POSITION --- */
.abp-sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 20px 16px !important;
    position: sticky;
    top: 0;             /* JS adjusts this to sit below hero/adminbar */
    height: auto;       /* shrinks to its own content — never inflates the flex row */
    max-height: 100vh;  /* scrollable if nav links overflow viewport */
    overflow-y: auto;
    align-self: flex-start; /* flex-start = only as tall as its content */
    z-index: 100;
    box-shadow: 1px 0 5px rgba(0,0,0,0.03);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.abp-sidebar::-webkit-scrollbar {
    width: 4px;
}

.abp-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.abp-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Admin bar: CSS fallback only — JS overrides top/height on load */
body.admin-bar .abp-sidebar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .abp-sidebar {
        top: 46px;
    }
}

/* Hero sections always span full width above the sidebar/content flex row */
.abp-hero-section,
.abp-hero-section-bg {
    position: relative;
    z-index: 200;
    width: 100%;
}

/* Sidebar inner - smooth transitions */
.abp-sidebar-inner {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding-bottom: 20px;
}

.abp-sidebar h5 { 
    font-size: 1rem; 
    color: var(--accent-color); 
    font-weight: 700; 
    margin-bottom: 1.25rem; 
    padding: 0 0 0.75rem 0;
    line-height: 1.3;
    border-bottom: 2px solid var(--primary-color);
}

.abp-sidebar .abp-nav-section { 
    margin-bottom: 1.5rem;
}

.abp-sidebar .abp-nav-section:last-child {
    margin-bottom: 0;
}

.abp-sidebar .abp-nav-section h6 { 
    font-size: 0.7rem; 
    color: var(--text-light); 
    text-transform: uppercase; 
    margin-bottom: 0.75rem; 
    font-weight: 700; 
    letter-spacing: 0.5px;
}

.abp-sidebar ul { 
    list-style: none; 
    padding-left: 0; 
    margin: 0;
}

.abp-sidebar ul li { 
    margin-bottom: 0.25rem;
}

.abp-sidebar ul li:last-child {
    margin-bottom: 0;
}

.abp-sidebar ul li a { 
    text-decoration: none; 
    color: var(--text-dark); 
    font-size: 0.85rem; 
    display: block; 
    padding: 6px 10px;
    border-radius: 6px; 
    transition: all 0.2s ease; 
    line-height: 1.3;
    border-left: 3px solid transparent;
    position: relative;
}

.abp-sidebar ul li a:hover,
.abp-sidebar ul li a:focus { 
    background-color: #f0f7f5; 
    color: var(--primary-color); 
    border-left-color: var(--primary-color);
}

/* Active/highlight current section */
.abp-sidebar ul li a.active {
    background-color: #e8f5e9;
    color: var(--primary-dark);
    border-left-color: var(--primary-dark);
    font-weight: 600;
}

/* Scroll indicators */
.abp-sidebar.scrollable::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.abp-sidebar.at-bottom::after {
    opacity: 0;
}

.abp-sidebar.scrollable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.abp-sidebar.at-top::before {
    opacity: 0;
}

.abp-sidebar.scrollable:not(.at-top)::before {
    opacity: 1;
}

/* Auto-related page suggestions */
.abp-sidebar ul li.abp-related-divider {
    margin: 0.75rem 0 0.5rem;
    padding: 0;
    list-style: none;
}

.abp-sidebar ul li.abp-related-divider span {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    padding: 0 10px;
    position: relative;
}

.abp-sidebar ul li.abp-related-divider span::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: currentColor;
    opacity: 0.15;
    z-index: 0;
}

.abp-sidebar ul li.abp-related-divider span {
    position: relative;
    z-index: 1;
    background: transparent;
}

.abp-sidebar ul li.abp-auto-related a {
    color: var(--text-dark);
    font-style: italic;
    opacity: 0.85;
}

.abp-sidebar ul li.abp-auto-related a:hover,
.abp-sidebar ul li.abp-auto-related a:focus {
    opacity: 1;
    background-color: #f8f9fa;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-style: normal;
}

/* --- Content area --- */
.abp-content { 
    flex: 1; 
    padding: 0;
    min-width: 0; 
    margin: 0 !important;
    background: #ffffff; /* White — prevents grey gaps between white section boxes */
    overflow-x: visible;
    min-height: auto;
    align-self: flex-start;
}

.abp-content > :first-child {
    margin-top: 0;
}

/* --- Section Box - seamless, no dividers --- */
.abp-section-box {
    background: #ffffff;
    border: none;
    padding: 1.5rem 30px;
    margin: 0;
    width: 100%;
    /* No border-bottom — eliminates the lines between components */
    clear: both;
    overflow: hidden;
}

/* First section — flush to top */
.abp-section-box:first-of-type {
    padding-top: 1rem;
}

/* Last section — standard bottom padding */
.abp-section-box:last-of-type {
    padding-bottom: 2rem;
}

/* No alternating backgrounds — keeps the page one unified surface */

/* --- Section Title - ALIGNED WITH H2 HEADINGS --- */
.abp-section-title {
    font-weight: 700; 
    color: var(--text-dark); 
    font-size: 1.75rem;
    margin-top: 0;       /* Section box padding handles the top gap */
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    display: block;
    text-align: center;
    width: 100%;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
}

/* --- Hero Section WITH GRAPH --- */
.abp-hero-section {
    display: flex; 
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white; 
    padding: 2rem 2rem;
    border-radius: 0;
    margin: 0 !important;
    box-shadow: none;
    width: 100%;
    min-height: 220px;
    flex-wrap: wrap;
    align-items: center;
}

.abp-hero-left { 
    flex: 1; 
    min-width: 200px;
    padding-right: 1.5rem;
    padding-left: 30px;
}

.abp-hero-right { 
    flex: 2; 
    min-width: 280px;
    height: 200px;
    position: relative;
}

.abp-hero-graph-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.abp-hero-section .abp-hero-stat { 
    font-size: 3rem;
    font-weight: 700; 
    line-height: 1.1; 
    margin-bottom: 0.5rem; 
}

.abp-hero-section .abp-subtitle { 
    font-size: 1.1rem;
    opacity: 0.95; 
    font-weight: 400; 
    margin-bottom: 0.5rem; 
}

.abp-hero-section .abp-period { 
    font-size: 0.85rem;
    opacity: 0.9; 
    font-weight: 300; 
}

/* Hero Section WITH BACKGROUND IMAGE */
.abp-hero-section-bg {
    position: relative;
    width: 100%;
    min-height: 200px;
    height: 200px;
    border-radius: 0;
    margin: 0;
    overflow: hidden;
    box-shadow: none;
    background-color: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.abp-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(38, 166, 154, 0.75) 0%, rgba(0, 137, 123, 0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.abp-hero-title-centered {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff !important;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.2;
    max-width: 90%;
}

/* No-graph hero that still has stat text — centred layout */
.abp-hero-section-bg--stat {
    min-height: 220px;
    height: auto;
}

.abp-hero-overlay--centered {
    justify-content: center;
    align-items: center;
}

.abp-hero-stat-block {
    text-align: center;
    color: #ffffff;
    padding: 2rem;
    width: 100%;
}

.abp-hero-stat-block .abp-subtitle {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    opacity: 1;
    margin-bottom: 0.6rem;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.abp-hero-stat-block .abp-hero-stat {
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
    text-shadow: none;
    color: rgba(255,255,255,0.88);
    text-align: center;
}

.abp-hero-stat-block .abp-period {
    font-size: 0.8rem;
    opacity: 0.75;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: #ffffff;
}

/* --- Article Content Formatting - WITH PADDING & CENTRED HEADINGS --- */
.abp-article-content {
    line-height: 1.7;
    color: var(--text-dark);
    max-width: 100%;
    overflow-x: visible;
    word-wrap: break-word;
    padding: 0 30px; /* Horizontal only — section box handles vertical */
    font-size: 1rem;
    font-family: inherit;
}

.abp-article-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    /* Strip any inline font overrides pasted from Word/browser */
    font-family: inherit !important;
}

.abp-article-content p:last-child {
    margin-bottom: 0;
}

/* ---- All headings inside article content ---- */
.abp-article-content h1,
.abp-article-content h2,
.abp-article-content h3,
.abp-article-content h4,
.abp-article-content h5,
.abp-article-content h6 {
    margin-top: 1.2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--text-dark);
    font-weight: 700;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
    font-family: inherit !important;
}

/* ---- Bold-only paragraphs used as inline subheadings ---- */
/* Treat these as h3-level, NOT h2-level, to avoid giant bold text */
.abp-article-content p:has(> strong:only-child),
.abp-article-content p:has(> b:only-child) {
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
}

/* ---- Sizes for headings (h1‑h6) ---- */
.abp-article-content h1 { font-size: 2rem; }
.abp-article-content h2 { font-size: 1.5rem; }
.abp-article-content h3 { font-size: 1.25rem; }
.abp-article-content h4 { font-size: 1.1rem; }
.abp-article-content h5 { font-size: 1rem; }
.abp-article-content h6 { font-size: 0.95rem; }

/* ---- Strip inline font/size overrides brought in by paste ---- */
.abp-article-content * {
    font-family: inherit !important;
    /* font-size is NOT forced here — headings above set their own sizes;
       only paragraphs are locked to 1rem via the p rule above */
}
.abp-article-content span,
.abp-article-content strong,
.abp-article-content em,
.abp-article-content b,
.abp-article-content i {
    font-size: inherit !important;
}

/* --- Indicator Cards Styling --- */
.abp-indicator-cards-container { 
    margin: 0;
    width: 100%;
    padding: 0 30px;
}

.abp-indicator-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.abp-indicator-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.abp-indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.abp-indicator-title {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    font-weight: 600;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    word-break: break-word;
}

.abp-indicator-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: break-word;
}

.abp-indicator-description {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
    word-break: break-word;
}

/* --- Document Download Sections --- */
.abp-downloads-desc {
    margin: 0 0 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.abp-doc-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.abp-doc-section-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    padding-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.abp-doc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.abp-doc-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    gap: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.abp-doc-card:hover,
.abp-doc-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
    text-decoration: none;
    outline: none;
}

.abp-doc-card__icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.abp-doc-card__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.abp-doc-card--pdf   .abp-doc-card__icon { background: #fce8e8; color: #c0392b; }
.abp-doc-card--excel .abp-doc-card__icon { background: #e8f5e9; color: #27ae60; }
.abp-doc-card--ppt   .abp-doc-card__icon { background: #fff3e0; color: #e65100; }
.abp-doc-card--word  .abp-doc-card__icon { background: #e3f2fd; color: #1565c0; }
.abp-doc-card--other .abp-doc-card__icon { background: #f3e5f5; color: #6a1b9a; }

.abp-doc-card__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.abp-doc-card__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    word-break: break-word;
}

.abp-doc-card__type-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 10px;
}

.abp-doc-card--pdf   .abp-doc-card__type-label { background: #fce8e8; color: #c0392b; }
.abp-doc-card--excel .abp-doc-card__type-label { background: #e8f5e9; color: #27ae60; }
.abp-doc-card--ppt   .abp-doc-card__type-label { background: #fff3e0; color: #e65100; }
.abp-doc-card--word  .abp-doc-card__type-label { background: #e3f2fd; color: #1565c0; }
.abp-doc-card--other .abp-doc-card__type-label { background: #f3e5f5; color: #6a1b9a; }

/* --- YouTube Videos Section --- */
.abp-youtube-section {
    margin: 0;
    padding: 0 30px;
}

.abp-youtube-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.abp-youtube-grid-1 {
    grid-template-columns: minmax(0, 640px);
    justify-content: center;
}

.abp-youtube-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.abp-youtube-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.abp-youtube-item {
    display: flex;
    flex-direction: column;
}

.abp-youtube-embed-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.abp-youtube-embed-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.abp-youtube-facade {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s ease;
}

.abp-youtube-facade:hover {
    filter: brightness(1.08);
}

.abp-youtube-play-btn {
    width: 68px;
    height: 48px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.abp-youtube-facade:hover .abp-youtube-play-btn {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

.abp-youtube-title {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.35;
}

/* --- Table Chart Section --- */
.abp-ts-section {
    padding: 0 30px; /* Section box provides the vertical padding */
}

.abp-ts-controls {
    margin-bottom: 1rem;
}

.abp-ts-table-pane {
    margin-bottom: 0;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 992px) {
    .abp-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .abp-main-container { 
        flex-direction: column; 
        align-items: stretch;
    }
    
    .abp-sidebar { 
        display: none !important;
    }
    
    .abp-content { 
        padding: 0;
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .abp-hero-section { 
        flex-direction: column; 
        padding: 1.5rem;
        min-height: auto;
    }
    
    .abp-hero-left {
        padding-right: 0;
        padding-left: 16px;
        padding-bottom: 1rem;
        min-width: 0;
    }
    
    .abp-hero-right {
        width: 100%;
        min-width: 0;
        height: clamp(160px, 50vw, 200px);
    }
    
    .abp-hero-section .abp-hero-stat {
        font-size: 2rem;
    }
    
    .abp-hero-section .abp-subtitle {
        font-size: 1rem;
    }
    
    .abp-hero-section-bg {
        min-height: 160px;
        height: 160px;
    }
    
    .abp-hero-title-centered {
        font-size: 1.6rem;
    }
    
    .abp-hero-stat-block .abp-hero-stat {
        font-size: 1.1rem;
    }
    
    .abp-hero-stat-block .abp-subtitle {
        font-size: 1.5rem;
    }
    
    .abp-section-box {
        padding: 1.25rem 16px;
    }
    
    .abp-article-content {
        padding: 0 16px;
    }
    
    .abp-indicator-cards-container {
        padding: 0 16px;
    }
    
    .abp-ts-section {
        padding: 0 16px;
    }
    
    .abp-section-title {
        font-size: 1.4rem;
    }
    
    .abp-article-content h1 { font-size: 1.8rem; }
    .abp-article-content h2 { font-size: 1.4rem; }
    .abp-article-content h3 { font-size: 1.2rem; }
    .abp-article-content h4 { font-size: 1.1rem; }
    .abp-article-content h5 { font-size: 1rem; }
    .abp-article-content h6 { font-size: 0.95rem; }
    
    .abp-article-content p:has(> strong:only-child),
    .abp-article-content p:has(> b:only-child) {
        font-size: 1.4rem;
    }
    
    .abp-article-content p {
        text-align: left;
    }
    
    .abp-youtube-section {
        padding: 0 16px;
    }
    
    .abp-indicator-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .abp-indicator-card {
        padding: 0.85rem;
    }
    
    .abp-indicator-value {
        font-size: 1.4rem;
    }
    
    .abp-youtube-grid-2,
    .abp-youtube-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .abp-doc-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .abp-hero-section {
        padding: 1.25rem;
    }
    
    .abp-hero-section .abp-hero-stat {
        font-size: 1.6rem;
    }
    
    .abp-hero-section-bg {
        min-height: 140px;
        height: 140px;
    }
    
    .abp-hero-title-centered {
        font-size: 1.3rem;
    }
    
    .abp-hero-stat-block .abp-hero-stat {
        font-size: 1rem;
    }
    
    .abp-hero-stat-block .abp-subtitle {
        font-size: 1.3rem;
    }
    
    .abp-section-title {
        font-size: 1.2rem;
    }
    
    .abp-section-box {
        padding: 1rem 12px;
    }
    
    .abp-article-content {
        padding: 0 12px;
    }
    
    .abp-indicator-cards-container {
        padding: 0 12px;
    }
    
    .abp-ts-section {
        padding: 0 12px;
    }
    
    .abp-article-content h1 { font-size: 1.5rem; }
    .abp-article-content h2 { font-size: 1.2rem; }
    .abp-article-content h3 { font-size: 1.1rem; }
    .abp-article-content h4 { font-size: 1rem; }
    .abp-article-content h5 { font-size: 0.95rem; }
    .abp-article-content h6 { font-size: 0.9rem; }
    
    .abp-article-content p:has(> strong:only-child),
    .abp-article-content p:has(> b:only-child) {
        font-size: 1.2rem;
    }
    
    .abp-youtube-section {
        padding: 0 12px;
    }
    
    .abp-indicator-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    
    .abp-indicator-card {
        padding: 0.7rem;
    }
    
    .abp-indicator-title {
        font-size: 0.7rem;
    }
    
    .abp-indicator-value {
        font-size: 1.2rem;
    }
}

/* --- Admin bar adjustment for logged-in users --- */
body.admin-bar .abp-shortcode-wrapper {
    padding-top: 0 !important;
}

body.admin-bar .abp-content {
    padding-top: 0 !important;
}

/* --- Fix for any leftover spacing issues --- */
.abp-content .abp-section-box:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* --- Last section — no extra margin --- */
.abp-section-box:last-of-type {
    margin-bottom: 0;
}

/* --- Smooth scroll behavior --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

/* ── Article body tables — styled to match the admin section builder ── */

/* Outer wrapper */
.abp-article-table-scroll {
    position: relative;
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
        linear-gradient(to left,  #fff 30%, rgba(255,255,255,0)) 100% 0,
        radial-gradient(farthest-side at 0   50%, rgba(0,0,0,.10), transparent),
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.10), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

@media (max-width: 600px) {
    .abp-article-table-scroll::after {
        content: "← Scroll to see more →";
        display: block;
        text-align: center;
        font-size: 0.72rem;
        color: var(--text-light, #888);
        padding: 4px 0 2px;
        pointer-events: none;
    }
    .abp-article-table-scroll.abp-no-scroll::after {
        display: none;
    }
}

/* Table base */
.abp-article-content table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-family: inherit;
    background: #fff;
}

/* ── Every cell: full grid lines on all four sides ───────────────────
   Explicit top/right/bottom/left so nothing can be overridden
   partially by theme styles or border-color shorthand. */
.abp-article-content table th,
.abp-article-content table td {
    border-top:    1px solid var(--border-color, #e0e0e0);
    border-right:  1px solid var(--border-color, #e0e0e0);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    border-left:   1px solid var(--border-color, #e0e0e0);
    padding: 10px 14px;
    vertical-align: middle;
    line-height: 1.5;
}

/* Header cells (thead and any th inside tbody for multi-level headers) */
.abp-article-content table thead th,
.abp-article-content table tbody th {
    background: var(--primary-color, #26a69a);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    min-width: 80px;
    /* White grid lines between header cells */
    border-top:    1px solid rgba(255,255,255,0.3);
    border-right:  1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    border-left:   1px solid rgba(255,255,255,0.3);
}

/* Body cells */
.abp-article-content table tbody td {
    font-size: 0.88rem;
    color: var(--text-dark, #333);
    white-space: nowrap;
    min-width: 60px;
}

/* Zebra striping */
.abp-article-content table tbody tr:nth-child(even) td {
    background: var(--table-sub-bg, #f0f7f5);
}

/* Hover */
.abp-article-content table tbody tr:hover td {
    background: #e0f2f0;
}

/* First-column emphasis */
.abp-article-content table tbody td:first-child {
    font-weight: 600;
    color: var(--primary-dark, #00897b);
}

/* Footer row */
.abp-article-content table tfoot td,
.abp-article-content table tfoot th {
    font-weight: 700;
    font-size: 0.88rem;
    border-top: 2px solid var(--border-color, #e0e0e0);
}

/* Numeric right-aligned cells */
.abp-article-content table th.num,
.abp-article-content table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Caption */
.abp-article-content table caption {
    caption-side: bottom;
    font-size: 0.78rem;
    color: var(--text-light, #888);
    padding: 0.5rem 0.5rem 0;
    text-align: left;
    font-style: italic;
}

/* Mobile */
@media (max-width: 600px) {
    .abp-article-content table th,
    .abp-article-content table td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

/* --- Map Section - ensure no fading issues --- */
#abp-district-map {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    clear: both;
}

.abp-map-section-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
}

/* --- Fix for white space at bottom of content --- */
.abp-shortcode-wrapper .abp-main-container .abp-content {
    min-height: auto;
    align-self: flex-start;
}

/* Ensure content area wraps properly */
.abp-content .abp-section-box:last-child {
    margin-bottom: 0;
}

/* --- Fix for indicator cards container spacing --- */
.abp-indicator-cards-container {
    margin-bottom: 0;
}

/* --- Fix for downloads section spacing --- */
.abp-doc-sections:last-child {
    margin-bottom: 0;
}

/* --- YouTube section — no extra margin (section box handles it) --- */
.abp-youtube-section {
    margin: 0;
}

/* --- Ensure proper clearing --- */
.abp-section-box::after {
    content: '';
    display: table;
    clear: both;
}

/* =====================================================================
   INDICATOR CARDS - MULTI-TYPE SUPPORT
   ===================================================================== */

/* Container for all indicator cards — flush into its parent section box */
.abp-indicator-cards-container {
    margin: 0;
    width: 100%;
    padding: 0 30px;
    background: transparent; /* Inherits section box background */
    border-radius: 0;
    box-shadow: none;
}

.abp-indicator-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    width: 100%;
    padding: 1.5rem;
}

/* ── KPI Grid ────────────────────────────────────────────────────────── */
.abp-kpi-grid {
    padding: 1.5rem 1.5rem 1rem;
}

/* ── Progress Cards Grid ────────────────────────────────────────────── */
.abp-progress-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    width: 100%;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .abp-progress-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 0 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .abp-progress-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 0 0.75rem 0.75rem;
    }
}

/* ── Base Indicator Card ────────────────────────────────────────────── */
.abp-indicator-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.abp-indicator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: #26a69a;
}

/* ── KPI Card Styles ────────────────────────────────────────────────── */
.abp-card-kpi {
    padding: 1.25rem 1.25rem 1.25rem;
}

.abp-card-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.abp-card-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.abp-indicator-card:hover .abp-card-kpi-icon {
    transform: scale(1.05);
}

.abp-card-kpi-trend {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.abp-trend-emerald {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.abp-trend-red {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.abp-trend-blue {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
}

.abp-trend-gray {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.abp-trend-orange {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.abp-card-kpi-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.abp-card-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;        /* dark grey — clear and readable */
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.abp-card-kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0.1rem 0 0.1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.abp-card-kpi-unit {
    font-size: 0.8rem;
    font-weight: 600;
    color: #000000;        /* medium-dark, clearly legible */
    margin: 0.15rem 0 0;
    line-height: 1.4;
}

.abp-card-kpi-trend-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #4b5563;
    margin: 0.2rem 0 0;
    line-height: 1.45;
    font-style: italic;
}

/* ── Progress Card Styles ───────────────────────────────────────────── */
.abp-card-progress {
    padding: 1.25rem 1.25rem 1rem;
}

.abp-card-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.abp-card-progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.abp-indicator-card:hover .abp-card-progress-icon {
    transform: scale(1.05);
}

.abp-card-progress-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.abp-card-progress-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 0.55rem 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.abp-card-progress-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.abp-card-progress-bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Progress bar colors */
.abp-card-progress-bar.progress-blue {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.abp-card-progress-bar.progress-pink {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}
.abp-card-progress-bar.progress-emerald {
    background: linear-gradient(90deg, #10b981, #34d399);
}
.abp-card-progress-bar.progress-red {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.abp-card-progress-bar.progress-orange {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.abp-card-progress-bar.progress-purple {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}
.abp-card-progress-bar.progress-green {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.abp-card-progress-bar.progress-teal {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}
.abp-card-progress-bar.progress-indigo {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}
.abp-card-progress-bar.progress-gray {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.abp-card-progress-subtext {
    font-size: 0.78rem;
    font-weight: 500;
    color: #4b5563;
    margin: 0.3rem 0 0;
    line-height: 1.45;
    font-style: italic;
}

/* ── Simple Legacy Card Styles ──────────────────────────────────────── */
.abp-card-simple {
    padding: 1.25rem;
}

.abp-card-simple .abp-indicator-title {
    font-size: 0.82rem;
    color: #374151;
    margin-bottom: 0.4rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    word-break: break-word;
}

.abp-card-simple .abp-indicator-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #26a69a;
    margin-bottom: 0.25rem;
    line-height: 1.15;
    word-break: break-word;
    overflow-wrap: break-word;
}

.abp-card-simple .abp-indicator-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    word-break: break-word;
}

/* ── Section Title (optional, centred above cards) ──────────────────── */
.abp-indicator-section-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding: 1.25rem 1.5rem 0.25rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* ── Circular Progress Card ─────────────────────────────────────────── */
.abp-card-progress-circular {
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
}

.abp-card-progress-circ-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.abp-circ-svg {
    display: block;
    overflow: visible;
}

.abp-circ-fill {
    transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.abp-card-progress-circ-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.abp-card-progress-circular .abp-card-progress-label {
    margin: 0;
    text-align: center;
}

.abp-card-progress-circular .abp-card-progress-subtext {
    text-align: center;
}

/* ── Segmented Cards (2–3 data presentations in one card) ──────────── */

/* The shared title sits above the segments row */
.abp-card-kpi .abp-card-kpi-label,
.abp-card-progress .abp-card-progress-label {
    margin-bottom: 0.6rem;
}

/* Segments wrapper: lays out 1–3 segments side-by-side */
.abp-card-segs-wrap {
    display: flex;
    gap: 0;
    flex: 1;
    min-width: 0;
}

/* Individual segment */
.abp-card-seg {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0 0.6rem;
}
.abp-card-seg:first-child { padding-left: 0; }
.abp-card-seg:last-child  { padding-right: 0; }

/* Sub-label (e.g. "Male" / "Female") */
.abp-card-seg-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 0 0 0.25rem;
}

/* Thin vertical divider between segments */
.abp-card-seg-divider {
    width: 1px;
    background: #e5e7eb;
    align-self: stretch;
    flex-shrink: 0;
    margin: 0.1rem 0;
}

/* For 2-segment cards, shrink icon slightly */
.abp-card-segs-2 .abp-card-kpi-icon,
.abp-card-segs-2 .abp-card-progress-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 9px;
}
.abp-card-segs-2 .abp-card-kpi-value {
    font-size: 1.35rem;
}

/* For 3-segment cards, shrink further */
.abp-card-segs-3 .abp-card-kpi-icon,
.abp-card-segs-3 .abp-card-progress-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    border-radius: 7px;
}
.abp-card-segs-3 .abp-card-kpi-value {
    font-size: 1.1rem;
}
.abp-card-segs-3 .abp-card-kpi-header {
    margin-bottom: 0.4rem;
}

/* Circular segment within a multi-seg card */
.abp-card-seg-circular {
    align-items: center;
}
.abp-card-seg-circular .abp-card-progress-circ-wrap {
    margin: 0.2rem 0;
}

/* Admin — segment editor styles */
.abp-ic-segments-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px;
    background: #fafafa;
    margin-top: 6px;
}
.abp-ic-segment {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 8px 10px;
    margin-bottom: 6px;
}
.abp-ic-segment:last-of-type {
    margin-bottom: 0;
}
.abp-ic-seg-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.abp-ic-seg-pill {
    background: #26a69a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 20px;
}
.abp-ic-seg-remove {
    background: none;
    border: none;
    color: #cc1818;
    cursor: pointer;
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
}
.abp-ic-seg-remove:hover { color: #a00; }
.abp-ic-seg-fields { }
.abp-ic-seg-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.abp-ic-seg-field {
    flex: 1;
    min-width: 100px;
}
.abp-ic-seg-field label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #50575e;
    margin-bottom: 2px;
}
.abp-ic-seg-field input[type="text"],
.abp-ic-seg-field input[type="url"] {
    width: 100%;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
}
.abp-ic-add-seg-btn {
    width: 100%;
    margin-top: 6px;
    font-size: 11px !important;
    padding: 4px 8px !important;
    color: #26a69a !important;
    border-color: #26a69a !important;
}
.abp-ic-add-seg-btn:hover {
    background: #f0f9f8 !important;
}

/* ── Responsive Adjustments ──────────────────────────────────────────── */
@media (max-width: 992px) {
    .abp-indicator-cards-container {
        padding: 0 20px;
    }
    
    .abp-indicator-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .abp-indicator-cards-container {
        padding: 0 16px;
    }
    
    .abp-indicator-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .abp-kpi-grid {
        padding: 1rem 1rem 0.5rem;
    }
    
    .abp-card-kpi-value {
        font-size: 1.4rem;
    }
    
    .abp-card-kpi {
        padding: 1rem;
    }
    
    .abp-card-progress {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .abp-indicator-cards-container {
        padding: 0 12px;
    }
    
    .abp-indicator-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        padding: 0.75rem;
    }
    
    .abp-kpi-grid {
        padding: 0.75rem 0.75rem 0.25rem;
    }
    
    .abp-card-kpi-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .abp-card-kpi-value {
        font-size: 1.2rem;
    }
    
    .abp-card-kpi-label {
        font-size: 0.6rem;
    }
    
    .abp-card-progress-header {
        flex-direction: row;
        align-items: center;
    }
    
    .abp-card-progress-value {
        font-size: 1.1rem;
    }
    
    .abp-card-progress-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .abp-indicator-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .abp-card-kpi {
        padding: 0.75rem;
    }
    
    .abp-card-kpi-value {
        font-size: 1rem;
    }
    
    .abp-card-progress {
        padding: 0.75rem;
    }
}
/* --- Collapse any theme page-wrapper min-height that causes gap below content --- */
.entry-content:has(.abp-shortcode-wrapper),
.post-content:has(.abp-shortcode-wrapper),
.page-content:has(.abp-shortcode-wrapper),
.wp-block-post-content:has(.abp-shortcode-wrapper),
.site-content:has(.abp-shortcode-wrapper),
.main-content:has(.abp-shortcode-wrapper),
#primary:has(.abp-shortcode-wrapper),
#main:has(.abp-shortcode-wrapper),
#content:has(.abp-shortcode-wrapper),
article:has(.abp-shortcode-wrapper),
.hentry:has(.abp-shortcode-wrapper) {
    min-height: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* The shortcode wrapper and its children must shrink-wrap to content */
.abp-shortcode-wrapper,
.abp-main-container {
    height: auto !important;
    min-height: 0 !important;
    align-items: flex-start !important;
}

/* Content takes full width when sidebar is not rendered */
.abp-main-container:not(:has(.abp-sidebar)) .abp-content {
    width: 100%;
    margin-left: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════
   CALLOUT / NOTICE COMPONENT
   Variants: info (default), warning, tip, note
   ══════════════════════════════════════════════════════════════════ */

.abp-callout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    margin: 0 0 1.25rem; /* Reduced from 28px — matches paragraph rhythm */
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0c4a6e;
}

/* ── Icon column ── */
.abp-callout__icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.abp-callout__icon svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    stroke: currentColor;
}

/* ── Body column ── */
.abp-callout__body {
    flex: 1 1 auto;
    font-size: 0.97rem;
    line-height: 1.65;
}

.abp-callout__body p {
    margin: 0 0 0.6em;
}

.abp-callout__body p:last-child {
    margin-bottom: 0;
}

.abp-callout__body a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── INFO (default — blue) ── */
.abp-callout--info {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0c4a6e;
}

/* ── WARNING (amber) ── */
.abp-callout--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
}

/* ── TIP (teal / green) ── */
.abp-callout--tip {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}

/* ── NOTE (purple) ── */
.abp-callout--note {
    background: #faf5ff;
    border-color: #d8b4fe;
    color: #4c1d95;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .abp-callout {
        gap: 12px;
        padding: 14px 16px;
    }

    .abp-callout__icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
    }

    .abp-callout__icon svg {
        width: 20px;
        height: 20px;
    }

    .abp-callout__body {
        font-size: 0.92rem;
    }
}
/* ── Breadcrumb navigation ───────────────────────────────────────────────── */

.abp-breadcrumb {
    width: 100%;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 24px;
    box-sizing: border-box;
}

.abp-breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 0.8125rem;   /* 13px */
    line-height: 1.4;
}

.abp-breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 0;
}

.abp-breadcrumb__link {
    color: var(--primary-dark, #00897b);
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.abp-breadcrumb__link:hover,
.abp-breadcrumb__link:focus {
    color: var(--accent-color, #5c6bc0);
    text-decoration: underline;
}

.abp-breadcrumb__sep {
    margin: 0 6px;
    color: #aaa;
    font-size: 0.75rem;
    user-select: none;
}

.abp-breadcrumb__current {
    color: var(--text-light, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40ch;   /* prevent very long titles from overflowing */
    display: inline-block;
}

/* Last item has no trailing separator — hide it via CSS */
.abp-breadcrumb__item--current .abp-breadcrumb__sep {
    display: none;
}

@media (max-width: 768px) {
    .abp-breadcrumb {
        padding: 7px 14px;
    }

    .abp-breadcrumb__list {
        font-size: 0.75rem;  /* 12px on mobile */
    }

    .abp-breadcrumb__current {
        max-width: 28ch;
    }
}

/* Related content: show the content type / year under each auto-related title */
.abp-sidebar ul li.abp-auto-related a .abp-related-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-light);
    opacity: 0.9;
}


/* ---- Headings / figure captions / source lines: no broken or indented first lines ---- */
.abp-article-content p,
.abp-article-content h1, .abp-article-content h2, .abp-article-content h3,
.abp-article-content h4, .abp-article-content h5, .abp-article-content h6 {
    text-indent: 0 !important;
}
.abp-article-content p:has(> strong:only-child),
.abp-article-content p:has(> b:only-child),
.abp-article-content p:has(> em:only-child),
.abp-article-content p:has(> i:only-child),
.abp-article-content h1, .abp-article-content h2, .abp-article-content h3,
.abp-article-content h4, .abp-article-content h5, .abp-article-content h6 {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word;
    text-wrap: balance;
}
@media (max-width: 768px) {
    .abp-article-content p {
        text-align: left;
        hyphens: manual;
        -webkit-hyphens: manual;
    }
    .abp-article-content p:has(> strong:only-child),
    .abp-article-content p:has(> b:only-child) {
        text-align: center;
    }
}


/* ---- Pasted images must never float: stops following titles wrapping beside them ---- */
.abp-article-content img,
.abp-article-content figure,
.abp-article-content .alignleft,
.abp-article-content .alignright {
    float: none !important;
    max-width: 100%;
    height: auto;
}
.abp-article-content img { display: block; margin: 0.75rem auto; }
.abp-article-content p,
.abp-article-content h1, .abp-article-content h2, .abp-article-content h3,
.abp-article-content h4, .abp-article-content h5, .abp-article-content h6 {
    clear: both;
    margin-left: 0 !important;
    padding-left: 0 !important;
}


/* Caption-style lines (only a bold/italic run): flush left, no leftover indent or pre-wrapped spaces */
.abp-article-content p:has(> strong:only-child),
.abp-article-content p:has(> b:only-child),
.abp-article-content p:has(> em:only-child),
.abp-article-content p:has(> i:only-child) {
    text-indent: 0 !important;
    white-space: normal !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.abp-article-content p > strong:only-child,
.abp-article-content p > b:only-child,
.abp-article-content p > em:only-child,
.abp-article-content p > i:only-child {
    display: block;
    text-indent: 0 !important;
    white-space: normal !important;
}


/* Figure/table titles and source lines: centred on all screen sizes */
.abp-article-content p.abp-caption-line,
.abp-article-content p.abp-caption-line > strong,
.abp-article-content p.abp-caption-line > b,
.abp-article-content p.abp-caption-line > em,
.abp-article-content p.abp-caption-line > i {
    text-align: center !important;
}
@media (max-width: 768px) {
    .abp-article-content p.abp-caption-line { text-align: center !important; }
}

/* ── KPI indicator cards on phones ──────────────────────────────────────
   Multi-segment KPI cards (e.g. Headline / Food / Non-food) get a full row
   each, so their segments aren't squeezed into a half-screen column.
   Simple single-value cards keep their 2-up layout. */
@media (max-width: 600px) {
    .abp-indicator-cards-grid.abp-kpi-grid {
        grid-template-columns: 1fr;
    }
    /* Let the trend badge drop under the icon instead of overflowing */
    .abp-card-kpi-header {
        flex-wrap: wrap;
        gap: 0.25rem 0.4rem;
    }
    .abp-card-seg-label,
    .abp-card-kpi-unit,
    .abp-card-kpi-trend-label {
        word-break: normal;
        overflow-wrap: break-word;
        hyphens: none;
    }
    .abp-card-segs-3 .abp-card-kpi-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    .abp-card-segs-3 .abp-card-kpi-value {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   INDICATOR CARDS — sizing and layout
   • Cards keep a sensible width and are centred, instead of one card being
     stretched across the whole row (a single KPI looked empty and huge).
   • Single-value KPI cards: icon beside the number, compact.
   • The big number uses the site's text colour (as on the home page); the
     card's chosen accent colour stays on the icon.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 601px) {
    .abp-indicator-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
        justify-content: center;
    }
    /* Multi-value cards (Male/Female, Headline/Food/Non-food) need two columns. */
    .abp-indicator-cards-grid .abp-card-segs-2,
    .abp-indicator-cards-grid .abp-card-segs-3 {
        grid-column: span 2;
    }
}

.abp-card-kpi:not(.abp-card-segs-2):not(.abp-card-segs-3) .abp-card-seg {
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
}
.abp-card-kpi:not(.abp-card-segs-2):not(.abp-card-segs-3) .abp-card-kpi-header {
    margin-bottom: 0;
}

.abp-card-kpi-value {
    color: var(--nso-text, #1a1a1a) !important;   /* overrides the inline accent colour */
}
.abp-card-kpi-label {
    color: var(--nso-text, #1a1a1a);
    letter-spacing: 0.04em;
}
.abp-card-kpi-unit {
    color: var(--nso-text-muted, #4b5563);
    font-weight: 500;
}
