/* ================================================= */
/* MINDTHEDESK.COM - unified dark theme (V74)        */
/* Single palette for home, city hubs, and subpages  */
/* ================================================= */

/* Default = dark. html[data-theme] always set by boot script (light|dark). */
:root,
html[data-theme="dark"] {
    color-scheme: dark;

    --mtd-bg: #1A3148;
    --mtd-bg-elevated: #21405A;
    --mtd-bg-panel: #274868;
    --mtd-bg-card: #23415C;
    --mtd-bg-input: rgba(18, 40, 62, 0.78);
    --mtd-bg-header: rgba(22, 46, 70, 0.94);
    --mtd-bg-drawer: #173044;

    --mtd-border: rgba(186, 214, 236, 0.16);
    --mtd-border-strong: rgba(186, 214, 236, 0.30);
    --mtd-border-solid: #3C5E7C;

    --mtd-text: #EAF3FB;
    --mtd-text-soft: #D5E4F2;
    --mtd-text-muted: #B4C9DC;
    --mtd-text-faint: #8EABC4;
    --mtd-text-invert: #173044;

    --mtd-link: #C5DFF6;
    --mtd-link-hover: #E7F3FC;
    --mtd-accent: #9FD4E8;
    --mtd-btn: #3577A6;
    --mtd-btn-deep: #2A6490;
    --mtd-btn-text: #ffffff;
    --mtd-success: #86efac;
    --mtd-warning: #fcd34d;
    --mtd-danger: #fca5a5;
    --mtd-purple: #ddd6fe;

    --mtd-chip-bg: rgba(168, 206, 232, 0.16);
    --mtd-chip-text: #D7EAF8;
    --mtd-chip-border: rgba(168, 206, 232, 0.38);
    --mtd-state-hover-bg: #2C5274;
    --mtd-state-hover-text: #EAF3FB;
    --mtd-shadow: 0 10px 28px rgba(8, 22, 38, 0.28);
    --mtd-ticker-bg: #131722;
    --mtd-sky-top: #244868;
    --mtd-ridge: #9EC3DE;

    --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-synthesis: none;
}

/* ---------- LIGHT MODE TOKENS ---------- */
html[data-theme="light"] {
    color-scheme: light;

    --mtd-bg: #E4F0FA;
    --mtd-bg-elevated: #F7FBFE;
    --mtd-bg-panel: #F7FBFE;
    --mtd-bg-card: #F8FBFE;
    --mtd-bg-input: #ffffff;
    --mtd-bg-header: rgba(247, 251, 254, 0.94);
    --mtd-bg-drawer: #EAF3FB;

    --mtd-border: rgba(26, 52, 84, 0.10);
    --mtd-border-strong: rgba(26, 52, 84, 0.16);
    --mtd-border-solid: #D3E3F2;

    --mtd-text: #1A2C44;
    --mtd-text-soft: #24364F;
    --mtd-text-muted: #4A627C;
    --mtd-text-faint: #6A8298;
    --mtd-text-invert: #F7FBFE;

    --mtd-link: #1C5F96;
    --mtd-link-hover: #154A76;
    --mtd-accent: #1A6A8A;
    --mtd-btn: #2E74A8;
    --mtd-btn-deep: #245E88;
    --mtd-btn-text: #ffffff;
    --mtd-success: #047857;
    --mtd-warning: #b45309;
    --mtd-danger: #b91c1c;
    --mtd-purple: #6d28d9;

    --mtd-chip-bg: rgba(46, 116, 168, 0.12);
    --mtd-chip-text: #1A4E78;
    --mtd-chip-border: rgba(46, 116, 168, 0.28);
    --mtd-state-hover-bg: #D7E8F6;
    --mtd-state-hover-text: #1A2C44;
    --mtd-shadow: 0 1px 2px rgba(26, 52, 84, 0.05), 0 10px 28px rgba(26, 52, 84, 0.06);
    --mtd-ticker-bg: #131722; /* market tape stays dark */
    --mtd-sky-top: #F4F9FD;
    --mtd-ridge: #5E86A8;

    --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-synthesis: none;
}


body,
body.mtd-body,
body.bg-gray-900 {
    font-family: var(--font-primary) !important;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--mtd-bg);
    color: var(--mtd-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary) !important;
    letter-spacing: -0.02em;
    color: var(--mtd-text);
}


/* Section titles — solid, high contrast (no gradient/text-fill wash) */
.homepage-section-title {
    font-weight: 800 !important;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: var(--mtd-text);
    color: var(--mtd-text);
    margin-bottom: 0.75rem !important;
    border-bottom: 1px solid var(--mtd-border) !important;
    padding-bottom: 0.4rem;
}

/* Cards — solid surface, light edge, no heavy shadow haze */
.card, .article-card, .hero-card {
    background: var(--mtd-bg-card) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--mtd-border-solid) !important;
    box-shadow: none !important;
    border-radius: 14px !important;
    transition: border-color 0.2s ease, transform 0.2s ease !important;
    overflow: hidden;
}

.card:hover, .article-card:hover, .hero-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
}

/* Article Card Internals */
.article-image-container { width: 100%; height: 220px; overflow: hidden; }
.article-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.article-card:hover .article-image { transform: scale(1.05); }
.article-card-body { padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between; height: calc(100% - 220px); }

/* Hero Card Internals */
.hero-image-wrapper { width: 100%; height: 350px; overflow: hidden; }
.hero-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.article-image--mark,
.hero-image--mark {
    object-fit: contain !important;
    background: #D9EEFB;
    transform: none !important;
}
.hero-card:hover .hero-image { transform: scale(1.05); }
.hero-card:hover .hero-image--mark,
.article-card:hover .article-image--mark { transform: none !important; }
.hero-content-wrapper { padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; height: calc(100% - 350px); }

.hero-category {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.5);
}
.hero-title { font-size: 1.8rem; font-weight: 800; color: var(--mtd-text); margin-bottom: 1rem; line-height: 1.3; }

/* Premium Buttons */
.btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
    text-align: center;
    display: inline-block;
    border: none !important;
}
.btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Forms & Inputs */
.form-input {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(71, 85, 105, 0.5) !important;
    color: var(--mtd-text);
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
}
.form-input:focus {
    outline: none !important;
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
}

