/*!
 * MacPlanet theme for Varient 3.1.x
 * Design layer loaded after assets/themes/magazine/css/style-3.1.min.css
 * Focus: fast news scanning + comfortable long-form reading + native ad slots.
 */

/* ---------- 1. Tokens ---------- */
:root {
    /* Fonts follow Admin > Font Settings (primary / secondary); system font as fallback */
    --mp-font: var(--vr-font-primary, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    --mp-font-display: var(--vr-font-secondary, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    
    --mp-accent: var(--vr-theme-color, #0071e3);
    --mp-bg: #ffffff;
    --mp-surface: #f5f5f7;
    --mp-surface-2: #fbfbfd;
    --mp-text: #1d1d1f;
    --mp-text-2: #424245;
    --mp-muted: #6e6e73;
    --mp-line: rgba(0, 0, 0, .1);
    --mp-line-strong: rgba(0, 0, 0, .18);
    --mp-header-bg: rgba(255, 255, 255, .78);
    --mp-live: #ff3b30;
    --mp-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);

    --mp-radius-sm: 8px;
    --mp-radius: 14px;
    --mp-radius-lg: 20px;
    --mp-gap: 24px;
    --mp-header-h: 64px;

    --mp-prose-size: 21px;
    --mp-prose-lh: 1.75;
    --mp-prose-width: 780px;
    --mp-read-font: var(--mp-font);
}

[data-bs-theme="dark"] {
    --mp-bg: #000000;
    --mp-surface: #161617;
    --mp-surface-2: #1d1d1f;
    --mp-text: #f5f5f7;
    --mp-text-2: #d2d2d7;
    --mp-muted: #a1a1a6;
    --mp-line: rgba(255, 255, 255, .12);
    --mp-line-strong: rgba(255, 255, 255, .22);
    --mp-header-bg: rgba(22, 22, 23, .78);
    --mp-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

/* ---------- 2. Base ---------- */
body.mp {
    background: var(--mp-bg);
    color: var(--mp-text);
    font-family: var(--mp-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.mp h1, .mp h2, .mp h3, .mp h4 {
    font-family: var(--mp-font-display);
    color: var(--mp-text);
    letter-spacing: -.015em;
}

.mp a { color: inherit; }
.mp a:hover { color: var(--mp-accent); }
.mp img { max-width: 100%; }

.mp-skip {
    position: absolute; left: -9999px; top: 8px; z-index: 2000;
    background: var(--mp-text); color: var(--mp-bg) !important; padding: 8px 14px; border-radius: 8px;
}
.mp-skip:focus { left: 8px; }

.mp :focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 2px; border-radius: 4px; }

.mp .container-xl { max-width: 1240px; }

/* Reading progress */
.mp-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1100; pointer-events: none; }
.mp-progress span { display: block; height: 100%; width: 0; background: var(--mp-accent); transition: width .08s linear; }

/* ---------- 3. Header & navigation (restyles common nav partials) ---------- */
.mp .topbar {
    background: var(--mp-surface) !important;
    border-bottom: 1px solid var(--mp-line);
    font-size: 12.5px;
    min-height: 34px;
}
.mp .topbar a, .mp .topbar .nav-link, .mp .topbar span { color: var(--mp-muted) !important; }
.mp .topbar a:hover { color: var(--mp-text) !important; }

.mp-header { z-index: 1020; }
.mp .mega-menu-wrapper {
    background: var(--mp-header-bg) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--mp-line);
    box-shadow: none !important;
}
.mp .mega-menu-wrapper .navbar { min-height: var(--mp-header-h); padding: 0; }
.mp .mega-menu-wrapper .navbar-brand img { max-height: 34px; width: auto; }
.mp .mega-menu-wrapper .navbar-nav .nav-link {
    color: var(--mp-text) !important;
    font-size: 14.5px;
    font-weight: 500;
    padding: 0 12px !important;
    height: var(--mp-header-h);
    display: flex; align-items: center;
    opacity: .82;
}
.mp .mega-menu-wrapper .navbar-nav .nav-item.active > .nav-link,
.mp .mega-menu-wrapper .navbar-nav .nav-link:hover { opacity: 1; color: var(--mp-accent) !important; background: transparent !important; }
.mp .mega-menu-wrapper .navbar-nav .nav-item.active > .nav-link { box-shadow: inset 0 -2px 0 var(--mp-accent); }
.mp .search-icon-btn { color: var(--mp-text); background: transparent; border-radius: 999px; width: 38px; height: 38px; }
.mp .search-icon-btn:hover { background: var(--mp-surface); }
.mp .header-search-dropdown { border-radius: var(--mp-radius); box-shadow: var(--mp-shadow); border: 1px solid var(--mp-line); }
.mp .dropdown-menu, .mp .mega-menu {
    border: 1px solid var(--mp-line) !important;
    border-radius: var(--mp-radius) !important;
    box-shadow: var(--mp-shadow) !important;
}
.mp .mobile-nav-wrapper {
    background: var(--mp-header-bg) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--mp-line);
}

/* ---------- 4. Shared atoms ---------- */
.mp-kicker {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--mp-cat, var(--mp-accent)) !important;
    line-height: 1.2;
}
.mp-kicker:hover { opacity: .8; }

