/* Khushi Digital Studio V45 — complete dark-mode visual layer */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark){
 --bg:#08111f!important;--card:#101c2e!important;--text:#edf5ff!important;--muted:#aebed2!important;--line:#2a3d56!important;
 --surface:#101c2e;--surface-2:#14253b;--surface-3:#0c1829;--dark-text:#edf5ff;--dark-muted:#b7c5d7;--dark-line:#2b405b;color-scheme:dark;background:#08111f!important
}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) body{background:#08111f!important;color:#edf5ff!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(main,.main,.main-content,.page-content,.content,.content-wrapper,.page-wrapper,.section,.section-light,.tools-section,.directory,.portal-main){background-color:transparent;color:#edf5ff}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
.card,.home-card,.service-card,.service-item,.service-block,.detail-card,.pricing-card,.price-card,.pricing-box,.package-card,
.gallery-card,.blog-card,.article-card,.review-card,.download-card,.software-card,.tool-card,.category-card,.contact-card,.contact-box,
.booking-card,.booking-container,.portal-card,.portal-category-card,.portal-box,.link-card,.feature-card,.value-card,.timeline-item,
.trust-item,.stat-card,.faq-item,.faq-card,.accordion-item,.form-card,.form-box,.panel,.content-box,.info-box,.result-box,.preview-box,
.settings-panel,.tool-panel,.converter-box,.calculator-card,.generator-card,.upload-box,.upload-zone,.drop-zone,.drop-area,.file-area,
.notice-box,.table-wrap,.table-container,.sidebar-card,.help,.services,.kds-premium-master,.kds-premium-list>a,.premium-services,.premium-panel
){background-color:#101c2e!important;color:#edf5ff!important;border-color:#2b405b!important;box-shadow:0 12px 32px rgba(0,0,0,.22)!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.card-header,.panel-header,.faq-question,.accordion-header,.table-header,.category-head,.services-head:not([class*="gradient"])){background-color:#14253b!important;color:#edf5ff!important;border-color:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(h1,h2,h3,h4,h5,h6,strong,b,label,legend,.title,.heading,.card-title){color:#edf5ff!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(p,li,small,.muted,.subtitle,.description,.desc,.help-text,.hint,.note,.section-subtitle,.blog-meta,.meta,.caption){color:#b7c5d7!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.input,.form-control){background:#0c1829!important;color:#edf5ff!important;border-color:#3a5472!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(input,textarea)::placeholder{color:#8294aa!important;opacity:1}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(table,thead,tbody,tr,th,td){color:#edf5ff!important;border-color:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) th{background:#14253b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) tr:nth-child(even) td{background-color:rgba(255,255,255,.025)}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.breadcrumb,.breadcrumbs,.gov-nav-menu,.mobile-menu,.dropdown-menu,.dropdown-content,.modal-content,.popup,.popover){background-color:#101c2e!important;color:#edf5ff!important;border-color:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.bg-white,.white-bg,.light-bg,.bg-light,[style*="background: white"],[style*="background:#fff"],[style*="background: #fff"],[style*="background-color:#fff"],[style*="background-color: #fff"]):not(.btn):not(.hero):not(.cta){background-color:#101c2e!important;color:#edf5ff!important;border-color:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.site-header,.kds-header,.kds-master-header,header){border-color:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.site-footer,.footer,footer){background-color:#07101d!important;color:#dce8f7!important;border-color:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.footer a,.legal a,.footer-links a){color:#c8d7e9!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(hr,.divider){border-color:#2b405b!important;background:#2b405b!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.sicon,.tool-icon,.icon-box){background-color:#172b45!important;color:#8bbcff!important}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(a.category-back-link,.back-link){background:#101c2e!important;border-color:#2b405b!important;color:#8bbcff!important}
/* Preserve intentional branded/preview areas */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(.hero,.cta,.btn-primary,.btn-accent,.badge,.pill,.services-head,.kds-premium-head){color:#fff}
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(canvas,.pdf-preview,.image-preview,.thumbnail,.page-thumbnail,.photo-sheet,.invoice-preview,.resume-preview){background:#fff!important;color:#111!important}

/* V45 — targeted hidden-text and contrast corrections */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
  .card,.home-card,.service-card,.service-item,.service-block,.detail-card,.pricing-card,.price-card,.pricing-box,.package-card,
  .gallery-card,.blog-card,.article-card,.review-card,.download-card,.software-card,.tool-card,.category-card,.contact-card,.contact-box,
  .booking-card,.booking-container,.portal-card,.portal-category-card,.portal-box,.link-card,.feature-card,.value-card,.timeline-item,
  .trust-item,.stat-card,.faq-item,.faq-card,.accordion-item,.form-card,.form-box,.panel,.content-box,.info-box,.result-box,.preview-box,
  .settings-panel,.tool-panel,.converter-box,.calculator-card,.generator-card,.upload-box,.upload-zone,.drop-zone,.drop-area,.file-area,
  .notice-box,.table-wrap,.table-container,.sidebar-card,.help,.services,.kds-premium-master,.kds-premium-list>a,.premium-services,.premium-panel
) :is(
  .text,.copy,.content,.card-content,.card-body,.card-text,.card-copy,.service-copy,.service-name,.tool-name,.tool-title,
  .feature-title,.feature-text,.feature-copy,.portal-title,.portal-name,.link-title,.link-name,.contact-info,.contact-text,
  .faq-answer,.accordion-content,.answer,.result,.result-text,.result-value,.value,.amount,.price,.price-text,.price-value,
  .status-text,.file-name,.file-info,.upload-text,.preview-text,.setting-text,.option-text,.label-text,.info-text,.details,
  dt,dd,figcaption,summary
){color:#edf5ff!important}

:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
  .card,.home-card,.service-card,.service-item,.service-block,.detail-card,.pricing-card,.price-card,.pricing-box,.package-card,
  .gallery-card,.blog-card,.article-card,.review-card,.download-card,.software-card,.tool-card,.category-card,.contact-card,.contact-box,
  .booking-card,.booking-container,.portal-card,.portal-category-card,.portal-box,.link-card,.feature-card,.value-card,.timeline-item,
  .trust-item,.stat-card,.faq-item,.faq-card,.accordion-item,.form-card,.form-box,.panel,.content-box,.info-box,.result-box,
  .settings-panel,.tool-panel,.converter-box,.calculator-card,.generator-card,.upload-box,.upload-zone,.drop-zone,.drop-area,.file-area,
  .notice-box,.table-wrap,.table-container,.sidebar-card,.help,.services,.kds-premium-master,.premium-services,.premium-panel
) :is(span,div,a):not(.btn):not([class*="btn-"]):not(.badge):not(.pill):not(.tag):not(.chip):not(.icon):not([class*="icon"]):not(.logo):not(.brand){
  text-shadow:none
}

/* Common hard-coded dark inline text colours that disappear on dark surfaces */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
 [style*="color:#111"],[style*="color: #111"],[style*="color:#222"],[style*="color: #222"],
 [style*="color:#333"],[style*="color: #333"],[style*="color:#444"],[style*="color: #444"],
 [style*="color:#555"],[style*="color: #555"],[style*="color:#10213a"],[style*="color: #10213a"],
 [style*="color:#152033"],[style*="color: #152033"],[style*="color:#172033"],[style*="color: #172033"]
):not(.btn):not([class*="btn-"]):not(.badge):not(.pill):not(.hero):not(.cta){color:#edf5ff!important}

/* Secondary text: visible but intentionally softer */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
 .secondary,.subtext,.supporting-text,.card-desc,.tool-desc,.service-desc,.portal-desc,.link-desc,.feature-desc,
 .result-label,.field-help,.form-help,.upload-hint,.file-meta,.date,.time,.author,.category-label
){color:#b7c5d7!important}

/* Links inside dark cards and panels */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
 .card,.service-card,.pricing-card,.download-card,.tool-card,.portal-card,.link-card,.panel,.content-box,.info-box,
 .result-box,.settings-panel,.tool-panel,.services,.premium-panel,.kds-premium-master
) a:not(.btn):not([class*="btn-"]){color:#8fc0ff!important}

/* Keep white-document previews and their text untouched */
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
 .pdf-preview,.image-preview,.thumbnail,.page-thumbnail,.photo-sheet,.invoice-preview,.resume-preview,.document-preview,.print-preview
),
:is(html[data-theme="dark"],html[data-kds-theme="dark"],html.dark) :is(
 .pdf-preview,.image-preview,.thumbnail,.page-thumbnail,.photo-sheet,.invoice-preview,.resume-preview,.document-preview,.print-preview
) *{color:#111!important}
