.mmec-shell {
    --mmec-ink: #111827;
    --mmec-paper: #f7f3e9;
    --mmec-card: #fffdf8;
    --mmec-navy: #102a43;
    --mmec-blue: #174a7e;
    --mmec-red: #9f1d2c;
    --mmec-gold: #b8892c;
    --mmec-rule: #d7cfbd;
    --mmec-muted: #687386;
    --mmec-green: #16794f;
    --mmec-orange: #a86114;
    box-sizing: border-box;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 0 24px;
    color: var(--mmec-ink);
    background: var(--mmec-paper);
    border: 1px solid #d8d2c4;
    font-family: Georgia, "Times New Roman", serif;
}

.mmec-shell *, .mmec-shell *::before, .mmec-shell *::after {
    box-sizing: inherit;
}

.mmec-hero {
    padding: clamp(24px, 4vw, 52px) clamp(18px, 4vw, 56px) 24px;
    color: #fff;
    background:
        linear-gradient(100deg, rgba(16,42,67,.98), rgba(23,74,126,.94)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px);
    border-bottom: 6px solid var(--mmec-red);
}

.mmec-kicker {
    margin-bottom: 8px;
    font: 700 12px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: .17em;
    color: #d9e6f2;
}

.mmec-hero h1 {
    margin: 0;
    max-width: 1100px;
    font-size: clamp(30px, 5vw, 64px);
    line-height: .98;
    letter-spacing: -.03em;
    color: #fff;
}

.mmec-subtitle {
    margin: 12px 0 18px;
    font-size: clamp(16px, 1.7vw, 23px);
    color: #eef4f8;
}

.mmec-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,.24);
    font: 600 11px/1.4 Arial, Helvetica, sans-serif;
    letter-spacing: .06em;
    color: #dfeaf2;
}

.mmec-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    border-radius: 50%;
    background: #5de49a;
    box-shadow: 0 0 0 4px rgba(93,228,154,.13);
}


.mmec-toolbar {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 8px clamp(14px, 3vw, 38px);
    border-bottom: 1px solid var(--mmec-rule);
    background: #fbf8f0;
    font: 700 9px/1.35 Arial, Helvetica, sans-serif;
    letter-spacing: .055em;
    color: #748091;
}

.mmec-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 10px clamp(18px, 3vw, 38px);
    background: #fff;
    border-bottom: 1px solid var(--mmec-rule);
    font: 600 11px/1.4 Arial, Helvetica, sans-serif;
    color: #525e6d;
}

.mmec-status {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-radius: 50%;
}
.mmec-status-live { background: var(--mmec-green); }
.mmec-status-estimate { background: var(--mmec-gold); }
.mmec-status-stale { background: var(--mmec-orange); }

.mmec-section {
    padding: 22px clamp(14px, 3vw, 38px) 10px;
}

.mmec-toolbar + [data-mmec-sections] .mmec-section:first-child {
    padding-top: 18px;
}

.mmec-section + .mmec-section {
    margin-top: 8px;
    border-top: 3px double #c5bda9;
}

.mmec-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 11px;
}

.mmec-section-eyebrow {
    font: 800 10px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: .2em;
    color: var(--mmec-red);
}

.mmec-section h2 {
    margin: 2px 0 0;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1;
    color: var(--mmec-navy);
}

.mmec-section-note {
    text-align: right;
    font: 600 11px/1.4 Arial, Helvetica, sans-serif;
    color: var(--mmec-muted);
}

.mmec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.mmec-card {
    position: relative;
    min-width: 0;
    min-height: 142px;
    padding: 13px 13px 10px;
    overflow: hidden;
    background: var(--mmec-card);
    border: 1px solid var(--mmec-rule);
    border-top: 3px solid var(--mmec-blue);
    box-shadow: 0 1px 0 rgba(16,42,67,.04);
}

.mmec-card-estimate { border-top-color: var(--mmec-gold); }
.mmec-card-stale { border-top-color: var(--mmec-orange); opacity: .83; }

.mmec-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.mmec-card-label {
    max-width: calc(100% - 58px);
    font: 800 12px/1.2 Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    letter-spacing: .025em;
    color: #243b53;
}

.mmec-pill {
    flex: 0 0 auto;
    padding: 3px 5px;
    border-radius: 2px;
    font: 800 8px/1 Arial, Helvetica, sans-serif;
    letter-spacing: .06em;
    color: #fff;
    background: var(--mmec-blue);
}
.mmec-pill-estimate { background: var(--mmec-gold); }
.mmec-pill-stale { background: var(--mmec-orange); }

.mmec-value {
    margin: 13px 0 2px;
    overflow-wrap: anywhere;
    font: 700 clamp(21px, 2.15vw, 33px)/1.02 "Arial Narrow", Arial, Helvetica, sans-serif;
    letter-spacing: -.035em;
    color: var(--mmec-navy);
    font-variant-numeric: tabular-nums lining-nums;
}

.mmec-delta {
    min-height: 18px;
    margin-top: 4px;
    font: 700 10px/1.3 Arial, Helvetica, sans-serif;
    color: #667383;
}
.mmec-up { color: var(--mmec-green); }
.mmec-down { color: var(--mmec-red); }

.mmec-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5ded0;
    font: 600 9px/1.3 Arial, Helvetica, sans-serif;
    color: #7b8490;
}

.mmec-date {
    flex: 0 0 auto;
    text-align: right;
}

.mmec-footer {
    margin: 28px clamp(18px, 3vw, 38px) 0;
    padding: 17px 0 0;
    border-top: 4px solid var(--mmec-navy);
    font-size: 13px;
    line-height: 1.5;
    color: #4d5765;
}
.mmec-footer p { margin: 0 0 8px; }
.mmec-credit {
    font: 500 10px/1.5 Arial, Helvetica, sans-serif;
    color: #77808b;
}

.mmec-compact .mmec-hero { padding-top: 25px; }
.mmec-compact .mmec-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mmec-compact .mmec-card { min-height: 126px; }
.mmec-compact .mmec-value { font-size: clamp(19px, 1.7vw, 27px); }

@media (max-width: 1180px) {
    .mmec-grid,
    .mmec-compact .mmec-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .mmec-grid,
    .mmec-compact .mmec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mmec-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .mmec-section-note { text-align: left; }
}

@media (max-width: 520px) {
    .mmec-shell { border-left: 0; border-right: 0; }
    .mmec-grid,
    .mmec-compact .mmec-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .mmec-card { min-height: 128px; }
    .mmec-value { font-size: 31px; }
}

.mmec-legend { display:none; }