.mp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--mp-muted); margin-top: 6px; }
.mp-meta a { color: var(--mp-text-2); font-weight: 500; }
.mp-meta > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; margin-right: 12px; vertical-align: middle; }
.mp-meta__comments { display: inline-flex; align-items: center; gap: 4px; }

.mp-section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.mp-section-title { font-size: 22px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.mp-section-title--cat a { color: var(--mp-text); }
.mp-section-title--cat::before { content: ""; width: 4px; height: 22px; border-radius: 4px; background: var(--mp-cat, var(--mp-accent)); }
.mp-link-more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--mp-accent) !important; white-space: nowrap; }

.mp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mp-chip {
    display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
    background: var(--mp-surface); color: var(--mp-text-2) !important; font-size: 13px; font-weight: 500;
}
.mp-chip:hover { background: var(--mp-accent); color: #fff !important; }

.mp-btn, .mp .btn-custom.mp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--mp-accent); color: #fff !important; border: 0; border-radius: 999px;
    padding: 11px 22px; font-weight: 600; font-size: 15px; line-height: 1;
    transition: transform .15s ease, filter .15s ease;
}
.mp-btn:hover { filter: brightness(1.08); }
.mp-btn:active { transform: scale(.98); }
.mp-btn.is-loading .btn-icon-svg { animation: mp-spin 1s linear infinite; }

.mp-badge { display: inline-flex; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.mp-badge--warn { background: #ff9f0a; color: #000 !important; }
.mp-badge--edit { background: var(--mp-surface); color: var(--mp-text) !important; }

.mp-pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--mp-live); flex: 0 0 9px; }
.mp-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--mp-live); animation: mp-pulse 1.8s ease-out infinite; }
.mp-live-dot { font-size: 11px; font-weight: 700; color: var(--mp-live); text-transform: uppercase; letter-spacing: .05em; }

@keyframes mp-pulse { 0% { transform: scale(1); opacity: .6 } 100% { transform: scale(2.6); opacity: 0 } }
@keyframes mp-spin { to { transform: rotate(360deg) } }
@keyframes mp-flash { from { background: color-mix(in srgb, var(--mp-accent) 12%, transparent) } to { background: transparent } }

/* ---------- 5. Ticker ---------- */
.mp-ticker { padding: 12px 0 0; }
.mp-ticker .newsticker-wrapper { background: var(--mp-surface); border-radius: 999px; height: 40px; border: 0; }
.mp-ticker .ticker-label { background: var(--mp-live) !important; border-radius: 999px; height: 30px; margin-left: 5px; padding: 0 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.mp-ticker .news-item a { color: var(--mp-text) !important; font-weight: 500; font-size: 14px; }
.mp-ticker .nav-sm-buttons button { background: transparent; color: var(--mp-muted); border: 0; }

/* ---------- 6. Hero ---------- */
.mp-hero { padding: 20px 0 8px; }
.mp-hero__grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--mp-gap); }
.mp-lead { display: flex; flex-direction: column; }
.mp-lead__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--mp-radius-lg); overflow: hidden; background: var(--mp-surface); }
.mp-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.mp-lead:hover .mp-lead__media img { transform: scale(1.025); }
.mp-lead__body { padding: 16px 4px 0; }
.mp-lead__title { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; font-weight: 800; margin: 8px 0 10px; letter-spacing: -.025em; }
.mp-lead__dek { font-size: 17px; line-height: 1.55; color: var(--mp-text-2); margin: 0; }