/* Status Badges */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.status-approved { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.status-pending { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.nav-link { font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; transition: color 0.2s ease; padding: 0.5rem 0.75rem; }
.nav-link:hover { color: #ffffff; }

.ad-widget-container img, .ad-widget-container video {
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); box-shadow: none;
}

/* ================================================= */
/* v37: Fixed-height ad units (promo line + no ghosts) */
/* ================================================= */
.ad-widget-container.ad-unit,
.ad-unit {
    width: 100%;
    max-width: 260px;
    margin: 0.65rem auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    /* Fixed total height: media + slogan band + footer — even when slogan empty */
    height: 320px;
    min-height: 320px;
    max-height: 320px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    overflow: hidden;
    padding: 0.5rem 0.45rem 0.35rem;
}
.ad-unit__media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 210px;
    height: 210px;
    min-height: 210px;
    max-height: 210px;
    width: 100%;
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.65);
    overflow: hidden;
    text-decoration: none;
}
.ad-unit__media--empty {
    background: repeating-linear-gradient(
        -45deg,
        rgba(30, 41, 59, 0.8),
        rgba(30, 41, 59, 0.8) 8px,
        rgba(15, 23, 42, 0.9) 8px,
        rgba(15, 23, 42, 0.9) 16px
    );
}
.ad-unit__media--cta {
    flex-direction: column;
    gap: 0.4rem;
    border: 1px dashed rgba(59, 130, 246, 0.45);
    background: rgba(15, 23, 42, 0.85);
}
.ad-unit__cta-title {
    color: #93c5fd;
    font-weight: 800;
    font-size: 0.95rem;
}
.ad-unit__cta-sub {
    color: #94a3b8;
    font-size: 0.7rem;
    padding: 0 0.5rem;
    line-height: 1.3;
}
.ad-unit__asset {
    width: 100% !important;
    height: 100% !important;
    max-height: 210px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: none !important;
    display: block;
}
.ad-unit__slogan {
    flex: 0 0 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem 0;
    overflow: hidden;
}
.ad-unit__slogan-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.7rem;
    line-height: 1.25;
    color: #cbd5e1;
    font-style: italic;
    font-weight: 500;
    max-width: 100%;
}
.ad-unit__slogan-text--empty {
    visibility: hidden;
}
.ad-unit__footer {
    flex: 0 0 28px;
    height: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-unit__label {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    text-decoration: none;
    color: #64748b;
}
.ad-unit__label--mtd:hover { color: #93c5fd; }
.ad-unit__label--oryx:hover { color: #c084fc; }

/* Wider desktops: slightly taller units so promo copy breathes */
@media (min-width: 1280px) {
    .ad-unit {
        max-width: 280px;
        height: 350px;
        min-height: 350px;
        max-height: 350px;
    }
    .ad-unit__media {
        flex-basis: 230px;
        height: 230px;
        min-height: 230px;
        max-height: 230px;
    }
    .ad-unit__asset { max-height: 230px !important; }
    .ad-unit__slogan {
        flex-basis: 58px;
        height: 58px;
        min-height: 58px;
        max-height: 58px;
    }
    .ad-unit__slogan-text { font-size: 0.72rem; }
}
@media (min-width: 1600px) {
    .ad-unit {
        max-width: 300px;
        height: 380px;
        min-height: 380px;
        max-height: 380px;
    }
    .ad-unit__media {
        flex-basis: 250px;
        height: 250px;
        min-height: 250px;
        max-height: 250px;
    }
    .ad-unit__asset { max-height: 250px !important; }
    .ad-unit__slogan {
        flex-basis: 64px;
        height: 64px;
        min-height: 64px;
        max-height: 64px;
    }
}
/* Feed wrappers: no dashed empty “slot” look when widget outputs nothing */
.mtd-feed-ad:empty,
.mtd-feed-ad:not(:has(.ad-unit)) {
    display: none !important;
}

/* --- RESTORED FLUIDITY PATCH --- */
html, body { overflow-x: hidden; width: 100%; }
.container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}
/* Keep Tailwind max-width utilities for reading columns (articles, contact, search).
   Only force fluid width on very wide custom shells — not on content max-w-* classes. */
.max-w-screen-xl { max-width: min(100%, 1280px) !important; }
/* Allow intentional reading widths */
.max-w-3xl { max-width: min(100%, 48rem) !important; }
.max-w-4xl { max-width: min(100%, 56rem) !important; }
.max-w-2xl { max-width: min(100%, 42rem) !important; }
.max-w-xl  { max-width: min(100%, 36rem) !important; }
.max-w-lg  { max-width: min(100%, 32rem) !important; }
.max-w-md  { max-width: min(100%, 28rem) !important; }
[style*="max-width: 1200px"], [style*="max-width:1200px"] { max-width: min(100%, 1200px) !important; }
[style*="max-width: 1000px"], [style*="max-width:1000px"] { max-width: min(100%, 1000px) !important; }
[style*="max-width: 800px"],  [style*="max-width:800px"]  { max-width: min(100%, 800px) !important; }

@media (min-width: 1600px) {
    .container { max-width: 96% !important; }
    .lg\:col-span-2 { grid-column: span 3 / span 3 !important; }
    .ad-widget-container { max-width: 100% !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .container { padding-left: 2rem !important; padding-right: 2rem !important; }
}
.admin-table, table { width: 100% !important; table-layout: auto; }
.overflow-x-auto { width: 100%; }
img, video, iframe { max-width: 100%; }

/* ================================================= */
/* V56: TYPOGRAPHY & IMAGE CONSISTENCY BALANCING     */
/* ================================================= */
.homepage-section-title { font-size: 1.6rem !important; margin-bottom: 1.5rem !important; }
.hero-title { font-size: 1.3rem !important; line-height: 1.4 !important; }
.article-card-body h3 { font-size: 1.1rem !important; line-height: 1.4 !important; }
.article-card-body p { font-size: 0.9rem !important; line-height: 1.5 !important; }
.hero-content-wrapper p { font-size: 0.95rem !important; line-height: 1.5 !important; }

/* Force absolute consistency on all images */
.article-image-container, .hero-image-wrapper { 
    height: 200px !important; 
    min-height: 200px !important; 
    max-height: 200px !important;
}

/* Ensure cards stretch and push links to the bottom */
.hero-card, .article-card { 
    display: flex !important; 
    flex-direction: column !important; 
    height: 100% !important;
}
.hero-content-wrapper, .article-card-body { 
    height: auto !important; 
    flex-grow: 1 !important; 
    display: flex !important;
    flex-direction: column !important;
}
.article-card-body > div:last-child, .hero-content-wrapper > div:last-child {
    margin-top: auto !important;
}

/* MTD NAV V58 MOBILE */
.mtd-site-header { -webkit-tap-highlight-color: transparent; }
.mtd-mobile-drawer { max-height: min(85vh, 720px); }
.mtd-mobile-scroll {
    max-height: min(85vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.mtd-mobile-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0.5rem 0.25rem 0.35rem;
}
.mtd-mobile-list {
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.85);
}
.mtd-mobile-link {
    display: block;
    padding: 0.85rem 1rem;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(55, 65, 81, 0.6);
}
.mtd-mobile-link:last-child { border-bottom: none; }
.mtd-mobile-link:active { background: rgba(37, 99, 235, 0.35); }
.mtd-mobile-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #374151;
    background: #1f2937;
    color: #f3f4f6;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}
.mtd-mobile-accordion {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #374151;
    background: #111827;
    color: #f9fafb;
    font-weight: 800;
    font-size: 0.95rem;
}
.mtd-mobile-state-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0.8rem 1rem;
    background: #1f2937;
    color: #e5e7eb;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
}
body.mtd-mobile-nav-open { overflow: hidden; touch-action: none; }
@media (max-width: 767px) {
    .nav-link { padding: 0.65rem 0.5rem; }
    .homepage-section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    .hero-image-wrapper { height: 200px; }
    .hero-title { font-size: 1.25rem; }
    .article-image-container { height: 160px; }
}
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* MTD V58 READABILITY — phone → TV */
.mtd-body { font-size: clamp(15px, 1.05vw, 18px); line-height: 1.55; }
.mtd-shell { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; }
@media (min-width: 1920px) {
  .mtd-shell { max-width: 1400px; }
  .mtd-body { font-size: 18px; }
}
.mtd-page-wrap { width: 100%; }
.mtd-main-col { padding-left: 0.75rem; padding-right: 0.75rem; padding-top: 0.75rem; padding-bottom: 2rem; }
@media (min-width: 640px) {
  .mtd-main-col { padding-left: 1rem; padding-right: 1rem; padding-top: 1rem; }
}
.mtd-home-hero .mtd-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .mtd-home-hero .mtd-hero-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .mtd-home-hero .mtd-hero-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}
.mtd-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .mtd-home-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* Feed: mobile 1-col (article / ad / article…); PC 3–4 articles per row */
.mtd-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
}
.mtd-feed-item {
  min-width: 0;
  width: 100%;
}
.mtd-feed-article .article-card {
  height: 100%;
}
.mtd-feed-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
}
/* Mobile-only inline ads (side columns handle PC ads) */
@media (min-width: 1024px) {
  .mtd-feed-ad--mobile { display: none !important; }
  .mtd-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}
