/* Dhivehi Font Studio v10.9.8 — final runtime dark-mode layer.
   IMPORTANT: this file is loaded after CMS custom/saved CSS. */
html[data-theme="dark"]{
  color-scheme:dark;
  --surface:var(--panel);
  --surface-2:color-mix(in srgb,var(--panel) 88%,white 12%);
  --heading:var(--white);
  --accent-2:var(--accent2);
  --bg-soft:color-mix(in srgb,var(--bg) 78%,var(--panel));
  --line-soft:color-mix(in srgb,var(--line) 66%,transparent);
  --muted:color-mix(in srgb,var(--text) 70%,var(--bg));
  --ink:var(--white);
  background:var(--bg)!important;
}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"] body{background:var(--bg)!important;color:var(--heading)!important}

/* Root page surfaces. Saved page background colours must not lock a page to light mode. */
html[data-theme="dark"] #dfsPageContent,
html[data-theme="dark"] .dfs-page-shell{
  background:var(--bg)!important;
  color:var(--heading)!important;
}

/* Standard page sections. Hero/page hero/proof keep their intentional dark art direction. */
html[data-theme="dark"] #dfsPageContent .section:not(.hero):not(.pageHero):not(.proofStrip):not(.alt):not(.light),
html[data-theme="dark"] #dfsPageContent .cms-section,
html[data-theme="dark"] #dfsPageContent .dynamic-section,
html[data-theme="dark"] #dfsPageContent .single-entry{
  background-color:var(--bg)!important;
  color:var(--heading)!important;
}
html[data-theme="dark"] #dfsPageContent .section.alt,
html[data-theme="dark"] #dfsPageContent .section.light{
  background:var(--bg-soft)!important;
  color:var(--heading)!important;
  border-color:var(--line-soft)!important;
}

/* Common saved-builder light colours. */
html[data-theme="dark"] #dfsPageContent section[style*="background:#fff"],
html[data-theme="dark"] #dfsPageContent section[style*="background: #fff"],
html[data-theme="dark"] #dfsPageContent section[style*="background:#ffffff"],
html[data-theme="dark"] #dfsPageContent section[style*="background: #ffffff"],
html[data-theme="dark"] #dfsPageContent section[style*="background:white"],
html[data-theme="dark"] #dfsPageContent section[style*="background: white"],
html[data-theme="dark"] #dfsPageContent section[style*="background-color:#fff"],
html[data-theme="dark"] #dfsPageContent section[style*="background-color: #fff"],
html[data-theme="dark"] #dfsPageContent section[style*="background-color:#ffffff"],
html[data-theme="dark"] #dfsPageContent section[style*="background-color: #ffffff"],
html[data-theme="dark"] #dfsPageContent section[style*="rgb(255, 255, 255)"],
html[data-theme="dark"] #dfsPageContent section[style*="#f2f5f6"],
html[data-theme="dark"] #dfsPageContent section[style*="#eef3f4"],
html[data-theme="dark"] #dfsPageContent section[style*="#f5f8f8"]{
  background:var(--bg-soft)!important;
}

/* Typography */
html[data-theme="dark"] #dfsPageContent :is(h1,h2,h3,h4,h5,h6,strong,b,.cms-quote,.workspaceGrid b,.specRows b){color:var(--heading)!important}
html[data-theme="dark"] #dfsPageContent :is(p,.lead,.head p,.sectionIntro>p,.entry-content,.dynamic-meta,.workspaceGrid span,.specRows span){color:var(--text)!important}
html[data-theme="dark"] #dfsPageContent :is(.eyebrow,.textLink){color:var(--accent)!important}