.mp-hero__side { display: flex; flex-direction: column; gap: 0; }
.mp-side { display: grid; grid-template-columns: 1fr 112px; gap: 14px; padding: 14px 0; border-top: 1px solid var(--mp-line); align-items: start; }
.mp-side:first-child { border-top: 0; padding-top: 0; }
.mp-side__media { order: 2; aspect-ratio: 4 / 3; border-radius: var(--mp-radius-sm); overflow: hidden; background: var(--mp-surface); }
.mp-side__media img { width: 100%; height: 100%; object-fit: cover; }
.mp-side__title { font-size: 16.5px; line-height: 1.32; font-weight: 700; margin: 6px 0 6px; }
.mp-side:not(:has(.mp-side__media)) { grid-template-columns: 1fr; }

/* ---------- 7. Two-column layout ---------- */
.mp-home, .mp-listing { padding: 28px 0 8px; }
.mp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.mp-layout__side { min-width: 0; }
.mp-sticky { position: sticky; top: calc(var(--mp-header-h) + 20px); display: flex; flex-direction: column; gap: 28px; }
.mp .col-sidebar.mp-sticky { position: sticky; }

/* ---------- 8. Live stream ---------- */
.mp-stream { position: relative; }
.mp-stream__list { display: block; }
.mp-day {
    position: sticky; top: var(--mp-header-h); z-index: 5;
    margin: 6px 0 0; padding: 10px 0 8px;
    background: linear-gradient(var(--mp-bg) 70%, transparent);
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted);
}
.mp-day span { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--mp-surface); }

.mp-row {
    display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 22px;
    padding: 20px 0; border-bottom: 1px solid var(--mp-line); position: relative;
}
.mp-row:not(:has(.mp-row__media)) { grid-template-columns: minmax(0, 1fr); }
.mp-row.is-fresh::before { content: ""; position: absolute; left: -14px; top: 26px; width: 6px; height: 6px; border-radius: 50%; background: var(--mp-live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mp-live) 18%, transparent); }
.mp-row.is-new { animation: mp-flash 2.4s ease-out; }
.mp-row__top { display: flex; align-items: center; gap: 10px; }
.mp-row__title { font-size: 20px; line-height: 1.3; font-weight: 700; margin: 6px 0 6px; letter-spacing: -.012em; }
.mp-row__title a { color: var(--mp-text); }
.mp-row__title a:hover { color: var(--mp-accent); }
.mp-row__title a:visited { color: var(--mp-text-2); }
.mp-row__summary { font-size: 15px; line-height: 1.55; color: var(--mp-text-2); margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-row__media { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: var(--mp-radius); overflow: hidden; background: var(--mp-surface); align-self: start; }
.mp-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mp-row:hover .mp-row__media img { transform: scale(1.04); }

.mp-new-pill {
    position: sticky; top: calc(var(--mp-header-h) + 12px); z-index: 8;
    display: flex; align-items: center; gap: 8px; margin: 0 auto 8px;
    background: var(--mp-accent); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px;
    font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px color-mix(in srgb, var(--mp-accent) 40%, transparent);
    animation: mp-drop .35s cubic-bezier(.2, .9, .3, 1.2);
}
.mp-new-pill[hidden] { display: none; }
@keyframes mp-drop { from { transform: translateY(-12px); opacity: 0 } to { transform: none; opacity: 1 } }

.mp-loadmore { display: flex; justify-content: center; padding: 28px 0 8px; }
.mp-empty { padding: 48px 0; text-align: center; color: var(--mp-muted); }
.mp-pager { margin-top: 32px; }
.mp-pager .pagination .page-link { border-radius: 10px !important; margin: 0 3px; border: 0; background: var(--mp-surface); color: var(--mp-text); }
.mp-pager .pagination .active .page-link { background: var(--mp-accent); color: #fff; }

/* ---------- 9. Cards, minis, grids ---------- */
.mp-card { display: flex; flex-direction: column; gap: 10px; }
.mp-card__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--mp-radius); overflow: hidden; background: var(--mp-surface); }
.mp-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mp-card:hover .mp-card__media img { transform: scale(1.04); }
.mp-card__title { font-size: 18px; line-height: 1.32; font-weight: 700; margin: 4px 0 0; }
.mp-card__title a { color: var(--mp-text); }

