/* ============================================================
   MarineCraft Energy Dashboard
   Brand-matched to mcj-post house style.
   Georgia serif, navy #0b3d6e, red #b8290e.
   ============================================================ */

.mc-et-dashboard {
    font-family: Georgia, "Times New Roman", serif;
    color: #1a1a1a;
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 20px 50px;
    line-height: 1.65;
    font-size: 17px;
}

/* ---- Section header (uses mcj-post pattern) ---- */
.mc-et-dashboard .mcj-section-header {
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 3px solid #0b3d6e;
}
.mc-et-dashboard .mcj-section-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #b8290e;
    font-weight: 700;
    margin: 0 0 12px;
}
.mc-et-dashboard .mcj-h1 {
    font-family: Georgia, serif;
    font-size: 38px;
    line-height: 1.15;
    color: #0b3d6e;
    margin: 0 0 16px;
    font-weight: 700;
}
.mc-et-dashboard .mcj-standfirst {
    font-size: 18px;
    color: #555;
    border-left: 3px solid #b8290e;
    padding-left: 16px;
    margin: 0;
    font-style: italic;
}

/* ---- Drop cap on opening paragraph ---- */
.mc-et-dashboard .mcj-dropcap-para {
    margin: 30px 0 40px;
    font-size: 17px;
    line-height: 1.7;
}
.mc-et-dashboard .mcj-dropcap-para::first-letter {
    float: left;
    font-family: Georgia, serif;
    font-size: 56px;
    line-height: 0.85;
    font-weight: 700;
    color: #0b3d6e;
    padding: 6px 10px 0 0;
    margin: 0;
}

/* ---- Each data section ---- */
.mc-et-dash-section {
    margin: 50px 0 40px;
    padding-top: 30px;
    border-top: 1px solid #e6e6e6;
}
.mc-et-dashboard .mcj-h2 {
    font-family: Georgia, serif;
    font-size: 26px;
    color: #0b3d6e;
    margin: 0 0 22px;
    padding-bottom: 14px;
    font-weight: 700;
    position: relative;
}
.mc-et-dashboard .mcj-h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: #0b3d6e;
}
.mc-et-dashboard .mcj-body-note {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin: 18px 0 0;
}

