/* ==========================================================================
   MagicMedia — contrast and page-background corrections
   --------------------------------------------------------------------------
   Problems this file fixes:

   1. Light themes (Astra, Elementor, Twenty* defaults) paint the page, the
      content wrapper, and the entry title WHITE, so MagicMedia pages showed
      white bands around and above the dark plugin panels.

   2. Light themes set a dark body text colour. Any element the plugin did not
      explicitly colour inherited that dark ink and became invisible on the
      plugin's near-black panels.

   3. Several plugin colours were too low-contrast on dark: #888, #999,
      #7a7a7a placeholders, #ddd on #111, and muted badge text.

   Everything here is scoped to `.mm-plugin-page` (added by
   MM_Shortcodes::add_body_class()) or to MagicMedia containers, so no other
   page on the site is affected.

   Contrast ratios are asserted by tests/contrast-check.py.
   ========================================================================== */

/* ---------- 1. Tokens (WCAG AA verified) -------------------------------- */
:root {
  --mm-contrast-page: #070708;
  --mm-contrast-panel: #0f0f11;
  --mm-contrast-panel-2: #16161a;
  --mm-contrast-ink: #f5f6f7;
  --mm-contrast-ink-soft: #d8dbe0;
  --mm-contrast-muted: #b9bec6;
  --mm-contrast-faint: #a3a9b2;
  --mm-contrast-gold: #ffd166;
  --mm-contrast-gold-strong: #ffcc4a;
  --mm-contrast-line: #6b7280;
  --mm-contrast-line-soft: #4a4f58;
  --mm-contrast-success: #8ff0b4;
  --mm-contrast-error: #ffa8a8;
  --mm-contrast-warning: #ffdb8a;
  --mm-contrast-chip: #24262b;
}

/* Harmonic overrides for the legacy-brand layer. legacy-brand.css loads
   first and redefines these tokens inside the containers; re-declaring them
   here (same specificity, later in the cascade) keeps every component on the
   verified palette without touching legacy-brand.css itself. */
.mm-page, .mm-dashboard, .mm-admin, .mm-store,
.mm-wrapper, .mm-store-wrapper, .mm-dashboard-wrapper, .mm-admin-wrapper {
  --mm-muted: var(--mm-contrast-muted);
  --mm-line: var(--mm-contrast-line);
  --mm-line-soft: var(--mm-contrast-line-soft);
  --mm-legacy-muted: var(--mm-contrast-muted);
}