.mp-mini { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--mp-line); }
.mp-mini:first-child { border-top: 0; padding-top: 0; }
.mp-mini:not(:has(.mp-mini__media)) { grid-template-columns: 1fr; }
.mp-mini__media { order: 2; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--mp-surface); }
.mp-mini__media img { width: 100%; height: 100%; object-fit: cover; }
.mp-mini__title { font-size: 15px; line-height: 1.38; font-weight: 600; margin: 0 0 4px; }
.mp-mini__title a { color: var(--mp-text); }
.mp-mini__time { font-size: 12.5px; color: var(--mp-muted); }

.mp-grid { display: grid; gap: 28px var(--mp-gap); }
.mp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Rank (most popular) */
.mp-rank { counter-reset: mp-rank; }
.mp-rank .mp-mini { grid-template-columns: 30px minmax(0, 1fr); counter-increment: mp-rank; }
.mp-rank .mp-mini::before { content: counter(mp-rank); font-family: var(--mp-font-display); font-size: 26px; font-weight: 800; line-height: 1; color: var(--mp-accent); opacity: .9; }
.mp-rank .mp-mini__media { display: none; }

/* Widgets */
.mp-widget, .mp .sidebar-widget.mp-widget { background: var(--mp-surface-2); border: 1px solid var(--mp-line); border-radius: var(--mp-radius-lg); padding: 20px; margin: 0; }
[data-bs-theme="dark"] .mp-widget { background: var(--mp-surface); }
.mp-widget .widget-head { border: 0 !important; margin: 0 0 12px !important; padding: 0 !important; }
.mp-widget .widget-head::after, .mp-widget .widget-head::before { display: none !important; }
.mp-widget__title { font-size: 17px !important; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.mp-widget .widget-head .mp-widget__title { margin: 0; }
.mp-widget .mp-link-more { display: inline-block; margin-top: 12px; }

.mp-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--mp-line); }
.mp-timeline li { position: relative; padding: 0 0 14px 14px; }
.mp-timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--mp-bg); border: 2px solid var(--mp-accent); }
.mp-timeline time { display: block; font-size: 12px; font-weight: 700; color: var(--mp-accent); font-variant-numeric: tabular-nums; }
.mp-timeline a { font-size: 14.5px; line-height: 1.4; font-weight: 600; color: var(--mp-text); }

/* ---------- 10. Category blocks ---------- */
.mp-catblock { padding: 36px 0 8px; border-top: 1px solid var(--mp-line); margin-top: 28px; }
.mp-catblock__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
.mp-catblock__lead .mp-card__title { font-size: 24px; line-height: 1.22; }

/* ---------- 11. Listing pages ---------- */
.mp-listing__head { margin-bottom: 8px; }
.mp-listing__head .breadcrumb { font-size: 13px; margin-bottom: 8px; }
.mp-listing__title { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 6px; }
.mp-listing__desc { color: var(--mp-muted); font-size: 17px; max-width: 720px; }
.mp-listing__subs:empty { display: none; }

/* ---------- 12. Article ---------- */
.mp-article-wrap { padding: 20px 0 40px; }
.mp-article-grid { display: grid; grid-template-columns: minmax(0, var(--mp-prose-width)) 300px; gap: 56px; justify-content: center; align-items: start; }
.mp-article-wrap.is-full .mp-article-grid { grid-template-columns: minmax(0, 860px); }


.mp-article__crumbs .breadcrumb { font-size: 13px; margin: 0 0 14px; flex-wrap: nowrap; overflow: hidden; }
.mp-article__crumbs .breadcrumb-item.active { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mp-article__crumbs .breadcrumb a { color: var(--mp-muted); }
.mp-article__kickers { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-article__title { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 14px; }
.mp-article__dek { font-size: 20px; line-height: 1.5; color: var(--mp-text-2); margin: 0 0 20px; font-weight: 400; }

.mp-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--mp-line); border-bottom: 1px solid var(--mp-line); }
.mp-byline__author { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--mp-text) !important; }
.mp-byline__author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mp-byline__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13.5px; color: var(--mp-muted); }
.mp-byline__meta > * { display: inline-flex; align-items: center; gap: 5px; }
.mp-byline__comments { color: var(--mp-accent) !important; font-weight: 600; }