/* Cards, panels and CMS widgets */
html[data-theme="dark"] #dfsPageContent :is(.card,.templateCard,.workspaceGrid>div,.featureMatrix article,.lightPanel,.fontcard,.dynamic-card,.cms-widget-box,.contact-card,.sidebar-widget,.search-hit){
  background:var(--surface)!important;
  color:var(--heading)!important;
  border-color:var(--line)!important;
  box-shadow:none;
}
html[data-theme="dark"] #dfsPageContent :is(.card,.templateCard,.workspaceGrid>div,.featureMatrix article,.lightPanel,.fontcard,.dynamic-card,.cms-widget-box,.contact-card,.sidebar-widget,.search-hit) p{color:var(--muted)!important}
html[data-theme="dark"] #dfsPageContent .featureBullets span,
html[data-theme="dark"] #dfsPageContent .specRows,
html[data-theme="dark"] #dfsPageContent .specRows>div,
html[data-theme="dark"] #dfsPageContent .cms-accordion details{color:var(--text)!important;border-color:var(--line)!important}

/* Navigation / header chrome */
html[data-theme="dark"] :is(.cms-nav,.cms-topbar,.header-row-top,.header-row-main,.header-row-bottom,.submenu,.header-search){
  background-color:var(--panel)!important;
  color:var(--heading)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] :is(.menu>.menu-node>a,.submenu a,.header-social a,.header-categories a,.header-language,.header-cart){color:var(--text)!important}
html[data-theme="dark"] .menu>.menu-node.active>a,
html[data-theme="dark"] .menu>.menu-node>a:hover,
html[data-theme="dark"] .submenu a:hover{color:var(--accent)!important}

/* Logo variants — also keeps the previous successful duplicated-logo repair. */
.brand .logo-light{display:none!important}
html[data-theme="dark"] .brand .logo-dark{display:block!important}
html[data-theme="dark"] .brand .logo-light{display:none!important}
html[data-theme="light"] .brand .logo-dark{display:none!important}
html[data-theme="light"] .brand .logo-light{display:block!important}
.cms-header-row .header-slot>.brand~.brand{display:none!important}
.footer-logo-light{display:none!important}
html[data-theme="dark"] .footer-logo-dark{display:block!important}
html[data-theme="dark"] .footer-logo-light{display:none!important}

/* Forms — old runtime form defaults were light-coloured even while the site was dark. */
html[data-theme="dark"] :is(input,textarea,select){background:var(--surface)!important;color:var(--heading)!important;border-color:var(--line)!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--muted)!important;opacity:1}
html[data-theme="dark"] select option{background:var(--surface);color:var(--heading)}
html[data-theme="dark"] .cms-contact-form label{color:var(--heading)!important}

/* Generic CMS content */
html[data-theme="dark"] #dfsPageContent :is(table,thead,tbody,tfoot,tr,th,td){border-color:var(--line)!important}
html[data-theme="dark"] #dfsPageContent :is(th,td){color:var(--text)}
html[data-theme="dark"] #dfsPageContent th{color:var(--heading)}
html[data-theme="dark"] #dfsPageContent :is(pre,code){background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme="dark"] #dfsPageContent hr{border-color:var(--line)!important}
html[data-theme="dark"] #dfsPageContent blockquote{color:var(--text)!important;border-color:var(--accent)!important}

/* Footer */
html[data-theme="dark"] :is(.footer-top-cta,.cms-footer){border-color:var(--line)!important}
html[data-theme="dark"] .footer-top-cta{background:var(--panel)!important;color:var(--heading)!important}
html[data-theme="dark"] .cms-footer{background:var(--footer-bg-dark,#040b11)!important;color:var(--footer-text-dark,var(--text))!important}

/* Do not recolour actual screenshots, images or videos. */
html[data-theme="dark"] #dfsPageContent :is(img,video,picture,svg,.shot,.productShot,.cms-video){color-scheme:normal}

html[data-theme="dark"] :is(body,#dfsPageContent,.section,.cms-nav,.cms-footer,.card,.templateCard,.lightPanel,.fontcard,.dynamic-card,.cms-widget-box){transition:background-color .16s ease,color .16s ease,border-color .16s ease}