/* ---- Stat strip (inline cards above each chart) ---- */
.mc-et-stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 24px;
}
.mc-et-stat-card {
    flex: 1 1 160px;
    background: #f7f9fc;
    border: 1px solid #e0e6ee;
    border-left: 4px solid #0b3d6e;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mc-et-stat-card--secondary {
    border-left-color: #b8290e;
}
.mc-et-stat-card--missing {
    opacity: 0.55;
    border-left-color: #999;
}
.mc-et-stat-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555;
    font-weight: 600;
}
.mc-et-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #0b3d6e;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.mc-et-stat-value--missing {
    font-size: 14px;
    font-weight: 600;
    color: #888;
    font-style: italic;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.4;
}
.mc-et-stat-value--up   { color: #1f7a3d; }
.mc-et-stat-value--down { color: #b8290e; }
.mc-et-stat-change {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}
.mc-et-stat-change--up   { color: #1f7a3d; }
.mc-et-stat-change--down { color: #b8290e; }
.mc-et-stat-change--flat { color: #888; }
.mc-et-stat-change small {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-left: 4px;
    opacity: 0.85;
}
.mc-et-stat-unit {
    font-size: 12px;
    color: #777;
    font-style: italic;
    margin-top: 4px;
}

/* ---- Chart container ---- */
.mc-et-chart {
    margin: 0 0 18px;
    background: #ffffff;
    border: 1px solid #e0e6ee;
    padding: 16px;
}
.mc-et-chart-canvas-wrap {
    position: relative;
    height: 320px;
    width: 100%;
}
.mc-et-chart canvas {
    max-width: 100%;
    max-height: 100%;
}
.mc-et-chart-caption {
    font-size: 13px;
    color: #777;
    font-style: italic;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.mc-et-chart-missing {
    background: #fafafa;
    border: 1px dashed #ccc;
    padding: 30px;
    text-align: center;
    color: #888;
}

/* ---- Callout boxes (used for fuel section caveat) ---- */
.mc-et-callout {
    background: #fff8f6;
    border-left: 4px solid #b8290e;
    padding: 18px 22px;
    margin: 24px 0 0;
}
.mc-et-callout p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.65;
}
.mc-et-callout p:last-child {
    margin-bottom: 0;
}
.mcj-callout-h {
    font-family: Georgia, serif;
    font-size: 17px;
    color: #0b3d6e;
    margin: 0 0 10px;
    font-weight: 700;
}

/* ---- Methodology footer ---- */
.mc-et-dash-footer {
    margin: 60px 0 0;
    padding-top: 30px;
    border-top: 3px solid #0b3d6e;
    background: #f7f9fc;
    padding: 30px;
}
.mc-et-dash-footer .mcj-h2 {
    margin-top: 0;
}
.mc-et-source-list {
    list-style: none;
    padding: 0;
    margin: 18px 0;
}
.mc-et-source-list li {
    padding: 8px 0;
    font-size: 15px;
    border-bottom: 1px dotted #d0d0d0;
}
.mc-et-source-list li:last-child {
    border-bottom: none;
}
.mc-et-dash-meta {
    font-size: 13px;
    color: #777;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #d0d0d0;
}

/* ---- Admin-only diagnostic block ---- */
.mc-et-admin-only {
    margin-top: 24px;
    padding: 18px;
    background: #fff3cd;
    border: 1px solid #ffe4a0;
    font-size: 14px;
}
.mc-et-admin-only ul {
    margin: 12px 0 0;
    padding-left: 24px;
}
.mc-et-admin-only code {
    background: #fdf3d2;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 13px;
}

/* Force left-alignment everywhere in the dashboard, overriding any
   theme-level text-align: justify that bleeds through .mcj-post.
   !important needed because Executive Pro's .mcj-post p selector matches
   our specificity and may load later in the cascade. */
.mc-et-dashboard,
.mc-et-dashboard *,
.mc-et-dashboard p,
.mc-et-dashboard h1,
.mc-et-dashboard h2,
.mc-et-dashboard h3,
.mc-et-dashboard h4,
.mc-et-dashboard h5,
.mc-et-dashboard h6,
.mc-et-dashboard li,
.mc-et-dashboard figcaption,
.mc-et-dashboard blockquote,
.mc-et-dashboard .mcj-h1,
.mc-et-dashboard .mcj-h2,
.mc-et-dashboard .mcj-section-label,
.mc-et-dashboard .mcj-standfirst,
.mc-et-dashboard .mcj-dropcap-para,
.mc-et-dashboard .mcj-body-note,
.mc-et-dashboard .mcj-callout-h {
    text-align: left !important;
}

/* ============================================================
   Sticky section nav
   Sits above the first chart section and sticks to viewport top.
   ============================================================ */
.mc-et-section-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 30px -20px 0;  /* extend full-bleed past article padding */
    background: #0b3d6e;
    box-shadow: 0 2px 8px rgba(11, 61, 110, 0.15);
}
.mc-et-section-nav-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
}
.mc-et-section-nav-inner::-webkit-scrollbar {
    height: 4px;
}
.mc-et-section-nav-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}
.mc-et-section-nav-label {
    font-family: Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}
/* Suppress any theme-supplied list bullets/markers — defensive. */
.mc-et-section-nav-list,
.mc-et-section-nav-list li {
    list-style: none !important;
    list-style-type: none !important;
}
.mc-et-section-nav-list li::before,
.mc-et-section-nav-list li::marker {
    content: none !important;
    display: none !important;
}
.mc-et-section-nav-list {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    /* No flex: 1 — let the list size to content so pills cluster on the left */
}
.mc-et-section-nav-list li {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}
.mc-et-section-nav-list a {
    display: inline-block;
    padding: 6px 14px;
    font-family: Georgia, serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.mc-et-section-nav-list a:hover,
.mc-et-section-nav-list a:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}
.mc-et-section-nav-list a.is-active {
    color: #ffffff;
    border-bottom-color: #b8290e;
    font-weight: 700;
}

/* Anchor scroll offset — when jumping to a section, account for sticky nav height
   so the section heading isn't hidden behind the bar. ~52px = nav height. */
.mc-et-dash-section {
    scroll-margin-top: 60px;
}

/* Smooth-scroll respecting user motion preferences */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================================
   Floating "back to top" button
   Bottom-LEFT placement (chat widget occupies bottom-right corner).
   ============================================================ */
.mc-et-back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 60;
    background: #0b3d6e;
    color: #ffffff;
    border: 0;
    border-radius: 28px;
    padding: 10px 18px 10px 14px;
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(11, 61, 110, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}
.mc-et-back-to-top[hidden] {
    display: none !important;
}
.mc-et-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.mc-et-back-to-top:hover,
.mc-et-back-to-top:focus {
    background: #b8290e;
    outline: none;
}
.mc-et-back-to-top span[aria-hidden="true"] {
    font-size: 18px;
    line-height: 1;
}
.mc-et-back-to-top-label {
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
    .mc-et-dashboard {
        padding: 20px 14px 40px;
        font-size: 16px;
    }
    .mc-et-dashboard .mcj-h1 { font-size: 30px; }
    .mc-et-dashboard .mcj-h2 { font-size: 22px; }
    .mc-et-dashboard .mcj-dropcap-para::first-letter {
        font-size: 46px;
    }
    .mc-et-stat-strip {
        gap: 10px;
    }
    .mc-et-stat-card {
        flex: 1 1 calc(50% - 5px);
        padding: 12px 14px;
    }
    .mc-et-stat-value { font-size: 22px; }
    .mc-et-chart-canvas-wrap { height: 260px; }
    .mc-et-dash-footer { padding: 20px; }

    /* Sticky nav: extend to true full-bleed on mobile, keep horizontal scroll */
    .mc-et-section-nav {
        margin: 24px -14px 0;
    }
    .mc-et-section-nav-inner {
        padding: 8px 14px;
        gap: 10px;
    }
    .mc-et-section-nav-label {
        font-size: 11px;
    }
    .mc-et-section-nav-list a {
        font-size: 13px;
        padding: 5px 10px;
    }
    .mc-et-dash-section {
        scroll-margin-top: 56px;
    }

    /* Back-to-top: smaller, closer to corner on mobile (bottom-LEFT) */
    .mc-et-back-to-top {
        bottom: 16px;
        left: 16px;
        padding: 8px 14px 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .mc-et-stat-card {
        flex: 1 1 100%;
    }
}