.mp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 18px; flex-wrap: wrap; }
.mp-toolbar__share .share-flex-wrapper { padding: 0 !important; }
.mp-toolbar__share .btn-social-share { width: 34px; height: 34px; border-radius: 50% !important; }
.mp-toolbar__share .right { display: none !important; } /* hide duplicated counters */
.mp-reader { display: inline-flex; background: var(--mp-surface); border-radius: 999px; padding: 3px; }
.mp-reader__btn { border: 0; background: transparent; color: var(--mp-text); min-width: 38px; height: 32px; border-radius: 999px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.mp-reader__btn:hover, .mp-reader__btn[aria-pressed="true"] { background: var(--mp-bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.mp-article__media { margin: 0 0 8px; }
.mp-article__media .post-image, .mp-article__media img { border-radius: var(--mp-radius-lg); }
.mp-article__media figcaption, .mp-article__media .img-description { font-size: 13px; color: var(--mp-muted); padding-top: 8px; }

/* Prose */
.mp-prose {
    font-size: var(--mp-prose-size);
    line-height: var(--mp-prose-lh);
    color: var(--mp-text);
    margin-top: 24px !important;
    word-break: normal; overflow-wrap: anywhere;
}
.mp .entry-content
.mp-prose p { margin: 0 0 1.15em; }
.mp-prose h2, .mp-prose h3, .mp-prose h4 { font-family: var(--mp-font-display); font-weight: 700; line-height: 1.25; margin: 1.8em 0 .6em; scroll-margin-top: calc(var(--mp-header-h) + 24px); }
.mp-prose h2 { font-size: 1.45em; }
.mp-prose h3 { font-size: 1.22em; }
.mp-prose a { color: var(--mp-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.mp-prose img, .mp-prose video, .mp-prose iframe { max-width: 100%; height: auto; border-radius: var(--mp-radius); margin: .4em 0; }
.mp-prose iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; }
.mp-prose figure { margin: 1.6em 0; }
.mp-prose figcaption { font-size: 14px; color: var(--mp-muted); text-align: center; margin-top: 6px; font-family: var(--mp-font); }
.mp-prose ul, .mp-prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.mp-prose li { margin: .35em 0; }
.mp-prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--mp-accent); color: var(--mp-text-2); font-size: 1.05em; }
.mp-prose pre, .mp-prose code { background: var(--mp-surface); border-radius: 8px; font-size: .85em; }
.mp-prose pre { padding: 14px 16px; overflow: auto; }
.mp-prose code { padding: 2px 6px; }
.mp-prose table { width: 100%; border-collapse: collapse; font-size: .9em; display: block; overflow-x: auto; }
.mp-prose th, .mp-prose td { border-bottom: 1px solid var(--mp-line); padding: 10px 12px; text-align: left; }
.mp-prose hr { border: 0; border-top: 1px solid var(--mp-line); margin: 2em 0; }

.mp-source { display: flex; gap: 12px; align-items: flex-start; background: var(--mp-surface); border-radius: var(--mp-radius); padding: 14px 16px; margin: 28px 0 0; font-size: 14.5px; color: var(--mp-text-2); }
.mp-source svg { flex: 0 0 auto; color: var(--mp-accent); margin-top: 2px; }
.mp-source a { color: var(--mp-accent) !important; font-weight: 600; }
.mp-source__label { color: var(--mp-muted); }

.mp-cta { margin: 24px 0 0; }
.mp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.mp-reactions { margin-top: 32px; }

.mp .about-author, .mp .section-author { background: var(--mp-surface); border-radius: var(--mp-radius-lg); padding: 20px; border: 0; margin-top: 32px; }

.mp-related { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--mp-line); }
.mp-related .mp-section-title { margin-bottom: 18px; }
.mp-related .mp-card__title { font-size: 16px; }

.mp-adjacent { margin-top: 36px; padding: 20px 0; border-top: 1px solid var(--mp-line); border-bottom: 1px solid var(--mp-line); }
.mp-adjacent .head-title a { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted); display: inline-flex; gap: 6px; align-items: center; }
.mp-adjacent .title { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 6px 0 0; }

