/*
 * webtongMing site theme V1.
 * Loaded on all PHP pages; inactive until validated published JSON is applied.
 * Highest priority reserved for site chrome; do not recolor editorial HTML or hero images.
 */
html[data-mtb-theme="enabled"] {
  --primary-color: var(--mtb-theme-primary);
  --secondary-color: var(--mtb-theme-secondary);
  --accent-color: var(--mtb-theme-accent);
  --brand-red: var(--mtb-theme-primary);
  --mtb-red: var(--mtb-theme-primary);
  --mtb-red-dark: var(--mtb-theme-secondary);
  --mtb-gold: var(--mtb-theme-accent);
  --mtb-cream: var(--mtb-theme-background);
  --mtb-text: var(--mtb-theme-text);
  --mtb-home-ink: var(--mtb-theme-home-primary);
  --mtb-home-ink-soft: var(--mtb-theme-home-secondary);
  --mtb-home-gold: var(--mtb-theme-home-accent);
  --mtb-home-cream: var(--mtb-theme-home-background);
  --mtb-home-paper: var(--mtb-theme-home-background);
}

/* Brand header, quick menu and search */
html[data-mtb-theme="enabled"] body .mtb-topbar {
  background: var(--mtb-theme-header-primary) !important;
  border-top-color: var(--mtb-theme-header-accent) !important;
}
html[data-mtb-theme="enabled"] body .mtb-topbar a,
html[data-mtb-theme="enabled"] body .mtb-topbar i { color: #fff !important; }
html[data-mtb-theme="enabled"] body .mtb-navbar,
html[data-mtb-theme="enabled"] body nav.mtb-navbar {
  background: var(--mtb-theme-header-background) !important;
  border-bottom-color: var(--mtb-theme-header-accent) !important;
}
html[data-mtb-theme="enabled"] body .mtb-navbar__link,
html[data-mtb-theme="enabled"] body .mtb-navbar__submenu-link {
  color: var(--mtb-theme-header-text) !important;
}
html[data-mtb-theme="enabled"] body .mtb-navbar__link:hover,
html[data-mtb-theme="enabled"] body .mtb-navbar__link.is-active,
html[data-mtb-theme="enabled"] body .mtb-navbar__link.active,
html[data-mtb-theme="enabled"] body .mtb-navbar__submenu-link:hover {
  background: var(--mtb-theme-header-primary) !important;
  color: #fff !important;
}
html[data-mtb-theme="enabled"] body .mtb-header-search__submit {
  color: var(--mtb-theme-header-primary) !important;
}
html[data-mtb-theme="enabled"] body .mtb-navbar__submenu {
  border-color: var(--mtb-theme-header-accent) !important;
}

/* Global site canvas. Never repaint media hero layers. */
html[data-mtb-theme="enabled"] body {
  color: var(--mtb-theme-text);
  background-color: var(--mtb-theme-background);
}
html[data-mtb-theme="enabled"] body .btn-primary,
html[data-mtb-theme="enabled"] body .btn-success {
  background-color: var(--mtb-theme-primary) !important;
  border-color: var(--mtb-theme-primary) !important;
  color: #fff !important;
}
html[data-mtb-theme="enabled"] body .btn-primary:hover,
html[data-mtb-theme="enabled"] body .btn-success:hover {
  background-color: var(--mtb-theme-secondary) !important;
  border-color: var(--mtb-theme-secondary) !important;
}
html[data-mtb-theme="enabled"] body .btn-outline-primary {
  color: var(--mtb-theme-primary) !important;
  border-color: var(--mtb-theme-primary) !important;
}
html[data-mtb-theme="enabled"] body .btn-outline-primary:hover {
  color: #fff !important;
  background-color: var(--mtb-theme-primary) !important;
}
html[data-mtb-theme="enabled"] body a:not(.btn):not(.mtb-navbar__link):not(.mtb-navbar__submenu-link):hover {
  text-decoration-color: var(--mtb-theme-accent);
}

/* Home: keep video/photography unmodified. */
html[data-mtb-theme="enabled"] body .mtb-home-main,
html[data-mtb-theme="enabled"] body .mtb-home-section,
html[data-mtb-theme="enabled"] body .mtb-home-about,
html[data-mtb-theme="enabled"] body .mtb-home-news {
  color: var(--mtb-theme-home-text);
  background-color: var(--mtb-theme-home-background);
}
html[data-mtb-theme="enabled"] body .mtb-home-display,
html[data-mtb-theme="enabled"] body .mtb-home-eyebrow,
html[data-mtb-theme="enabled"] body .mtb-home-link,
html[data-mtb-theme="enabled"] body .mtb-home-news-card h3 {
  color: var(--mtb-theme-home-text) !important;
}
html[data-mtb-theme="enabled"] body .mtb-home-display em,
html[data-mtb-theme="enabled"] body .mtb-home-eyebrow::before,
html[data-mtb-theme="enabled"] body .mtb-home-news-card__read span {
  color: var(--mtb-theme-home-secondary) !important;
}
html[data-mtb-theme="enabled"] body .mtb-home-eyebrow::before {
  background-color: var(--mtb-theme-home-accent) !important;
}

/* Ecosystem and seven brand detail pages */
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page,
html[data-mtb-theme="enabled"] body .ming-detail-page {
  --mtb-home-gold: var(--mtb-theme-ecosystem-accent);
  --mtb-home-ink: var(--mtb-theme-ecosystem-primary);
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-intro,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-brands,
html[data-mtb-theme="enabled"] body .ming-detail-content {
  background-color: var(--mtb-theme-ecosystem-background) !important;
  color: var(--mtb-theme-ecosystem-text) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-intro h2,
html[data-mtb-theme="enabled"] body .ming-detail-section h3 {
  color: var(--mtb-theme-ecosystem-primary) !important;
}
html[data-mtb-theme="enabled"] body .mtb-eco-card__arrow,
html[data-mtb-theme="enabled"] body .ming-detail-network-card__arrow {
  color: var(--mtb-theme-ecosystem-accent) !important;
}
/* Keep ecosystem hero artwork and its text contrast intact. */

/* Product/shop controls */
html[data-mtb-theme="enabled"] body .product-card .btn,
html[data-mtb-theme="enabled"] body .featured-products .btn,
html[data-mtb-theme="enabled"] body .product-detail .btn-primary {
  background-color: var(--mtb-theme-products-primary) !important;
  border-color: var(--mtb-theme-products-primary) !important;
  color: #fff !important;
}
html[data-mtb-theme="enabled"] body .product-price,
html[data-mtb-theme="enabled"] body .price,
html[data-mtb-theme="enabled"] body .product-title {
  color: var(--mtb-theme-products-primary);
}

/* News and editorial chrome: not article HTML pasted by authors */
html[data-mtb-theme="enabled"] body .news-categories,
html[data-mtb-theme="enabled"] body .news-content,
html[data-mtb-theme="enabled"] body .news-search {
  background-color: var(--mtb-theme-news-background) !important;
  color: var(--mtb-theme-news-text) !important;
}
html[data-mtb-theme="enabled"] body .news-category-section h4,
html[data-mtb-theme="enabled"] body .section-all-btn,
html[data-mtb-theme="enabled"] body .news-sidebar h5 {
  color: var(--mtb-theme-news-primary) !important;
}
html[data-mtb-theme="enabled"] body .news-search .btn-primary,
html[data-mtb-theme="enabled"] body #news-topics-container .topic-btn.active {
  background-color: var(--mtb-theme-news-primary) !important;
  border-color: var(--mtb-theme-news-primary) !important;
  color: #fff !important;
}

/* Contact / about wrappers */
html[data-mtb-theme="enabled"] body .contact-section,
html[data-mtb-theme="enabled"] body .mtb-contact-page {
  background-color: var(--mtb-theme-contact-background) !important;
  color: var(--mtb-theme-contact-text);
}
html[data-mtb-theme="enabled"] body .about-section,
html[data-mtb-theme="enabled"] body .mtb-about-premium {
  --mtb-home-ink: var(--mtb-theme-about-primary);
  --mtb-home-gold: var(--mtb-theme-about-accent);
}

/* Footer colors must win over old fixed beige/dark CSS layers. */
html[data-mtb-theme="enabled"] body footer.footer,
html[data-mtb-theme="enabled"] body footer.footer.bg-dark,
html[data-mtb-theme="enabled"] body .footer.bg-dark {
  background: var(--mtb-theme-footer-background) !important;
  color: var(--mtb-theme-footer-text) !important;
  border-top-color: var(--mtb-theme-footer-accent) !important;
}
html[data-mtb-theme="enabled"] body footer.footer .footer-heading,
html[data-mtb-theme="enabled"] body footer.footer .footer-links a,
html[data-mtb-theme="enabled"] body footer.footer .contact-link,
html[data-mtb-theme="enabled"] body footer.footer .footer-desc,
html[data-mtb-theme="enabled"] body footer.footer .contact-icon,
html[data-mtb-theme="enabled"] body footer.footer p,
html[data-mtb-theme="enabled"] body footer.footer a {
  color: var(--mtb-theme-footer-text) !important;
}
html[data-mtb-theme="enabled"] body footer.footer::before {
  background: var(--mtb-theme-footer-accent) !important;
}
html[data-mtb-theme="enabled"] body .bottom-footer {
  background: var(--mtb-theme-footer-secondary) !important;
  color: #fff !important;
}
html[data-mtb-theme="enabled"] body .bottom-footer a,
html[data-mtb-theme="enabled"] body .bottom-footer span,
html[data-mtb-theme="enabled"] body .bottom-footer p {
  color: #fff !important;
}


/* Direct PHP templates for contact and about pages. */
html[data-mtb-theme="enabled"] body .mtb-contact-section,
html[data-mtb-theme="enabled"] body .mtb-contact-map-section {
  background-color: var(--mtb-theme-contact-background) !important;
  color: var(--mtb-theme-contact-text) !important;
}
html[data-mtb-theme="enabled"] body .mtb-contact-btn--primary,
html[data-mtb-theme="enabled"] body .mtb-contact-submit,
html[data-mtb-theme="enabled"] body .mtb-contact-card__icon {
  background-color: var(--mtb-theme-contact-primary) !important;
  border-color: var(--mtb-theme-contact-primary) !important;
  color: #fff !important;
}
html[data-mtb-theme="enabled"] body .mtb-contact-heading h2,
html[data-mtb-theme="enabled"] body .mtb-contact-eyebrow {
  color: var(--mtb-theme-contact-primary) !important;
}
html[data-mtb-theme="enabled"] body .mtb-about-page .mtb-about-shell {
  color: var(--mtb-theme-about-text) !important;
}
html[data-mtb-theme="enabled"] body .mtb-about-profile,
html[data-mtb-theme="enabled"] body .mtb-about-purpose,
html[data-mtb-theme="enabled"] body .mtb-about-strategy {
  background-color: var(--mtb-theme-about-background) !important;
}
html[data-mtb-theme="enabled"] body .mtb-about-section-head h2,
html[data-mtb-theme="enabled"] body .mtb-about-eyebrow {
  color: var(--mtb-theme-about-primary) !important;
}
html[data-mtb-theme="enabled"] body .mtb-about-value strong {
  color: var(--mtb-theme-about-secondary) !important;
}


/* About V2: connect the existing About-page tokens to admin-selected area colors. */
html[data-mtb-theme="enabled"] body .mtb-about-page {
  --mtb-about-ink: var(--mtb-theme-about-primary);
  --mtb-about-ink-2: var(--mtb-theme-about-secondary);
  --mtb-about-gold: var(--mtb-theme-about-accent);
  --mtb-about-muted: var(--mtb-theme-about-text);
  --mtb-about-paper: var(--mtb-theme-about-background);
}
html[data-mtb-theme="enabled"] body .mtb-about-culture__closing {
  background-color: var(--mtb-theme-about-background);
  border-left-color: var(--mtb-theme-about-accent);
}


/* Ecosystem V2 — honor published ecosystem palette without reducing hero contrast. */
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page {
  --eco-ink: var(--mtb-theme-ecosystem-primary);
  --eco-ink-2: var(--mtb-theme-ecosystem-secondary);
  --eco-gold: var(--mtb-theme-ecosystem-accent);
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network__group-index,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-benefits__grid article > span,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-card__number {
  color: var(--mtb-theme-ecosystem-accent);
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-contact__links a:first-child {
  background-color: var(--mtb-theme-ecosystem-primary);
}


/* Ecosystem V3: every brand card and light section follows the published
   Admin -> Website appearance -> Ecosystem palette (5 official tokens).
   White-on-dark storytelling sections are intentionally darkened for contrast. */
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page {
  --eco-paper: var(--mtb-theme-ecosystem-background);
  --eco-text: var(--mtb-theme-ecosystem-text);
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-architecture,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-cycle {
  background: color-mix(in srgb, var(--eco-paper) 88%, var(--eco-gold) 12%) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-benefits {
  background: var(--eco-paper) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network__group,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-cycle__step {
  background: var(--eco-paper);
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-section-head h2,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network__group h3,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-structure-points h3,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-cycle__step h3,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-benefits__grid h3,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-contact h2 {
  color: var(--eco-ink) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-intro__copy p,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-section-head > p,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network__group > p,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-structure-points p,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-cycle__step p,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-benefits__grid p,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-contact p {
  color: var(--eco-text) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network__links a,
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-network__ai {
  background: color-mix(in srgb, var(--eco-paper) 82%, var(--eco-gold) 18%);
  color: var(--eco-ink);
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-eco-contact {
  background: color-mix(in srgb, var(--eco-paper) 82%, var(--eco-gold) 18%) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-hero {
  background:
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--eco-gold) 20%, transparent), transparent 40%),
    linear-gradient(125deg,
      color-mix(in srgb, var(--eco-ink) 65%, #091f17 35%),
      color-mix(in srgb, var(--eco-ink-2) 65%, #091f17 35%)
    ) !important;
}
html[data-mtb-theme="enabled"] body .mtb-ecosystem-page .mtb-ecosystem-philosophy {
  background: color-mix(in srgb, var(--eco-ink) 65%, #091f17 35%) !important;
}


/* Ming detail editorial V2.
   All six internal Ming pages use the published Ecosystem palette in Admin.
   Theme tokens are inherited, so they update without further source edits. */
html[data-mtb-theme="enabled"] body .ming-detail-page {
  --ming-ink: var(--mtb-theme-ecosystem-primary);
  --ming-ink-2: var(--mtb-theme-ecosystem-secondary);
  --ming-gold: var(--mtb-theme-ecosystem-accent);
  --ming-muted: var(--mtb-theme-ecosystem-text);
  --ming-white: var(--mtb-theme-ecosystem-background);
  --ming-soft: color-mix(in srgb, var(--ming-white) 89%, var(--ming-gold) 11%);
  --ming-line: color-mix(in srgb, var(--ming-ink) 12%, transparent);
}
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-hero {
  background:
    radial-gradient(circle at 84% 14%, color-mix(in srgb, var(--ming-gold) 10%, transparent), transparent 42%),
    linear-gradient(125deg, var(--ming-white), var(--ming-soft)) !important;
}
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-lead,
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-context,
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-aside > p,
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-section p,
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-section li,
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-contact p {
  color: var(--ming-muted);
}
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-contact {
  background: color-mix(in srgb, var(--ming-white) 80%, var(--ming-gold) 20%);
}
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-contact__button {
  background: var(--ming-ink);
  color: #fff;
}
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-contact__button:hover {
  background: var(--ming-ink-2);
}
html[data-mtb-theme="enabled"] body .ming-detail-page .ming-detail-network {
  background:
    radial-gradient(circle at 11% 10%, color-mix(in srgb, var(--ming-gold) 13%, transparent), transparent 32%),
    linear-gradient(125deg,
      color-mix(in srgb, var(--ming-ink) 64%, #0b1b14 36%),
      color-mix(in srgb, var(--ming-ink-2) 64%, #0b1b14 36%)
    );
}