@media (min-width: 1280px) {
  .mtd-feed {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* When inline ads are shown on desktop too, span full width of row */
.mtd-feed-ad:not(.mtd-feed-ad--mobile) {
  grid-column: 1 / -1;
}
@media (min-width: 1024px) {
  .mtd-feed-ad:not(.mtd-feed-ad--mobile) {
    grid-column: auto;
  }
}
.mtd-side-banners {
  /* No internal scrollbar — fixed-height ad units; empty slots render nothing */
  overflow: visible;
  max-height: none;
}
.mtd-side-banners .ad-unit {
  margin-top: 0;
  margin-bottom: 0;
}
.mtd-side-banners a {
  width: 100%;
}
.mtd-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.mtd-home-section { margin-bottom: 1.75rem; }
.mtd-more-link {
  color: #93c5fd;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}
.mtd-more-link:hover { color: var(--mtd-link-hover); text-decoration: none; }
.mtd-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #1f2937;
  border: 1px solid #374151;
  color: #e5e7eb;
  text-align: center;
}
.mtd-quick:hover { border-color: #3b82f6; color: #fff; }
.homepage-section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
  margin-bottom: 0.5rem !important;
}
.nav-link {
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #cbd5e1;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}
.nav-link:hover { color: #fff; background: rgba(59,130,246,0.15); }
/* Far-left Podcast emphasis in main nav */
.nav-link--accent {
  color: #c4b5fd !important;
  font-weight: 800 !important;
}
.nav-link--accent:hover {
  color: #fff !important;
  background: rgba(168, 85, 247, 0.22) !important;
}
.mtd-mobile-link--accent {
  color: #c4b5fd !important;
  font-weight: 800 !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
/* Cards easier on large TVs */
@media (min-width: 1600px) {
  .hero-title { font-size: 1.65rem; }
  .article-card-body { padding: 1.35rem; }
}
body.mtd-mobile-nav-open { overflow: hidden; }
.mtd-mobile-drawer { max-height: min(88vh, 800px); }
.mtd-mobile-scroll { max-height: min(88vh, 800px); overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Banner / ticker shell — widget paints itself */
.mtd-ticker-top,
.mtd-ticker-bottom {
  width: 100%;
}
.mtd-banner-block {
  width: 100%;
}
.mtd-banner-block img,
.mtd-banner-block video {
  max-width: 100%;
  height: auto;
}
.mtd-side-banners a {
  width: 100%;
}
/* Keep ad slots from collapsing layout */
.mtd-banner-block .grid > div {
  min-height: 120px;
  align-items: center;
}



/* ================================================= */
/* V74 CHROME UNIFICATION - home + subpages          */
/* ================================================= */

.mtd-site-header {
    background-color: rgba(11, 15, 25, 0.96) !important;
    border-bottom-color: var(--mtd-border) !important;
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.08) !important;
}
footer {
    background-color: var(--mtd-bg-elevated) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text-muted) !important;
}
.mtd-site-header.border-gray-800,
.mtd-ticker-top.border-b,
.mtd-ticker-bottom.border-t,
footer.border-t {
    border-color: var(--mtd-border) !important;
}

/* Text bands */
.mtd-main-col .text-gray-200,
.mtd-home .text-gray-200 { color: var(--mtd-text); }
.mtd-main-col .text-gray-300,
.mtd-home .text-gray-300 { color: var(--mtd-text-soft) !important; }
.mtd-main-col .text-gray-400,
.mtd-home .text-gray-400,
.mtd-main-col .text-slate-400 { color: var(--mtd-text-muted) !important; }
.mtd-main-col .text-gray-500,
.mtd-home .text-gray-500,
.mtd-main-col .text-gray-600 { color: var(--mtd-text-faint) !important; }

/* Links: blue-300 and blue-400 both map to brand link */
.mtd-main-col a.text-blue-300,
.mtd-main-col a.text-blue-400,
.mtd-main-col .text-blue-300,
.mtd-main-col .text-blue-400,
.mtd-home a.text-blue-300,
.mtd-home a.text-blue-400,
.mtd-home .text-blue-300:not(h3),
.mtd-home a.text-blue-300,
.mtd-more-link {
    color: var(--mtd-link) !important;
}
.mtd-main-col a:hover.text-blue-300,
.mtd-main-col a:hover.text-blue-400,
.mtd-more-link:hover {
    color: var(--mtd-link-hover) !important;
}
.article-card:hover h3,
.hero-card:hover .hero-title {
    color: var(--mtd-link-hover) !important;
}

/* Panel surfaces */
.mtd-main-col .bg-gray-900,
.mtd-main-col .bg-gray-900\/80,
.mtd-main-col .bg-gray-900\/50 {
    background-color: var(--mtd-bg-elevated) !important;
}
.mtd-main-col .bg-gray-800,
.mtd-main-col .bg-gray-800\/60,
.mtd-main-col .bg-gray-800\/50,
.mtd-main-col .bg-gray-800\/30,
.mtd-home .bg-gray-800 {
    background-color: var(--mtd-bg-panel) !important;
}
.mtd-main-col .border-gray-700,
.mtd-main-col .border-gray-800,
.mtd-home .border-gray-700,
.mtd-home .border-gray-800,
.article-card .border-gray-700,
.hero-card .border-gray-700 {
    border-color: var(--mtd-border-solid) !important;
}

.article-card h3 {
    color: var(--mtd-text);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}
.article-card p,
.hero-card p {
    color: var(--mtd-text-muted) !important;
}
.hero-title { color: var(--mtd-text); }

/* Card CTAs: one blue (hero used green) */
.article-card span.text-blue-400,
.hero-card span.text-blue-400,
.hero-card span.text-green-400 {
    color: var(--mtd-link) !important;
}

.homepage-section-title {
    font-weight: 800 !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: var(--mtd-text);
    color: var(--mtd-text);
    border-bottom: 1px solid var(--mtd-border) !important;
    padding-bottom: 0.4rem !important;
    text-shadow: none !important;
    filter: none !important;
}

/* City hub sidebar widgets */
.mtd-main-col section.widget,
.mtd-main-col .widget {
    background: var(--mtd-bg-card) !important;
    border: 1px solid var(--mtd-border) !important;
    border-radius: 14px !important;
    padding: 1rem 1.1rem !important;
    margin-bottom: 1rem !important;
    box-shadow: none !important;
}
.mtd-main-col section.widget h3,
.mtd-main-col .widget h3 {
    color: var(--mtd-text) !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid var(--mtd-border) !important;
    padding-bottom: 0.45rem !important;
    margin-bottom: 0.65rem !important;
}
.mtd-main-col section.widget li,
.mtd-main-col .widget li {
    color: var(--mtd-text-soft) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    padding: 0.4rem 0;
}
.mtd-main-col section.widget li:last-child { border-bottom: none; }

.mtd-main-col .bg-blue-600,
.mtd-main-col .bg-blue-500,
.mtd-site-header .bg-blue-600,
.mtd-site-header .bg-blue-500 {
    background-color: var(--mtd-btn) !important;
}
.mtd-main-col .bg-blue-600:hover,
.mtd-main-col .bg-blue-500:hover,
.mtd-site-header .bg-blue-600:hover,
.mtd-site-header .bg-blue-500:hover {
    background-color: var(--mtd-btn-deep) !important;
}

footer a[style*="00f0ff"],
footer a[style*="22d3ee"] {
    color: var(--mtd-accent) !important;
}

.mtd-site-header a[title*="home"] span,
.mtd-site-header a[title*="Home"] span {
    color: var(--mtd-text) !important;
}

.mtd-banner-block .text-purple-400 { color: var(--mtd-purple) !important; }
.mtd-banner-block .text-gray-500 { color: var(--mtd-text-faint) !important; }
.mtd-banner-block .border-gray-700 { border-color: var(--mtd-border-solid) !important; }

/* State hub labels - same luminance band, distinct hues */
.mtd-home h3.text-blue-300 { color: #7dd3fc !important; }
.mtd-home h3.text-green-300 { color: #86efac !important; }
.mtd-home h3.text-amber-300 { color: #fcd34d !important; }

.mtd-main-col input:not([type="checkbox"]):not([type="radio"]),
.mtd-main-col select,
.mtd-main-col textarea {
    background-color: var(--mtd-bg-input) !important;
    border-color: var(--mtd-border-strong) !important;
    color: var(--mtd-text);
}

.mtd-quick {
    background: var(--mtd-bg-panel) !important;
    border: 1px solid var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
.mtd-quick:hover {
    border-color: var(--mtd-link) !important;
    color: var(--mtd-text) !important;
}
.nav-link { color: var(--mtd-text-soft) !important; }
.nav-link:hover { color: var(--mtd-text) !important; background: color-mix(in srgb, var(--mtd-btn) 14%, transparent) !important; }
.nav-link--accent { color: var(--mtd-purple) !important; }


/* ================================================= */
/* V75 READABILITY — kill haze/shadow wash            */
/* ================================================= */
.card, .article-card, .hero-card, .mtd-main-col .widget, .mtd-main-col section.widget {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.article-card-body, .hero-content-wrapper {
    background: transparent !important;
    text-shadow: none !important;
}
.article-card h3, .hero-title, .homepage-section-title {
    text-shadow: none !important;
    filter: none !important;
}
/* Ensure body copy is solid, not dimmed by effects */
.article-card p, .hero-card p, .mtd-main-col p, .mtd-home p {
    text-shadow: none !important;
}
.mtd-site-header {
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.1) !important;
}
/* Ad containers: lighter edge, no drop shadow puddle */
.ad-unit, .mtd-feed-ad, .ad-widget-container {
    box-shadow: none !important;
}


/* ================================================= */
/* V76 LINKS — no blue underline "shadow" lines       */
/* preflight:false leaves browser default underlines  */
/* and whole-card <a> wrappers amplify them           */
/* ================================================= */
a {
    text-decoration: none !important;
    text-decoration-thickness: 0 !important;
    text-underline-offset: 0 !important;
    -webkit-text-decoration-line: none !important;
}
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
}
/* Card tiles are full anchors — never underline body text inside */
a.article-card,
a.hero-card,
a.article-card:hover,
a.hero-card:hover,
a.article-card:focus,
a.hero-card:focus,
a.article-card:visited,
a.hero-card:visited,
a.article-card *,
a.hero-card * {
    text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
    box-shadow: none !important;
}
/* Kill Tailwind group-hover:underline utility on cards */
a.article-card .group-hover\:underline,
a.hero-card .group-hover\:underline,
.group:hover .group-hover\:underline {
    text-decoration: none !important;
}
/* Focus ring without blue underline smear */
a:focus {
    outline: none;
}
a:focus-visible {
    outline: 2px solid var(--mtd-link);
    outline-offset: 2px;
    text-decoration: none !important;
}
/* "More →" and inline nav: color only, no underline */
.mtd-more-link,
.mtd-more-link:hover,
.nav-link,
.nav-link:hover,
.mtd-mobile-link,
.mtd-quick,
.mtd-quick:hover {
    text-decoration: none !important;
}
/* Optional: subtle opacity hover instead of underline for in-content links */
.mtd-main-col a:not(.article-card):not(.hero-card):not(.btn):not(.mtd-quick):hover {
    text-decoration: none !important;
    filter: brightness(1.12);
}



/* Article rich-text body (edit_article TinyMCE output) */
.mtd-article-body { color: var(--mtd-text-soft); line-height: 1.75; font-size: 1.08rem; }
.mtd-article-body p { margin: 0 0 1rem; }
.mtd-article-body h1, .mtd-article-body h2, .mtd-article-body h3, .mtd-article-body h4 {
  color: var(--mtd-text); font-weight: 800; margin: 1.5rem 0 0.75rem; letter-spacing: -0.02em;
}
.mtd-article-body h2 { font-size: 1.5rem; }
.mtd-article-body h3 { font-size: 1.25rem; }
.mtd-article-body ul, .mtd-article-body ol { margin: 0 0 1rem 1.25rem; padding: 0; }
.mtd-article-body li { margin: 0.35rem 0; }
.mtd-article-body a { color: var(--mtd-link); text-decoration: underline; text-underline-offset: 2px; }
.mtd-article-body a:hover { color: var(--mtd-link-hover); }
.mtd-article-body blockquote {
  border-left: 3px solid var(--mtd-btn); margin: 1rem 0; padding: 0.5rem 0 0.5rem 1rem;
  color: var(--mtd-text-muted); font-style: italic;
}
.mtd-article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.mtd-article-body th, .mtd-article-body td { border: 1px solid var(--mtd-border-solid); padding: 0.5rem 0.65rem; }
.mtd-article-body th { background: var(--mtd-bg-elevated); color: var(--mtd-text); }
.mtd-article-body img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 1rem 0; }
.mtd-article-body pre, .mtd-article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
}
.mtd-article-body pre {
  background: var(--mtd-bg-elevated); border: 1px solid var(--mtd-border-solid); border-radius: 0.5rem; padding: 0.75rem 1rem; overflow-x: auto; color: var(--mtd-text);
}
.mtd-article-body hr { border: 0; border-top: 1px solid var(--mtd-border-solid); margin: 1.5rem 0; }


/* Dashboard + admin + editor font consistency (v78) */
body.mtd-body,
body.mtd-body input,
body.mtd-body select,
body.mtd-body textarea,
body.mtd-body button,
.form-input,
.admin-table,
.admin-table th,
.admin-table td,
.card,
.btn,
.btn-secondary {
    font-family: var(--font-primary) !important;
}
.form-input {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
}
/* TinyMCE chrome matches site Inter */
.tox-tinymce,
.tox .tox-menubar,
.tox .tox-toolbar,
.tox .tox-toolbar__primary,
.tox .tox-tbtn,
.tox .tox-tbtn__select-label,
.tox .tox-label,
.tox .tox-collection__item,
.tox .tox-statusbar,
.tox .tox-promotion {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
}
.tox .tox-edit-area__iframe {
    background: #111827 !important;
}
/* Dashboard headings */
main .text-2xl, main .text-xl, main .text-3xl {
    font-family: var(--font-primary) !important;
    letter-spacing: -0.02em;
}



/* ================================================= */
/* V77 MINOR STYLE POLISH                             */
/* ================================================= */

/* Article body: Tailwind "prose" classes without @tailwindcss/typography plugin */
.prose,
.prose-invert {
    color: #cbd5e1;
    line-height: 1.75;
    max-width: none;
}
.prose :where(p) {
    margin: 0 0 1rem;
}
.prose :where(h1, h2, h3, h4) {
    color: #f8fafc;
    font-weight: 800;
    line-height: 1.3;
    margin: 1.5rem 0 0.75rem;
    letter-spacing: -0.02em;
}
.prose :where(h1) { font-size: 1.75rem; }
.prose :where(h2) { font-size: 1.4rem; }
.prose :where(h3) { font-size: 1.2rem; }
.prose :where(ul, ol) {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}
.prose :where(ul) { list-style: disc; }
.prose :where(ol) { list-style: decimal; }
.prose :where(li) { margin: 0.35rem 0; }
.prose :where(blockquote) {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid #3b82f6;
    background: rgba(15, 23, 42, 0.65);
    color: #e2e8f0;
    border-radius: 0 0.5rem 0.5rem 0;
}
.prose :where(a) {
    color: #93c5fd !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}
.prose :where(a):hover {
    color: #bfdbfe !important;
}
.prose :where(img) {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}
.prose :where(pre, code) {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}
.prose :where(pre) {
    background: #0b1220;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}
.prose :where(hr) {
    border: 0;
    border-top: 1px solid #334155;
    margin: 1.5rem 0;
}
.prose :where(table) {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.prose :where(th, td) {
    border: 1px solid #334155;
    padding: 0.5rem 0.65rem;
    text-align: left;
}
.prose :where(th) {
    background: rgba(30, 41, 59, 0.8);
    color: #f8fafc;
}

/* Readable text links in main content (global a { text-decoration:none } was too aggressive) */
.mtd-main-col .card a[href]:not(.btn):not(.btn-secondary):not(.nav-link),
.mtd-article-page .card a[href]:not(.btn):not(.btn-secondary),
main.container .card a[href]:not(.btn):not(.btn-secondary),
main.container a.text-blue-400,
main.container a.text-blue-300 {
    color: #93c5fd;
}
main.container a.text-blue-400:hover,
main.container a.text-blue-300:hover,
.mtd-main-col a.text-blue-400:hover {
    color: #bfdbfe !important;
}

/* Search inputs: remove odd browser chrome on type=search */
input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Header search field: match form language, tighter on tablet */
#mtd-header-q,
#mtd-mobile-q,
#q {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(71, 85, 105, 0.65) !important;
    color: var(--mtd-text);
}
#mtd-header-q::placeholder,
#mtd-mobile-q::placeholder,
#q::placeholder {
    color: #64748b !important;
    opacity: 1;
}

/* Footer: match site primary blue for CTA (was cyan island) */
footer .mtd-footer-cta,
footer a.mtd-footer-cta {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: #2563eb !important;
    color: #fff !important;
    font-weight: 800;
    border-radius: 8px;
    text-decoration: none !important;
}
footer a.mtd-footer-cta:hover {
    background: #3b82f6 !important;
    color: #fff !important;
}
footer {
    text-align: left;
}
@media (max-width: 639px) {
    footer .mtd-footer-right {
        text-align: left !important;
        margin-top: 0.5rem;
    }
}

/* Article page: card shadow claimed by classes but killed globally — subtle border only */
.mtd-article-page > .card,
.mtd-article-page .card {
    box-shadow: none !important;
    border-color: rgba(71, 85, 105, 0.55) !important;
}

/* Media / thin pages: section title alignment with rest of site */
.mtd-page-title {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem) !important;
    font-weight: 800 !important;
    color: var(--mtd-text);
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem !important;
    border-bottom: 1px solid var(--mtd-border, #1e293b);
    padding-bottom: 0.65rem;
}
.mtd-page-title--accent {
    color: #c4b5fd !important;
    border-bottom-color: rgba(168, 85, 247, 0.35);
}

/* Share buttons on article: consistent hit targets */
.mtd-article-page a.p-2,
.mtd-article-page button.p-2 {
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    line-height: 1;
}

/* Prevent header search from crushing logo on md–lg */
@media (min-width: 768px) and (max-width: 1023px) {
    #mtd-header-q {
        max-width: 9.5rem;
    }
}


/* ================================================= */
/* V78 HERO + STATE BOX ALIGNMENT                     */
/* Top 3 homepage heroes share article-card rules;    */
/* State hub tiles: highlight = light blue + dark blue text */
/* ================================================= */

/* --- State dropdown / hub tiles --- */
.mtd-state-hub {
    background: rgba(15, 23, 42, 0.55) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(71, 85, 105, 0.7) !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    text-decoration: none !important;
}
.mtd-state-hub:hover,
.mtd-state-hub:focus,
.mtd-state-hub:focus-visible,
.mtd-state-hub.is-active,
a.mtd-state-hub[aria-current="page"] {
    background: #dbeafe !important;          /* light blue highlight */
    color: #1e3a8a !important;               /* dark blue text */
    border-color: #2563eb !important;
    outline: none !important;
}
/* City rows inside State panel: same highlight language */
.mtd-site-header details a.block:hover,
.mtd-site-header details a.block:focus {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}
/* State nav button when open */
.mtd-site-header button.nav-link[aria-expanded="true"] {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

/* --- Hero cards = same system as article cards --- */
.mtd-home-hero .hero-card,
a.hero-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: var(--mtd-bg-card) !important;
    border: 1px solid var(--mtd-border-solid) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}
.mtd-home-hero .hero-image-wrapper,
a.hero-card .hero-image-wrapper {
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    overflow: hidden !important;
    flex: 0 0 200px !important;
}
.mtd-home-hero .hero-image,
a.hero-card .hero-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.mtd-home-hero .hero-content-wrapper,
a.hero-card .hero-content-wrapper {
    padding: 1.5rem !important;              /* match .article-card-body */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-grow: 1 !important;
    height: auto !important;
    background: transparent !important;
}
/* Title matches regular card h3 */
.mtd-home-hero .hero-title,
a.hero-card .hero-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin-bottom: 0.5rem !important;
    color: #ffffff !important;
    -webkit-text-fill-color: var(--mtd-text);
}
.mtd-home-hero .hero-card:hover .hero-title,
a.hero-card:hover .hero-title {
    color: var(--mtd-link-hover, #93c5fd) !important;
    -webkit-text-fill-color: var(--mtd-link-hover, #93c5fd) !important;
}
/* Description matches article cards */
.mtd-home-hero .hero-content-wrapper p,
a.hero-card .hero-content-wrapper p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: var(--mtd-text-muted, #94a3b8) !important;
    margin-bottom: 0.75rem !important;
}
/* Category chip: same family as cards, not a huge accent block */
.mtd-home-hero .hero-category,
a.hero-card .hero-category {
    display: inline-block;
    background: rgba(37, 99, 235, 0.15) !important;
    color: #bfdbfe !important;
    padding: 2px 10px !important;
    border-radius: 999px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 0.5rem !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}
/* Footer meta row match article cards */
.mtd-home-hero .hero-content-wrapper > div:last-child,
a.hero-card .hero-content-wrapper > div:last-child {
    margin-top: auto !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--mtd-border-solid, #334155) !important;
    font-size: 0.75rem !important;
}
.mtd-home-hero .hero-content-wrapper .text-blue-400,
a.hero-card .text-blue-400 {
    color: var(--mtd-link, #60a5fa) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

/* Kill leftover oversized hero title rules on home */
@media (min-width: 1600px) {
  .mtd-home-hero .hero-title,
  a.hero-card .hero-title {
    font-size: 1.1rem !important;
  }
}
@media (max-width: 767px) {
  .mtd-home-hero .hero-image-wrapper,
  a.hero-card .hero-image-wrapper {
    height: 200px !important;
  }
  .mtd-home-hero .hero-title,
  a.hero-card .hero-title {
    font-size: 1.05rem !important;
  }
}


/* ================================================= */
/* V79 LIGHTER LINK BLUE                              */
/* Default links: #93c5fd · hover: #bfdbfe            */
/* Buttons stay solid --mtd-btn (#2563eb)             */
/* ================================================= */
a.text-blue-400,
a.text-blue-300,
.text-blue-400:not(h3):not(h2):not(h1),
.text-blue-300:not(h3):not(h2):not(h1),
.mtd-more-link,
.nav-link.font-semibold.text-blue-300,
a.nav-link.text-blue-300 {
    color: var(--mtd-link) !important;
}
a.text-blue-400:hover,
a.text-blue-300:hover,
.mtd-more-link:hover,
.nav-link.font-semibold.text-blue-300:hover {
    color: var(--mtd-link-hover) !important;
}
/* Card CTAs / Read → */
.article-card span.text-blue-400,
.hero-card span.text-blue-400,
.hero-card span.text-green-400,
.article-card .text-blue-400,
.hero-card .text-blue-400 {
    color: var(--mtd-link) !important;
}


/* ================================================= */
/* V80 LIGHT / DARK MODE SYSTEM                       */
/* html[data-theme="light"|"dark"] set before paint   */
/* ================================================= */

html { background-color: var(--mtd-bg); }
body.mtd-body {
    background-color: var(--mtd-bg);
    color: var(--mtd-text);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mtd-site-header {
    background-color: var(--mtd-bg-header) !important;
    border-bottom-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
footer {
    background-color: var(--mtd-bg-elevated) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text-muted) !important;
}
.mtd-mobile-drawer {
    background-color: var(--mtd-bg-drawer) !important;
    border-color: var(--mtd-border-solid) !important;
}

.card, .article-card, .hero-card {
    background: var(--mtd-bg-card) !important;
    border-color: var(--mtd-border-solid) !important;
    box-shadow: var(--mtd-shadow) !important;
    color: var(--mtd-text);
}
.article-card h3,
.hero-title,
.homepage-section-title,
.mtd-page-title {
    color: var(--mtd-text);
    -webkit-text-fill-color: var(--mtd-text);
}
.article-card p,
.hero-card p,
.hero-content-wrapper p {
    color: var(--mtd-text-muted) !important;
}
.nav-link { color: var(--mtd-text-soft) !important; }
.nav-link:hover {
    color: var(--mtd-text);
    background: color-mix(in srgb, var(--mtd-btn) 12%, transparent) !important;
}
.nav-link--accent { color: var(--mtd-purple) !important; }

.form-input {
    background: var(--mtd-bg-input) !important;
    border-color: var(--mtd-border-strong) !important;
    color: var(--mtd-text);
}
.btn, .mtd-footer-cta {
    background: var(--mtd-btn) !important;
    color: var(--mtd-btn-text) !important;
}
.btn:hover, .mtd-footer-cta:hover {
    background: var(--mtd-btn-deep) !important;
    color: var(--mtd-btn-text) !important;
}
.btn-secondary {
    background: var(--mtd-bg-panel) !important;
    color: var(--mtd-text-soft) !important;
    border: 1px solid var(--mtd-border-solid) !important;
}
.mtd-quick {
    background: var(--mtd-bg-panel) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
.mtd-more-link,
a.text-blue-400, a.text-blue-300,
.text-blue-400:not(h1):not(h2):not(h3),
.text-blue-300:not(h1):not(h2):not(h3) {
    color: var(--mtd-link) !important;
}
a.text-blue-400:hover, a.text-blue-300:hover, .mtd-more-link:hover {
    color: var(--mtd-link-hover) !important;
}

.hero-category,
.mtd-home-hero .hero-category {
    background: var(--mtd-chip-bg) !important;
    color: var(--mtd-chip-text) !important;
    border-color: var(--mtd-chip-border) !important;
}

.mtd-state-hub {
    background: var(--mtd-bg-panel) !important;
    color: var(--mtd-text);
    border-color: var(--mtd-border-solid) !important;
}
.mtd-state-hub:hover,
.mtd-state-hub:focus,
.mtd-state-hub:focus-visible,
.mtd-site-header button.nav-link[aria-expanded="true"],
.mtd-site-header details a.block:hover,
.mtd-site-header details a.block:focus {
    background: var(--mtd-state-hover-bg) !important;
    color: var(--mtd-state-hover-text) !important;
    border-color: var(--mtd-btn) !important;
}

.prose, .prose-invert { color: var(--mtd-text-muted) !important; }
.prose :where(h1, h2, h3, h4) { color: var(--mtd-text); }
.prose :where(a) { color: var(--mtd-link) !important; }
.prose :where(a):hover { color: var(--mtd-link-hover) !important; }
.prose :where(blockquote) {
    background: var(--mtd-bg-elevated) !important;
    color: var(--mtd-text-soft) !important;
    border-left-color: var(--mtd-btn) !important;
}
.prose :where(pre), .prose :where(th) {
    background: var(--mtd-bg-elevated) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
.prose :where(th, td) { border-color: var(--mtd-border-solid) !important; }

.ad-unit, .ad-widget-container.ad-unit {
    background: var(--mtd-bg-card) !important;
    border-color: var(--mtd-border-solid) !important;
}

/* Theme toggle */
.mtd-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--mtd-border-solid);
    background: var(--mtd-bg-panel);
    color: var(--mtd-text);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.mtd-theme-toggle:hover {
    border-color: var(--mtd-btn);
    color: var(--mtd-link);
}
.mtd-theme-toggle:focus-visible {
    outline: 2px solid var(--mtd-link);
    outline-offset: 2px;
}
.mtd-theme-toggle__icon { font-size: 1.05rem; line-height: 1; }
/* Show the mode you will switch TO */
html[data-theme="dark"] .mtd-theme-toggle__icon--sun { display: inline; }
html[data-theme="dark"] .mtd-theme-toggle__icon--moon { display: none; }
html[data-theme="light"] .mtd-theme-toggle__icon--sun { display: none; }
html[data-theme="light"] .mtd-theme-toggle__icon--moon { display: inline; }

/* Tailwind utility remaps for LIGHT */
html[data-theme="light"] .bg-gray-900,
html[data-theme="light"] .bg-gray-900\/95,
html[data-theme="light"] .bg-gray-900\/80,
html[data-theme="light"] .bg-gray-900\/50,
html[data-theme="light"] .bg-gray-950 {
    background-color: var(--mtd-bg);
}
html[data-theme="light"] .bg-gray-800,
html[data-theme="light"] .bg-gray-800\/80,
html[data-theme="light"] .bg-gray-800\/60,
html[data-theme="light"] .bg-gray-800\/50,
html[data-theme="light"] .bg-gray-800\/30 {
    background-color: var(--mtd-bg-panel) !important;
}
html[data-theme="light"] .bg-gray-700,
html[data-theme="light"] .bg-slate-800,
html[data-theme="light"] .bg-slate-900 {
    background-color: var(--mtd-bg-elevated) !important;
}

html[data-theme="light"] .text-white { color: var(--mtd-text); }
html[data-theme="light"] .bg-blue-600,
html[data-theme="light"] .bg-blue-500,
html[data-theme="light"] .bg-blue-700,
html[data-theme="light"] .bg-blue-600.text-white,
html[data-theme="light"] .bg-blue-500.text-white,
html[data-theme="light"] .btn,
html[data-theme="light"] .mtd-footer-cta,
html[data-theme="light"] a.bg-blue-600,
html[data-theme="light"] button.bg-blue-600,
html[data-theme="light"] .p-2.bg-blue-600 {
    color: #ffffff !important;
}
html[data-theme="light"] .text-gray-100,
html[data-theme="light"] .text-gray-200 { color: var(--mtd-text); }
html[data-theme="light"] .text-gray-300 { color: var(--mtd-text-soft) !important; }
html[data-theme="light"] .text-gray-400,
html[data-theme="light"] .text-slate-400 { color: var(--mtd-text-muted) !important; }
html[data-theme="light"] .text-gray-500,
html[data-theme="light"] .text-gray-600,
html[data-theme="light"] .text-slate-500 { color: var(--mtd-text-faint) !important; }

html[data-theme="light"] .border-gray-600,
html[data-theme="light"] .border-gray-700,
html[data-theme="light"] .border-gray-800,
html[data-theme="light"] .border-slate-600,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .border-slate-800 {
    border-color: var(--mtd-border-solid) !important;
}

html[data-theme="light"] .article-card h3,
html[data-theme="light"] .hero-title,
html[data-theme="light"] .homepage-section-title,
html[data-theme="light"] .mtd-page-title,
html[data-theme="light"] .mtd-home-hero .hero-title,
html[data-theme="light"] a.hero-card .hero-title {
    color: var(--mtd-text);
    -webkit-text-fill-color: var(--mtd-text);
}
html[data-theme="light"] .mtd-home-hero .hero-card:hover .hero-title,
html[data-theme="light"] a.hero-card:hover .hero-title,
html[data-theme="light"] .article-card:hover h3 {
    color: var(--mtd-link-hover) !important;
    -webkit-text-fill-color: var(--mtd-link-hover) !important;
}

html[data-theme="light"] .mtd-burger {
    background: var(--mtd-bg-panel) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
html[data-theme="light"] #mtd-header-q,
html[data-theme="light"] #mtd-mobile-q,
html[data-theme="light"] #q {
    background: var(--mtd-bg-input) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
html[data-theme="light"] #mtd-header-q::placeholder,
html[data-theme="light"] #mtd-mobile-q::placeholder,
html[data-theme="light"] #q::placeholder {
    color: var(--mtd-text-faint) !important;
}

html[data-theme="light"] .mtd-mobile-tile {
    background: var(--mtd-bg-panel) !important;
    border-color: var(--mtd-border-solid) !important;
    color: var(--mtd-text);
}
html[data-theme="light"] .mtd-mobile-tile.bg-blue-600 {
    background: var(--mtd-btn) !important;
    color: #fff !important;
    border-color: var(--mtd-btn) !important;
}

html[data-theme="light"] .text-green-400 { color: #15803d !important; }
html[data-theme="light"] .text-red-400,
html[data-theme="light"] .text-red-300 { color: #b91c1c !important; }
html[data-theme="light"] .text-amber-300,
html[data-theme="light"] .text-amber-400 { color: #b45309 !important; }
html[data-theme="light"] .text-emerald-300 { color: #047857 !important; }
html[data-theme="light"] .text-purple-400 { color: var(--mtd-purple) !important; }

html[data-theme="light"] .bg-green-900\/40 {
    background: #dcfce7 !important;
    color: #14532d !important;
    border-color: #86efac !important;
}
html[data-theme="light"] .bg-red-900\/40 {
    background: #fee2e2 !important;
    color: #7f1d1d !important;
    border-color: #fca5a5 !important;
}
html[data-theme="light"] .bg-blue-900\/40,
html[data-theme="light"] .bg-blue-900 {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

/* V74 panel remaps that force dark — re-assert light tokens */
html[data-theme="light"] .mtd-main-col .bg-gray-900,
html[data-theme="light"] .mtd-main-col .bg-gray-800,
html[data-theme="light"] .mtd-home .bg-gray-800 {
    background-color: var(--mtd-bg-panel) !important;
}
html[data-theme="light"] .mtd-main-col .text-gray-200,
html[data-theme="light"] .mtd-home .text-gray-200 {
    color: var(--mtd-text);
}
html[data-theme="light"] .mtd-main-col .text-gray-300,
html[data-theme="light"] .mtd-home .text-gray-300 {
    color: var(--mtd-text-soft) !important;
}

@media (prefers-reduced-motion: reduce) {
    .card, .article-card, .hero-card,
    .article-image, .hero-image,
    body.mtd-body { transition: none !important; }
    .card:hover, .article-card:hover, .hero-card:hover { transform: none !important; }
    .article-card:hover .article-image,
    .hero-card:hover .hero-image { transform: none !important; }
}
:focus-visible {
    outline: 2px solid var(--mtd-link);
    outline-offset: 2px;
}


/* ================================================= */
/* V81 HEADINGS + TICKER THEME                        */
/* ================================================= */

/* Section / page headings — always primary text color (never link blue) */
.homepage-section-title,
.mtd-page-title,
h1.homepage-section-title,
h2.homepage-section-title,
main h1,
main h2.homepage-section-title,
.mtd-main-col h1,
.mtd-main-col h2.homepage-section-title,
.mtd-home h2.homepage-section-title {
    color: var(--mtd-text);
    -webkit-text-fill-color: var(--mtd-text);
    background: none !important;
    background-image: none !important;
    text-shadow: none !important;
    filter: none !important;
}
.homepage-section-title {
    border-bottom: 1px solid var(--mtd-border-solid) !important;
}

/* Card titles */
.article-card h3,
a.article-card h3,
.hero-title,
a.hero-card .hero-title {
    color: var(--mtd-text);
    -webkit-text-fill-color: var(--mtd-text);
}
.article-card:hover h3,
.hero-card:hover .hero-title {
    color: var(--mtd-link) !important;
    -webkit-text-fill-color: var(--mtd-link) !important;
}

/* Footer hard colors → tokens */
footer.mtd-site-footer,
footer {
    background-color: var(--mtd-bg-elevated) !important;
    color: var(--mtd-text-muted) !important;
    border-color: var(--mtd-border-solid) !important;
}
footer h4,
footer .mtd-footer-heading {
    color: var(--mtd-text);
}

footer .mtd-footer-muted { color: var(--mtd-text-faint) !important; }


/* ================================================= */
/* V82 TICKER RESTORE — always dark strip (matches TV */
/* dark colorTheme embed that ships with the page)   */
/* ================================================= */
.mtd-ticker-top,
.mtd-ticker-bottom,
.tradingview-widget-container.mtd-ticker-top,
.tradingview-widget-container.mtd-ticker-bottom {
    background-color: #0B0F19 !important;
    border-color: #1e293b !important;
    color: #e2e8f0 !important;
    min-height: 42px;
}
/* Do not force light ticker bg from light theme tokens */
html[data-theme="light"] .mtd-ticker-top,
html[data-theme="light"] .mtd-ticker-bottom,
html[data-theme="light"] .tradingview-widget-container.mtd-ticker-top,
html[data-theme="light"] .tradingview-widget-container.mtd-ticker-bottom {
    background-color: #0B0F19 !important;
    border-color: #1e293b !important;
}


/* ================================================= */
/* V88 TICKER CLEAN — dark TV widget, no iframe hacks */
/* ================================================= */
.mtd-ticker-top,
.mtd-ticker-bottom,
.tradingview-widget-container.mtd-ticker-top,
.tradingview-widget-container.mtd-ticker-bottom {
    width: 100%;
    background-color: #131722 !important; /* TradingView dark canvas */
    border: 0 !important;
    border-bottom: 1px solid #1e222d !important;
    min-height: 46px;
    overflow: hidden;
    line-height: 0;
}
.mtd-ticker-bottom {
    border-bottom: 0 !important;
    border-top: 1px solid #1e222d !important;
}
/* Let TradingView size its own iframe — do not force width/transform/direction */
.mtd-ticker-top .tradingview-widget-container__widget,
.mtd-ticker-bottom .tradingview-widget-container__widget {
    width: 100%;
    min-height: 46px;
}
html[data-theme="light"] .mtd-ticker-top,
html[data-theme="light"] .mtd-ticker-bottom {
    background-color: #131722 !important;
}


/* ================================================= */
/* V89 TICKER MINIMAL — solid dark TradingView strip  */
/* ================================================= */
.tradingview-widget-container.mtd-ticker-top,
.tradingview-widget-container.mtd-ticker-bottom {
    width: 100% !important;
    background: #131722 !important;
    margin: 0;
    padding: 0;
}
html[data-theme="light"] .tradingview-widget-container.mtd-ticker-top,
html[data-theme="light"] .tradingview-widget-container.mtd-ticker-bottom,
html[data-theme="dark"] .tradingview-widget-container.mtd-ticker-top,
html[data-theme="dark"] .tradingview-widget-container.mtd-ticker-bottom {
    background: #131722 !important;
}


/* Center/global top headline on the home hero row */
.mtd-home-hero .hero-card--global {
    border-color: rgba(96, 165, 250, 0.55) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.35);
}
.mtd-home-hero .hero-card--global .hero-category {
    background: var(--mtd-chip-bg) !important;
    color: var(--mtd-chip-text) !important;
}
@media (max-width: 1023px) {
    .mtd-home-hero .hero-card--global { order: -1; }
}
@media (min-width: 1024px) {
    .mtd-home-hero .mtd-hero-grid {
        grid-template-columns: 1fr 1.28fr 1fr;
        align-items: stretch;
    }
    .mtd-home-hero .hero-card--global .hero-image-wrapper,
    .mtd-home-hero .hero-card--global .hero-image-wrapper {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
        flex-basis: 240px !important;
    }
    .mtd-home-hero .hero-card--global .hero-title {
        font-size: 1.2rem !important;
    }
}


/* --- V82 Layout & Component Stabilizations --- */
main.container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.article-card img {
    object-fit: cover;
    aspect-ratio: 16/9;
}
.btn, .btn-primary {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s;
    text-align: center;
}
.btn-primary {
    background-color: var(--mtd-btn);
    color: #fff;
    border: none;
}
.btn-primary:hover {
    background-color: var(--mtd-btn-hover);
    color: #fff;
}


/* --- V83 Container and Layout fixes from Styling Audit --- */
.card {
    background-color: var(--mtd-bg-card);
    border: 1px solid var(--mtd-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.wrap, .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.grid-system {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .grid-system {
        grid-template-columns: 1fr;
    }
}


/* ================================================= */
/* V152 SOFT BLUE + EAST BENCH RIDGE                 */
/* Looking east from Bountiful: Francis Peak north,  */
/* broad Bountiful Peak, Mueller Park notch, then    */
/* the ridge falling south toward the valley.        */
/* ================================================= */
body.mtd-body {
    font-size: 17px;
    line-height: 1.65;
    background-color: var(--mtd-bg);
    background-image: linear-gradient(180deg, var(--mtd-sky-top) 0%, var(--mtd-bg) 320px);
    background-attachment: fixed;
}
.mtd-ridge {
    display: block;
    width: 100%;
    height: 92px;
    margin: 0;
    pointer-events: none;
    background-color: var(--mtd-ridge);
    -webkit-mask-image: url("/mtd-ridge.svg?v=153");
    mask-image: url("/mtd-ridge.svg?v=153");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center bottom;
    mask-position: center bottom;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}
@media (max-width: 640px) {
    .mtd-ridge { height: 60px; }
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.mtd-site-header a[title*="home"] span,
.mtd-site-header a[title*="Home"] span,
.mtd-main-col section.widget h3,
.mtd-main-col .widget h3,
.nav-link:hover,
.nav-link--accent:hover,
.mtd-quick:hover {
    color: var(--mtd-text) !important;
    -webkit-text-fill-color: var(--mtd-text);
}
.mtd-article-body { color: var(--mtd-text-soft) !important; -webkit-text-fill-color: var(--mtd-text-soft); }
.mtd-article-body h1,
.mtd-article-body h2,
.mtd-article-body h3,
.mtd-article-body h4 { color: var(--mtd-text) !important; -webkit-text-fill-color: var(--mtd-text); }
.mtd-article-body a { color: var(--mtd-link) !important; -webkit-text-fill-color: var(--mtd-link); }
.mtd-article-body a:hover { color: var(--mtd-link-hover) !important; }
.nav-link:hover,
.mtd-quick:hover {
    background: color-mix(in srgb, var(--mtd-btn) 14%, transparent) !important;
}
html[data-theme="light"] .mtd-home h3.text-blue-300,
html[data-theme="light"] .mtd-home h3.text-green-300,
html[data-theme="light"] .text-blue-300,
html[data-theme="light"] .text-blue-400 {
    color: var(--mtd-link) !important;
    -webkit-text-fill-color: var(--mtd-link);
}
html[data-theme="light"] .mtd-home h3.text-amber-300 { color: #b45309 !important; -webkit-text-fill-color: #b45309; }
html[data-theme="light"] .hero-category,
html[data-theme="light"] .mtd-home-hero .hero-card--global .hero-category,
html[data-theme="dark"] .hero-category,
html[data-theme="dark"] .mtd-home-hero .hero-card--global .hero-category {
    color: var(--mtd-chip-text) !important;
    -webkit-text-fill-color: var(--mtd-chip-text);
    background: var(--mtd-chip-bg) !important;
}
footer a { color: var(--mtd-link) !important; }
footer a.mtd-footer-cta,
.btn,
.mtd-footer-cta,
a.bg-blue-600,
button.bg-blue-600,
.bg-blue-600,
.bg-blue-500,
.bg-blue-700 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}
html[data-theme="dark"] .bg-gray-950,
html[data-theme="dark"] .bg-gray-900,
html[data-theme="dark"] .bg-gray-900\/95,
html[data-theme="dark"] .bg-gray-900\/80,
html[data-theme="dark"] .bg-gray-900\/50,
html[data-theme="dark"] .bg-black,
html[data-theme="dark"] .bg-black\/40 {
    background-color: var(--mtd-bg) !important;
}
html[data-theme="dark"] .bg-gray-800,
html[data-theme="dark"] .bg-gray-800\/80,
html[data-theme="dark"] .bg-gray-800\/60,
html[data-theme="dark"] .bg-gray-800\/50,
html[data-theme="dark"] .bg-slate-800,
html[data-theme="dark"] .bg-slate-900,
html[data-theme="dark"] .bg-slate-900\/50 {
    background-color: var(--mtd-bg-panel) !important;
}
html[data-theme="dark"] .bg-gray-700,
html[data-theme="dark"] .bg-slate-700 {
    background-color: #31587A !important;
}
html[data-theme="light"] .bg-slate-900\/50,
html[data-theme="light"] .bg-black,
html[data-theme="light"] .bg-black\/40 {
    background-color: var(--mtd-bg-elevated) !important;
    color: var(--mtd-text);
}
html[data-theme="dark"] .text-white:not(.btn):not(.mtd-footer-cta):not(.bg-blue-600):not(.bg-blue-500):not(.bg-blue-700),
html[data-theme="light"] .text-white:not(.btn):not(.mtd-footer-cta):not(.bg-blue-600):not(.bg-blue-500):not(.bg-blue-700) {
    color: var(--mtd-text) !important;
}

/* ================================================= */
/* V153 RIDGE FIT + LIGHT MODE LOCKS                 */
/* Full ridgeline sits in the masthead band.         */
/* Hero titles and article headlines follow theme.   */
/* ================================================= */
.mtd-ridge {
    height: 92px;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
}
@media (max-width: 640px) {
    .mtd-ridge { height: 60px; }
}
html[data-theme="light"] .mtd-home-hero .hero-title,
html[data-theme="dark"] .mtd-home-hero .hero-title,
html[data-theme="light"] a.hero-card .hero-title,
html[data-theme="dark"] a.hero-card .hero-title,
html[data-theme="light"] h1.text-white,
html[data-theme="dark"] h1.text-white {
    color: var(--mtd-text) !important;
    -webkit-text-fill-color: var(--mtd-text);
}
html[data-theme="light"] .mtd-mobile-link--accent {
    color: var(--mtd-purple) !important;
    -webkit-text-fill-color: var(--mtd-purple);
}
.ad-unit__slogan-text { color: var(--mtd-text-muted) !important; }
.ad-unit__cta-title { color: var(--mtd-link) !important; }
.ad-unit__cta-sub { color: var(--mtd-text-muted) !important; }
.ad-unit__media--cta {
    background: color-mix(in srgb, var(--mtd-btn) 12%, var(--mtd-bg-card)) !important;
    border-color: var(--mtd-border-strong) !important;
}
.btn-secondary:hover {
    background: var(--mtd-state-hover-bg) !important;
    color: var(--mtd-text) !important;
    -webkit-text-fill-color: var(--mtd-text);
}
html[data-theme="light"] .mtd-main-col a:not(.article-card):not(.hero-card):not(.btn):not(.mtd-quick):hover {
    filter: none;
}

/* ================================================= */
/* V154 PAGE FIT — 8 ads, desktop rails, phone stack */
/* ================================================= */
.mtd-shell {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}
.mtd-page-wrap {
    width: 100%;
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;
}
.mtd-main-col {
    min-width: 0;
}
.mtd-article-body {
    max-width: 46rem;
}
@media (max-width: 639px) {
    .mtd-main-col {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
    .mtd-inline-ad .ad-unit {
        max-width: min(100%, 336px);
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }
    .mtd-inline-ad .ad-unit__media,
    .mtd-inline-ad .ad-unit__asset {
        flex-basis: 180px;
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
}
/* Phones: one story column. Tablets: two. Desktop beside the rails: three. */
@media (min-width: 640px) {
    .mtd-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) and (max-width: 1279px) {
    .mtd-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mtd-main-col .lg\:grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .mtd-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mtd-main-col .lg\:grid-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mtd-side-banners { display: flex !important; }
}
@media (max-width: 1279px) {
    .mtd-page-wrap { flex-direction: column; }
    .mtd-side-banners {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        width: 100% !important;
        max-width: 100%;
        position: static !important;
        top: auto;
        gap: 0.75rem;
        padding: 0.35rem 0 0.15rem;
    }
}
@media (max-width: 639px) {
    .mtd-side-banners {
        flex-direction: column;
        align-items: center;
    }
}
.mtd-feed .mtd-inline-ad { grid-column: 1 / -1; }
.mtd-inline-ad:not(:has(.ad-unit)) { display: none !important; }
@media (min-width: 1280px) {
    .mtd-inline-ad { display: none !important; }
}

/* V155 HANDSET RAILS — same ads, stacked under 1280px */

/* V156 brand badge */
.mtd-brand-logo {
    display: block;
    width: 172px;
    max-width: 46vw;
    height: auto;
    object-fit: contain;
    background: #f6f3ec;
    border-radius: 12px;
}
@media (min-width: 640px) {
    .mtd-brand-logo { width: 230px; max-width: none; }
}

/* V157 dark masthead */
.mtd-brand-logo--light { background: #f6f3ec; }
.mtd-brand-logo--dark { background: #1c242b; }
html[data-theme="dark"] .mtd-brand-logo--light { display: none !important; }
html[data-theme="light"] .mtd-brand-logo--dark { display: none !important; }