.mp-comments { margin-top: 36px; scroll-margin-top: calc(var(--mp-header-h) + 20px); }

.mp-article-side { display: flex; flex-direction: column; gap: 28px; align-self: stretch; }
.mp-article-side .mp-sticky { top: calc(var(--mp-header-h) + 20px); }

/* ---------- 13. Native ad slots ---------- */
.mp-ad { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 auto; width: 100%; }
.mp-ad__label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mp-muted); opacity: .8; margin-bottom: 6px; }
.mp-ad__slot { width: 100%; max-width: var(--mp-w-ds); min-height: var(--mp-h-ds); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mp-ad__slot img { height: auto; border-radius: 6px; }
.mp-ad--leaderboard { padding: 18px 0; }
.mp-ad--header { padding: 14px 0; background: var(--mp-surface-2); border-bottom: 1px solid var(--mp-line); }
[data-bs-theme="dark"] .mp-ad--header { background: var(--mp-bg); }
.mp-ad--section { padding: 28px 0 8px; }
.mp-ad--inline { margin: 28px auto; padding: 14px 0; border-top: 1px solid var(--mp-line); border-bottom: 1px solid var(--mp-line); }
.mp-ad--article { margin: 1.6em auto; }
.mp-ad--feed { padding: 18px 0; border-bottom: 1px solid var(--mp-line); }
.mp-ad--feed .mp-ad__label { align-self: center; }
.mp-ad--sidebar, .mp-ad--tower { background: var(--mp-surface-2); border: 1px solid var(--mp-line); border-radius: var(--mp-radius-lg); padding: 12px; }
[data-bs-theme="dark"] .mp-ad--sidebar, [data-bs-theme="dark"] .mp-ad--tower { background: var(--mp-surface); }
.mp-ad--list-top { margin-bottom: 8px; }
.mp-ad--sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    background: var(--mp-header-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--mp-line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    transform: translateY(110%); transition: transform .35s ease;
}
.mp-ad--sticky.is-visible { transform: none; }
.mp-ad--sticky .mp-ad__label { display: none; }
.mp-ad__close { position: absolute; top: -26px; right: 8px; width: 26px; height: 26px; border-radius: 50% ; border: 1px solid var(--mp-line); background: var(--mp-bg); color: var(--mp-text); font-size: 18px; line-height: 1; }
.mp-ad.is-empty { display: none !important; }

/* ---------- 14. Footer ---------- */
.mp-footer { background: var(--mp-surface) !important; color: var(--mp-muted); border-top: 1px solid var(--mp-line); margin-top: 56px; padding: 48px 0 24px; font-size: 14px; }
.mp-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1.2fr; gap: 40px; }
.mp-footer__logo img { max-height: 34px; width: auto; }
.mp-footer__about { margin: 14px 0; line-height: 1.6; }
.mp-footer__title { font-size: 13px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mp-text) !important; margin: 0 0 14px; }
.mp-footer__col ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 16px; }
.mp-footer__col li { margin: 0 0 8px; break-inside: avoid; }
.mp-footer a { color: var(--mp-text-2) !important; }
.mp-footer a:hover { color: var(--mp-accent) !important; }
.mp-footer .mp-mini { border-color: var(--mp-line); }
.mp-footer .mp-mini__media { display: none; }
.mp-footer .mp-mini { grid-template-columns: 1fr; }
.mp-newsletter .newsletter-inputs { display: flex; gap: 8px; }
.mp-newsletter .newsletter-input { border-radius: 999px !important; border: 1px solid var(--mp-line-strong) !important; background: var(--mp-bg) !important; color: var(--mp-text) !important; padding: 10px 16px; }
.mp-newsletter input[name="url"] { display: none; }
.mp-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--mp-line); font-size: 12.5px; }
.mp-footer__links { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }

.mp .btn-scroll-up { border-radius: 50%; background: var(--mp-text); color: var(--mp-bg); box-shadow: var(--mp-shadow); }