/* ---------- 2. Kill the white page chrome on MagicMedia pages ---------- */
body.mm-plugin-page,
body.mm-plugin-page .site,
body.mm-plugin-page .site-content,
body.mm-plugin-page #content,
body.mm-plugin-page #primary,
body.mm-plugin-page .content-area,
body.mm-plugin-page .ast-container,
body.mm-plugin-page .ast-separate-container,
body.mm-plugin-page .ast-separate-container .ast-article-post,
body.mm-plugin-page .ast-separate-container .ast-article-single,
body.mm-plugin-page .entry-content,
body.mm-plugin-page .entry-content-wrap,
body.mm-plugin-page .post-content,
body.mm-plugin-page .elementor-section-wrap,
body.mm-plugin-page .elementor-location-single,
body.mm-plugin-page .elementor-widget-shortcode,
body.mm-plugin-page .elementor-widget-shortcode > .elementor-widget-container,
body.mm-plugin-page .woocommerce,
body.mm-plugin-page .woocommerce-page {
  background-color: var(--mm-contrast-page) !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Astra's separate-container layout adds a white card with padding. */
body.mm-plugin-page.ast-separate-container #primary,
body.mm-plugin-page.ast-separate-container .ast-article-single,
body.mm-plugin-page.ast-separate-container .ast-article-post {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* Page title, breadcrumbs and entry meta inherit dark ink on light themes. */
body.mm-plugin-page .entry-title,
body.mm-plugin-page .page-title,
body.mm-plugin-page h1.entry-title,
body.mm-plugin-page .ast-archive-description,
body.mm-plugin-page .breadcrumbs,
body.mm-plugin-page .ast-breadcrumbs,
body.mm-plugin-page .entry-meta,
body.mm-plugin-page .entry-footer,
body.mm-plugin-page .post-navigation a {
  color: var(--mm-contrast-ink) !important;
  background-color: transparent !important;
  border-color: var(--mm-contrast-line-soft) !important;
}
body.mm-plugin-page .entry-meta a,
body.mm-plugin-page .breadcrumbs a,
body.mm-plugin-page .ast-breadcrumbs a,
body.mm-plugin-page .post-navigation a:hover {
  color: var(--mm-contrast-gold) !important;
}

/* Headings and body copy outside the plugin containers on those pages. */
body.mm-plugin-page .entry-content > h1,
body.mm-plugin-page .entry-content > h2,
body.mm-plugin-page .entry-content > h3,
body.mm-plugin-page .entry-content > h4,
body.mm-plugin-page .entry-content > p,
body.mm-plugin-page .entry-content > ul,
body.mm-plugin-page .entry-content > ol {
  color: var(--mm-contrast-ink);
}
body.mm-plugin-page .entry-content > p { color: var(--mm-contrast-ink-soft); }

/* ---------- 3. Defensive text colour inside plugin containers ----------
   Stops a light theme's dark ink from landing on our dark panels. Only
   elements that do not already carry their own colour are affected, and each
   rule sits at low specificity so component styles still win. */
.mm-page, .mm-dashboard, .mm-admin, .mm-store,
.mm-wrapper, .mm-store-wrapper, .mm-dashboard-wrapper, .mm-admin-wrapper {
  color: var(--mm-contrast-ink);
  background-color: var(--mm-contrast-panel);
}
.mm-page p, .mm-dashboard p, .mm-admin p, .mm-store p,
.mm-page li, .mm-dashboard li, .mm-admin li, .mm-store li,
.mm-page dd, .mm-dashboard dd, .mm-admin dd,
.mm-page figcaption, .mm-dashboard figcaption,
.mm-page blockquote, .mm-dashboard blockquote {
  color: var(--mm-contrast-ink-soft);
}
.mm-page small, .mm-dashboard small, .mm-admin small, .mm-store small,
.mm-page .mm-fineprint, .mm-dashboard .mm-fineprint, .mm-admin .mm-fineprint,
.mm-page .mm-help, .mm-dashboard .mm-help,
.mm-page .mm-lead, .mm-dashboard .mm-lead {
  color: var(--mm-contrast-muted);
}
.mm-page strong, .mm-dashboard strong, .mm-admin strong, .mm-store strong,
.mm-page b, .mm-dashboard b, .mm-admin b {
  color: var(--mm-contrast-ink);
}
.mm-page label, .mm-dashboard label, .mm-admin label, .mm-store label,
.mm-page legend, .mm-dashboard legend, .mm-admin legend,
.mm-page .mm-input, .mm-dashboard .mm-input, .mm-admin .mm-input,
.mm-page select, .mm-dashboard select, .mm-admin select,
.mm-page textarea, .mm-dashboard textarea, .mm-admin textarea {
  color: var(--mm-contrast-ink);
}
.mm-page code, .mm-dashboard code, .mm-admin code, .mm-store code {
  color: var(--mm-contrast-gold);
  background: #101013;
}
.mm-page h1, .mm-page h2, .mm-page h3, .mm-page h4, .mm-page h5, .mm-page h6,
.mm-dashboard h1, .mm-dashboard h2, .mm-dashboard h3, .mm-dashboard h4,
.mm-admin h1, .mm-admin h2, .mm-admin h3, .mm-admin h4,
.mm-store h1, .mm-store h2, .mm-store h3, .mm-store h4 {
  color: var(--mm-contrast-ink);
}

/* ---------- 4. Links, focus, and visited state -------------------------- */
.mm-page a, .mm-dashboard a, .mm-admin a, .mm-store a {
  color: var(--mm-contrast-gold);
  text-decoration-color: rgba(255, 209, 102, .45);
}
.mm-page a:visited, .mm-dashboard a:visited, .mm-admin a:visited, .mm-store a:visited {
  color: var(--mm-contrast-gold);
}
.mm-page a:hover, .mm-dashboard a:hover, .mm-admin a:hover, .mm-store a:hover {
  color: #fff2cc;
  text-decoration: underline;
}
.mm-page a:focus-visible, .mm-dashboard a:focus-visible, .mm-admin a:focus-visible,
.mm-page button:focus-visible, .mm-dashboard button:focus-visible,
.mm-page .mm-input:focus-visible, .mm-dashboard .mm-input:focus-visible,
.mm-page .mm-button:focus-visible, .mm-dashboard .mm-button:focus-visible {
  outline: 2px solid var(--mm-contrast-gold);
  outline-offset: 2px;
}

/* ---------- 5. Forms: no white boxes, no invisible placeholder ---------- */
.mm-page .mm-input, .mm-dashboard .mm-input, .mm-admin .mm-input,
.mm-page input[type="text"], .mm-page input[type="email"], .mm-page input[type="tel"],
.mm-page input[type="number"], .mm-page input[type="password"], .mm-page input[type="search"],
.mm-page input[type="url"], .mm-page textarea, .mm-page select,
.mm-dashboard input[type="text"], .mm-dashboard input[type="email"],
.mm-dashboard input[type="number"], .mm-dashboard input[type="password"],
.mm-dashboard input[type="url"], .mm-dashboard textarea,
.mm-admin input[type="text"], .mm-admin input[type="email"],
.mm-admin input[type="number"], .mm-admin select, .mm-admin textarea {
  background-color: #0b0b0d !important;
  color: var(--mm-contrast-ink) !important;
  border: 1px solid var(--mm-contrast-line) !important;
  -webkit-text-fill-color: var(--mm-contrast-ink);
}
.mm-page ::placeholder, .mm-dashboard ::placeholder, .mm-admin ::placeholder {
  color: var(--mm-contrast-faint) !important;
  opacity: 1;
}
.mm-page select option, .mm-dashboard select option, .mm-admin select option {
  background-color: #0b0b0d;
  color: var(--mm-contrast-ink);
}
/* Chrome autofill would otherwise paint the field white. */
.mm-page input:-webkit-autofill,
.mm-dashboard input:-webkit-autofill,
.mm-page input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0b0b0d inset;
  -webkit-text-fill-color: var(--mm-contrast-ink);
  caret-color: var(--mm-contrast-ink);
}

/* ---------- 6. Buttons --------------------------------------------------- */
.mm-page .mm-button, .mm-dashboard .mm-button, .mm-admin .mm-button, .mm-store .mm-button {
  color: var(--mm-contrast-ink);
  background: #1b1d22;
  border: 1px solid var(--mm-contrast-line);
}
.mm-page .mm-button--gold, .mm-dashboard .mm-button--gold, .mm-admin .mm-button--gold,
.mm-page .mm-button--primary, .mm-dashboard .mm-button--primary,
.woocommerce .mm-page button[type="submit"] {
  background: var(--mm-contrast-gold-strong);
  border-color: var(--mm-contrast-gold-strong);
  color: #0b0b0b;
}
.mm-page .mm-button--gold:hover, .mm-dashboard .mm-button--gold:hover,
.mm-admin .mm-button--gold:hover {
  background: #ffe08a;
  border-color: #ffe08a;
  color: #000;
}
.mm-page .mm-button--ghost, .mm-dashboard .mm-button--ghost, .mm-admin .mm-button--ghost {
  background: transparent;
  border-color: var(--mm-contrast-line);
  color: var(--mm-contrast-ink);
}
.mm-page .mm-button--ghost:hover, .mm-dashboard .mm-button--ghost:hover {
  border-color: var(--mm-contrast-gold);
  color: var(--mm-contrast-gold);
}

/* ---------- 7. Tables, chips, badges, notices --------------------------- */
.mm-page .mm-table, .mm-dashboard .mm-table, .mm-admin .mm-table, .mm-store .mm-table {
  color: var(--mm-contrast-ink-soft);
}
.mm-page .mm-table th, .mm-dashboard .mm-table th, .mm-admin .mm-table th {
  color: var(--mm-contrast-gold);
  border-bottom-color: var(--mm-contrast-line);
}
.mm-page .mm-table td, .mm-dashboard .mm-table td, .mm-admin .mm-table td,
.mm-store .mm-table td {
  color: var(--mm-contrast-ink-soft);
  border-bottom-color: var(--mm-contrast-line-soft);
}
.mm-page .mm-table tbody tr:hover td,
.mm-dashboard .mm-table tbody tr:hover td {
  background: #14161a;
  color: var(--mm-contrast-ink);
}

.mm-page .mm-status, .mm-dashboard .mm-status, .mm-admin .mm-status,
.mm-page .mm-badge, .mm-dashboard .mm-badge,
.mm-page .mm-tree-badge, .mm-dashboard .mm-tree-badge {
  background: var(--mm-contrast-chip);
  color: var(--mm-contrast-ink);
}
.mm-page .mm-status--active, .mm-dashboard .mm-status--active, .mm-admin .mm-status--active {
  background: #16301f;
  color: var(--mm-contrast-success);
  border: 1px solid #2c5a3a;
}
.mm-page .mm-status--error, .mm-dashboard .mm-status--error, .mm-admin .mm-status--error {
  background: #331b1b;
  color: var(--mm-contrast-error);
  border: 1px solid #5c2c2c;
}
.mm-page .mm-status--warning, .mm-dashboard .mm-status--warning {
  background: #322814;
  color: var(--mm-contrast-warning);
  border: 1px solid #5c4a20;
}
.mm-page .mm-status--muted, .mm-dashboard .mm-status--muted, .mm-admin .mm-status--muted {
  background: #22242a;
  color: var(--mm-contrast-muted);
}

.mm-page .mm-notice, .mm-dashboard .mm-notice, .mm-admin .mm-notice {
  color: var(--mm-contrast-ink-soft);
  background: var(--mm-contrast-panel-2);
  border-color: var(--mm-contrast-line);
}
.mm-page .mm-notice--success, .mm-dashboard .mm-notice--success {
  background: #12251a; color: var(--mm-contrast-success); border-color: #2c5a3a;
}
.mm-page .mm-notice--error, .mm-dashboard .mm-notice--error {
  background: #2a1717; color: var(--mm-contrast-error); border-color: #5c2c2c;
}
.mm-page .mm-notice--warning, .mm-dashboard .mm-notice--warning {
  background: #2a2314; color: var(--mm-contrast-warning); border-color: #5c4a20;
}
.mm-page .mm-notice a, .mm-dashboard .mm-notice a { color: var(--mm-contrast-gold); }

/* ---------- 8. Trees, cards, tabs --------------------------------------- */
.mm-page .mm-card, .mm-dashboard .mm-card, .mm-admin .mm-card, .mm-store .mm-card,
.mm-page .mm-stat, .mm-dashboard .mm-stat, .mm-admin .mm-stat {
  color: var(--mm-contrast-ink-soft);
  background: var(--mm-contrast-panel-2);
  border-color: var(--mm-contrast-line-soft);
}
.mm-page .mm-card h2, .mm-dashboard .mm-card h2, .mm-admin .mm-card h2,
.mm-page .mm-card h3, .mm-dashboard .mm-card h3 {
  color: var(--mm-contrast-ink);
}
.mm-page .mm-tabs__link, .mm-dashboard .mm-tabs__link, .mm-admin .mm-tabs__link {
  color: var(--mm-contrast-muted);
  border-color: transparent;
}
.mm-page .mm-tabs__link:hover, .mm-dashboard .mm-tabs__link:hover,
.mm-admin .mm-tabs__link:hover {
  color: var(--mm-contrast-ink);
  border-color: var(--mm-contrast-line);
}
.mm-page .mm-tabs__link.is-active, .mm-dashboard .mm-tabs__link.is-active,
.mm-admin .mm-tabs__link.is-active {
  color: #0b0b0b;
  background: var(--mm-contrast-gold-strong);
  border-color: var(--mm-contrast-gold-strong);
}

.mm-page .mm-tree-node, .mm-dashboard .mm-tree-node {
  color: var(--mm-contrast-ink-soft);
  background: #121418;
  border-color: var(--mm-contrast-line-soft);
}
.mm-page .mm-tree-node__title, .mm-dashboard .mm-tree-node__title {
  color: var(--mm-contrast-ink);
}
.mm-page .mm-tree-node__meta, .mm-dashboard .mm-tree-node__meta,
.mm-page .mm-tree-empty, .mm-dashboard .mm-tree-empty,
.mm-page .mm-tree-income, .mm-dashboard .mm-tree-income {
  color: var(--mm-contrast-muted);
}
.mm-page .mm-tree-income.is-recorded, .mm-dashboard .mm-tree-income.is-recorded {
  color: var(--mm-contrast-success);
}
.mm-page .mm-tree-income.is-pending, .mm-dashboard .mm-tree-income.is-pending {
  color: var(--mm-contrast-faint);
}
.mm-page .mm-tree-badge, .mm-dashboard .mm-tree-badge {
  color: var(--mm-contrast-gold);
  background: #1d1a10;
  border: 1px solid #3f3620;
}

/* ---------- 9. Read-only label text that was #888/#999 ------------------ */
.mm-page .mm-product-mini small, .mm-dashboard .mm-product-mini small,
.mm-page .mm-readonly-grid strong, .mm-dashboard .mm-readonly-grid strong,
.mm-page .mm-meta, .mm-dashboard .mm-meta,
.mm-page .mm-fineprint, .mm-dashboard .mm-fineprint, .mm-admin .mm-fineprint {
  color: var(--mm-contrast-muted) !important;
}
.mm-page .mm-chat__status i, .mm-dashboard .mm-chat__status i {
  background: var(--mm-contrast-success);
}

/* ---------- 10. WooCommerce on MagicMedia pages ------------------------- */
body.mm-plugin-page .woocommerce-message,
body.mm-plugin-page .woocommerce-info,
body.mm-plugin-page .woocommerce-error,
body.mm-plugin-page .woocommerce-notices-wrapper .woocommerce-message {
  background: var(--mm-contrast-panel-2) !important;
  color: var(--mm-contrast-ink) !important;
  border-top-color: var(--mm-contrast-gold-strong) !important;
}
body.mm-plugin-page .woocommerce-message a,
body.mm-plugin-page .woocommerce-info a { color: var(--mm-contrast-gold) !important; }
body.mm-plugin-page .woocommerce form .form-row input.input-text,
body.mm-plugin-page .woocommerce form .form-row textarea,
body.mm-plugin-page .woocommerce select {
  background: #0b0b0d !important;
  color: var(--mm-contrast-ink) !important;
  border-color: var(--mm-contrast-line) !important;
}
body.mm-plugin-page .woocommerce table.shop_table,
body.mm-plugin-page .woocommerce table.shop_table th,
body.mm-plugin-page .woocommerce table.shop_table td {
  background: transparent !important;
  color: var(--mm-contrast-ink-soft) !important;
  border-color: var(--mm-contrast-line-soft) !important;
}
body.mm-plugin-page #place_order,
body.mm-plugin-page .woocommerce #place_order,
body.mm-plugin-page .woocommerce button.button.alt {
  background: var(--mm-contrast-gold-strong) !important;
  color: #0b0b0b !important;
  border-color: var(--mm-contrast-gold-strong) !important;
}

/* ---------- 11. The floating support chat ------------------------------- */
.mm-chat, .mm-chatbot, .mm-support-chat {
  color: var(--mm-contrast-ink);
  background: var(--mm-contrast-panel-2);
  border-color: var(--mm-contrast-line);
}
.mm-chat__log, .mm-chatbot__log { color: var(--mm-contrast-ink-soft); }

/* ---------- 12. WordPress admin chrome (MagicMedia menu screens) -------
   The MagicMedia admin pages live inside wp-admin, whose default chrome is
   white. body.mm-plugin-page is added by MM_Admin_Dashboard::admin_body_class()
   on those screens only, so no other admin page is affected. */
body.mm-plugin-page.wp-admin #wpwrap,
body.mm-plugin-page.wp-admin #wpcontent,
body.mm-plugin-page.wp-admin #wpbody,
body.mm-plugin-page.wp-admin #wpbody-content,
body.mm-plugin-page.wp-admin #wpfooter,
body.mm-plugin-page.wp-admin .wrap,
body.mm-plugin-page.wp-admin .mm-admin,
body.mm-plugin-page.wp-admin #poststuff,
body.mm-plugin-page.wp-admin .notice,
body.mm-plugin-page.wp-admin .updated,
body.mm-plugin-page.wp-admin .error {
  background-color: var(--mm-contrast-page) !important;
  background-image: none !important;
  color: var(--mm-contrast-ink) !important;
  border-color: var(--mm-contrast-line-soft) !important;
  box-shadow: none !important;
}
body.mm-plugin-page.wp-admin #wpbody-content .wrap > h1,
body.mm-plugin-page.wp-admin #wpbody-content .wrap > h2,
body.mm-plugin-page.wp-admin .mm-admin h1,
body.mm-plugin-page.wp-admin .mm-admin h2,
body.mm-plugin-page.wp-admin .mm-admin h3 {
  color: var(--mm-contrast-ink) !important;
}
body.mm-plugin-page.wp-admin #wpbody-content a,
body.mm-plugin-page.wp-admin .mm-admin a {
  color: var(--mm-contrast-gold);
}
body.mm-plugin-page.wp-admin #wpbody-content a:hover,
body.mm-plugin-page.wp-admin .mm-admin a:hover { color: #fff2cc; }
/* Cards and tables inside the admin app */
body.mm-plugin-page.wp-admin .mm-admin .mm-card,
body.mm-plugin-page.wp-admin .mm-admin .mm-stat,
body.mm-plugin-page.wp-admin .mm-admin .mm-filter,
body.mm-plugin-page.wp-admin .mm-admin .mm-table-wrap {
  background: var(--mm-contrast-panel-2) !important;
  border-color: var(--mm-contrast-line-soft) !important;
  color: var(--mm-contrast-ink-soft) !important;
}
body.mm-plugin-page.wp-admin .mm-admin .mm-table th {
  color: var(--mm-contrast-gold) !important;
  border-bottom-color: var(--mm-contrast-line) !important;
}
body.mm-plugin-page.wp-admin .mm-admin .mm-table td {
  color: var(--mm-contrast-ink-soft) !important;
  border-bottom-color: var(--mm-contrast-line-soft) !important;
}
/* Admin notices sit on the dark canvas too */
body.mm-plugin-page.wp-admin .notice,
body.mm-plugin-page.wp-admin div.updated,
body.mm-plugin-page.wp-admin div.error {
  color: var(--mm-contrast-ink-soft) !important;
  border-left-color: var(--mm-contrast-gold-strong) !important;
}
body.mm-plugin-page.wp-admin .notice p { color: var(--mm-contrast-ink-soft) !important; }
/* Screen-meta help panels keep WP defaults but must not be white-on-white */
body.mm-plugin-page.wp-admin #screen-meta,
body.mm-plugin-page.wp-admin #screen-meta-links .show-settings {
  background: var(--mm-contrast-panel-2) !important;
  color: var(--mm-contrast-ink-soft) !important;
  border-color: var(--mm-contrast-line) !important;
}

/* ---------- 13. Specificity hedge against light themes -----------------
   Astra and Elementor style links, paragraphs and headings through selectors
   like `.entry-content a` (0,1,1). The component rules above sit at the same
   specificity, so cascade order alone decides -- and a theme that prints its
   dynamic CSS late would win. These duplicates carry a body.mm-plugin-page
   prefix so they outrank a theme rule without using !important.
   Button-like anchors are re-declared last, because a gold CTA needs dark ink. */
body.mm-plugin-page .entry-content p,
body.mm-plugin-page .entry-content li,
body.mm-plugin-page .entry-content dd,
body.mm-plugin-page .mm-page p,
body.mm-plugin-page .mm-dashboard p,
body.mm-plugin-page .mm-admin p,
body.mm-plugin-page .mm-store p,
body.mm-plugin-page .mm-page li,
body.mm-plugin-page .mm-dashboard li,
body.mm-plugin-page .mm-admin li,
body.mm-plugin-page .mm-store li,
body.mm-plugin-page .mm-page dd,
body.mm-plugin-page .mm-dashboard dd {
  color: var(--mm-contrast-ink-soft);
}
body.mm-plugin-page .entry-content h1,
body.mm-plugin-page .entry-content h2,
body.mm-plugin-page .entry-content h3,
body.mm-plugin-page .entry-content h4,
body.mm-plugin-page .mm-page h1, body.mm-plugin-page .mm-page h2,
body.mm-plugin-page .mm-page h3, body.mm-plugin-page .mm-page h4,
body.mm-plugin-page .mm-dashboard h1, body.mm-plugin-page .mm-dashboard h2,
body.mm-plugin-page .mm-dashboard h3, body.mm-plugin-page .mm-dashboard h4,
body.mm-plugin-page .mm-admin h1, body.mm-plugin-page .mm-admin h2,
body.mm-plugin-page .mm-admin h3 {
  color: var(--mm-contrast-ink);
}
body.mm-plugin-page .entry-content a:not(.mm-button):not(.button):not(.wp-block-button__link),
body.mm-plugin-page .mm-page a:not(.mm-button),
body.mm-plugin-page .mm-dashboard a:not(.mm-button),
body.mm-plugin-page .mm-admin a:not(.mm-button),
body.mm-plugin-page .mm-store a:not(.mm-button) {
  color: var(--mm-contrast-gold);
}
body.mm-plugin-page .entry-content a:not(.mm-button):hover,
body.mm-plugin-page .mm-page a:not(.mm-button):hover,
body.mm-plugin-page .mm-dashboard a:not(.mm-button):hover,
body.mm-plugin-page .mm-admin a:not(.mm-button):hover {
  color: #fff2cc;
}
body.mm-plugin-page .mm-page .mm-table th,
body.mm-plugin-page .mm-dashboard .mm-table th,
body.mm-plugin-page .mm-admin .mm-table th {
  color: var(--mm-contrast-gold);
}
body.mm-plugin-page .mm-page .mm-table td,
body.mm-plugin-page .mm-dashboard .mm-table td,
body.mm-plugin-page .mm-admin .mm-table td,
body.mm-plugin-page .mm-store .mm-table td {
  color: var(--mm-contrast-ink-soft);
}
body.mm-plugin-page .mm-page .mm-help,
body.mm-plugin-page .mm-dashboard .mm-help,
body.mm-plugin-page .mm-page small,
body.mm-plugin-page .mm-dashboard small,
body.mm-plugin-page .mm-admin small,
body.mm-plugin-page .mm-page .mm-meta,
body.mm-plugin-page .mm-dashboard .mm-meta,
body.mm-plugin-page .mm-page .mm-fineprint,
body.mm-plugin-page .mm-dashboard .mm-fineprint,
body.mm-plugin-page .mm-admin .mm-fineprint {
  color: var(--mm-contrast-muted);
}
/* Button-like anchors and gold CTAs keep dark ink, whatever the theme says. */
body.mm-plugin-page .mm-page a.mm-button,
body.mm-plugin-page .mm-dashboard a.mm-button,
body.mm-plugin-page .mm-admin a.mm-button,
body.mm-plugin-page .mm-store a.mm-button {
  color: var(--mm-contrast-ink);
}
body.mm-plugin-page .mm-page a.mm-button--gold,
body.mm-plugin-page .mm-dashboard a.mm-button--gold,
body.mm-plugin-page .mm-admin a.mm-button--gold,
body.mm-plugin-page .mm-page a.mm-button--primary,
body.mm-plugin-page .mm-dashboard a.mm-button--primary,
body.mm-plugin-page .entry-content a.wp-block-button__link,
body.mm-plugin-page .mm-page .mm-tabs__link.is-active,
body.mm-plugin-page .mm-dashboard .mm-tabs__link.is-active,
body.mm-plugin-page .mm-admin .mm-tabs__link.is-active {
  color: #0b0b0b;
}
body.mm-plugin-page .mm-page a.mm-button--gold:hover,
body.mm-plugin-page .mm-dashboard a.mm-button--gold:hover,
body.mm-plugin-page .mm-admin a.mm-button--gold:hover {
  color: #000;
}

/* ---------- 14. Small screens ------------------------------------------- */
@media (max-width: 780px) {
  body.mm-plugin-page .site-content,
  body.mm-plugin-page .entry-content { padding-left: 0 !important; padding-right: 0 !important; }
  .mm-page, .mm-dashboard, .mm-admin, .mm-store { border-radius: 12px; }
}