/* ---------- 15. Responsive ---------- */
@media (max-width: 1199.98px) {
    .mp-article-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; }
}

@media (max-width: 991.98px) {
    :root { --mp-header-h: 56px; --mp-prose-size: 19.5px; }
    .mp-hero__grid, .mp-layout, .mp-catblock__grid { grid-template-columns: 1fr; }
    .mp-layout { gap: 32px; }
    .mp-sticky { position: static; }
    .mp-article-grid { grid-template-columns: minmax(0, 1fr); }
    .mp-article-side { display: none; }
    .mp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mp-footer__grid { grid-template-columns: 1fr 1fr; }
    .mp-ad__slot { max-width: var(--mp-w-mb); min-height: var(--mp-h-mb); }
    .mp-day { top: 56px; }
}

@media (max-width: 575.98px) {
    :root { --mp-gap: 16px; --mp-prose-size: 19px; }
    .mp-hero { padding-top: 8px; }
    .mp-lead__media { border-radius: 0; margin: 0 calc(var(--bs-gutter-x, 1.5rem) * -.5); }
    .mp-lead__title { font-size: 26px; }
    .mp-lead__dek { font-size: 16px; }
    .mp-side { grid-template-columns: 1fr 96px; }
    .mp-row { grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; padding: 14px 0; }
    .mp-row:not(:has(.mp-row__media)) { grid-template-columns: 1fr; }
    .mp-row.is-fresh::before { display: none; }
    .mp-row__title { font-size: 17px; }
    .mp-row__summary { display: none; }
    .mp-row__media { aspect-ratio: 1 / 1; border-radius: 10px; }
    .mp-grid--3 { grid-template-columns: 1fr; }
    .mp-article__title { font-size: 28px; }
    .mp-article__dek { font-size: 17.5px; }
    .mp-toolbar { flex-direction: row; }
    .mp-toolbar__share .btn-social-share:nth-child(n+5) { display: none !important; }
    .mp-footer__grid { grid-template-columns: 1fr; gap: 28px; }
    body.mp.has-sticky-ad { padding-bottom: 70px; }
}

@media (min-width: 992px) {
    .mp-ad--sticky { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .mp *, .mp *::before, .mp *::after { animation: none !important; transition: none !important; }
}

@media print {
    .mp-header, .mp-topbar-wrap, .mp-header-mobile, .mp-ad, .mp-article-side, .mp-toolbar, .mp-related, .mp-adjacent, .mp-comments, .mp-footer, .mp-progress { display: none !important; }
    .mp-article-grid { display: block; }
}

/* ---------- 16. Small fixes ---------- */
.mp .btn-scroll-up, .mp .btn-scroll-up svg { color: var(--mp-bg) !important; }
.mp .sidebar-widget.mp-widget:not(:has(.widget-body > *)) { display: none; }
.mp-hero__side:empty { display: none; }
@media (max-width: 991.98px) {
    body.mp.has-sticky-ad .btn-scroll-up { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}


/* ---------- 17. Reading page: one font family, larger and cleaner ---------- */
.mp-article, .mp-article .mp-article__title, .mp-article .mp-article__dek,
.mp .entry-content.mp-prose, .mp .entry-content.mp-prose *:not(code, pre, i[class*="icon"], .mp-ad, .mp-ad *) {
    font-family: var(--mp-read-font) !important;
}
.mp .entry-content.mp-prose { font-size: var(--mp-prose-size) !important; line-height: var(--mp-prose-lh) !important; color: var(--mp-text) !important; letter-spacing: -.003em; }
/* Neutralise inline styles pasted from other sites / editors */
.mp .entry-content.mp-prose :is(p, li, span, div, font):not(.mp-ad, .mp-ad *) {
    font-size: inherit !important; line-height: inherit !important; color: inherit;
}
.mp .entry-content.mp-prose .mp-ad { font-size: 14px !important; line-height: 1.4 !important; }
.mp .entry-content.mp-prose .mp-ad__label { font-size: 10.5px !important; line-height: 1.2 !important; }
.mp .entry-content.mp-prose p { margin: 0 0 1.2em !important; }
.mp .entry-content.mp-prose h2 { font-size: 1.4em !important; font-weight: 700; letter-spacing: -.015em; }
.mp .entry-content.mp-prose h3 { font-size: 1.2em !important; font-weight: 700; }
.mp .entry-content.mp-prose h4 { font-size: 1.05em !important; font-weight: 700; }
.mp .entry-content.mp-prose figcaption { font-size: .72em !important; }
.mp .entry-content.mp-prose blockquote { font-size: 1.02em !important; font-style: normal; }
.mp-article__title { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.12; }
.mp-article__dek { font-size: 21px; line-height: 1.55; color: var(--mp-text-2); }
@media (max-width: 575.98px) {
    .mp-article__title { font-size: 29px; }
    .mp-article__dek { font-size: 18.5px; }
}

/* ---------- 18. Newsletter button ---------- */
.mp-newsletter .newsletter-inputs { flex-wrap: nowrap; }
.mp-newsletter .newsletter-input { flex: 1 1 auto; min-width: 0; }
.mp-newsletter .newsletter-button { flex: 0 0 auto; white-space: nowrap; padding: 10px 18px; }

/* ---------- 19. Top stories band (slider / featured) ---------- */
.mp-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 28px 0 32px; margin-bottom: 8px;
    background:
        radial-gradient(60% 80% at 15% 0%, color-mix(in srgb, var(--mp-accent) 45%, transparent) 0%, transparent 60%),
        radial-gradient(50% 70% at 100% 100%, color-mix(in srgb, #bf5af2 30%, transparent) 0%, transparent 60%),
        linear-gradient(180deg, #0b0b0f 0%, #16161c 100%);
    color: #f5f5f7;
}
.mp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.mp-hero__label { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.mp-hero__label::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--mp-accent); }
.mp-hero a, .mp-hero h2, .mp-hero h3 { color: #fff !important; }
.mp-hero a:hover { color: #fff !important; opacity: .85; }

/* Lead story: text over image */
.mp-hero .mp-lead { position: relative; border-radius: var(--mp-radius-lg); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
.mp-hero .mp-lead { min-height: 440px; }
.mp-hero .mp-lead__media { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; height: 100%; }
.mp-hero .mp-lead__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.88) 100%); pointer-events: none; }
.mp-hero .mp-lead__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 30px; pointer-events: none; }
.mp-hero .mp-lead__body a { pointer-events: auto; }
.mp-hero .mp-lead__title { font-size: clamp(26px, 2.8vw, 38px); margin: 10px 0 8px; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.mp-hero .mp-lead__dek { color: rgba(255,255,255,.82); font-size: 16.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-hero .mp-meta, .mp-hero .mp-meta a, .mp-hero .mp-mini__time { color: rgba(255,255,255,.66) !important; }
.mp-hero .mp-kicker {
    background: var(--mp-cat, var(--mp-accent)); color: #fff !important;
    padding: 5px 10px; border-radius: 999px; font-size: 11px; letter-spacing: .08em;
}

/* Secondary stories: glass cards with accent edge */
.mp-hero__side { gap: 12px; }
.mp-hero .mp-side {
    grid-template-columns: 1fr 104px; padding: 14px; border: 0 !important; border-radius: var(--mp-radius);
    background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: background .2s ease, transform .2s ease;
    position: relative;
}
.mp-hero .mp-side::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--mp-cat, var(--mp-accent)); }
.mp-hero .mp-side:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); }
.mp-hero .mp-side:first-child { padding-top: 14px; }
.mp-hero .mp-side .mp-kicker { background: transparent; padding: 0; color: var(--mp-cat, #8ab4ff) !important; filter: brightness(1.35); }
.mp-hero .mp-side__title { font-size: 16px; }
.mp-hero .mp-side__media { border-radius: 10px; }

@media (max-width: 991.98px) {
    .mp-hero .mp-lead { min-height: 0; aspect-ratio: 4 / 3.4; }
}
@media (max-width: 575.98px) {
    .mp-hero { padding: 16px 0 22px; }
    .mp-hero .mp-lead { border-radius: 16px; aspect-ratio: 1 / 1; }
    .mp-lead__media { margin: 0 !important; }
    .mp-hero .mp-lead__body { padding: 18px; }
    .mp-hero .mp-lead__dek { display: none; }
    .mp-hero .mp-side { grid-template-columns: 1fr 88px; }
}
