/* Accessible light/dark appearance. Loaded last so it can safely refine every page. */
:root[data-theme="dark"]{
  --muted:#b7b7bf;
  color-scheme:dark;
}

:root[data-theme="light"]{
  --bg:#f6f3ee;
  --bg-soft:#eee9e2;
  --panel:#ffffff;
  --panel-2:#f3efe9;
  --text:#18181b;
  --muted:#565660;
  --line:#d4cec6;
  color-scheme:light;
}

html[data-theme="light"],
html[data-theme="light"] body{
  background:#f6f3ee;
  color:#18181b;
}

/* The header and footer stay dark so the white NrG logo remains clear. */
.site-header,.footer{color:#f7f7f7}
.site-header .nav{color:#d7d7dc}
.site-header .menu-btn{border-color:rgba(255,255,255,.18);background:#111114;color:#fff}

.theme-toggle{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:#101012;
  color:#f7f7f7;
  font:600 .78rem/1 Oxanium,Inter,ui-sans-serif,system-ui,sans-serif;
  cursor:pointer;
  white-space:nowrap;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.theme-toggle:hover{border-color:rgba(255,255,255,.5);background:#19191d}
.theme-toggle:active{transform:translateY(1px)}
.theme-toggle:focus-visible{outline:3px solid #fff;outline-offset:3px}
.theme-icon{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun{display:none}

/* Improve the smallest text in both themes. */
.legal{font-size:.82rem;line-height:1.65;color:#9b9ba3}
.footer a{color:#b5b5bd}
.wave small,.feature p,.section-head p{line-height:1.65}

html[data-theme="light"] main{color:#18181b}
html[data-theme="light"] main>section:not(.hero){
  background:#f6f3ee!important;
  border-color:#d4cec6!important;
}
html[data-theme="light"] main :where(h1,h2,h3,h4,p,li,dt,dd,span,strong,small,label,legend,th,td){color:inherit}
html[data-theme="light"] main :where(.muted,.section-head p,.feature p,.product-body p,.product-hero p,.page-hero p,.research-card p,.review-form-intro,.review-policy,.review-meta,.review-field small,.admin-header p,.admin-login p,.review-privacy-card p,.review-privacy-card li){color:#565660}
html[data-theme="light"] main :where(.eyebrow,.review-product,.optional,.private-label){color:#666671}
html[data-theme="light"] main :where(.grad-text,.hero-gradient,.spectrum-word,.wavelength-gradient){color:transparent;-webkit-text-fill-color:transparent}

html[data-theme="light"] main :where(
  .stat,.feature,.product-card,.research-card,.price-option,.panel-format-note,
  .positioning-panel,.position-card,.open-air-callout,.regulatory-card,.event-card,
  .event-video-card,.event-person-card,.support-quick-grid>a,.wavelength-mode-card,
  .irradiance-explanation,.measurement-proof-card,.review-card,.review-form-card,
  .review-empty,.review-loading,.review-error,.admin-login,.admin-review,.admin-help,
  .review-privacy-card,.manual-card,.manual-support,.product-manual-strip,.order-card,
  .order-panel,.order-intro-note,.payment-box,.order-step,.fulfillment-option,
  .challenge-box,.selection-note,.final-cta,.wave-detail,.reviews-summary
){
  background:#fff!important;
  border-color:#d4cec6!important;
  color:#18181b;
  box-shadow:0 10px 30px rgba(46,38,30,.045);
}

html[data-theme="light"] main :where(.spec-grid,.spec,.table-wrap,.compare th,.compare td,.accordion,.acc-item){border-color:#d4cec6}
html[data-theme="light"] main .compare th{background:#eee9e2;color:#18181b}
html[data-theme="light"] main .compare td{background:#fff;color:#18181b}
html[data-theme="light"] main :where(.review-filter,.review-field input,.review-field select,.review-field textarea,.admin-token-input,.admin-note){
  background:#fff;
  border-color:#bdb6ad;
  color:#18181b;
}
html[data-theme="light"] main :where(.review-field input,.review-field select,.review-field textarea,.admin-token-input,.admin-note)::placeholder{color:#77717a;opacity:1}

html[data-theme="light"] main :where(.btn-primary,.review-submit,.admin-btn.primary,.admin-btn.active){background:#18181b;color:#fff;border-color:#18181b}
html[data-theme="light"] main :where(.btn-dark,.review-load-more,.review-video-button,.admin-btn){background:#fff;color:#18181b;border-color:#aaa39b;backdrop-filter:none}
html[data-theme="light"] main :where(.text-link,.review-video-link,.review-form-intro a,.review-consent a,.review-policy a,.review-privacy-card a){color:#303039}
html[data-theme="light"] main .review-stars,
html[data-theme="light"] main .rating-options label:hover,
html[data-theme="light"] main .rating-options label:hover~label,
html[data-theme="light"] main .rating-options input:checked~label{color:#a56b00}
html[data-theme="light"] main .reviewer-name{color:#18181b}
html[data-theme="light"] main .verified-badge{color:#2d6f29;background:#eff8ec;border-color:#88ba7a}
html[data-theme="light"] main .review-form-status.success{color:#2d6f29}
html[data-theme="light"] main .review-form-status.error{color:#a21721}

/* Product photography and emitted-light demonstrations are intentionally black. */
html[data-theme="light"] main :where(
  .product-image,.product-visual,.product-placeholder,.media-frame,.clean-product,
  .flagship-visual,.catalog-feature-visual,.prizm-visual,.prizm-product-visual,
  .home-commercial-visual,.wavelength-mode-media,.review-photo,.review-video-frame,
  .photo-preview,.measurement-proof-card>img
){background-color:#050505!important}
html[data-theme="light"] main :where(.product-image,.product-visual,.product-placeholder,.media-frame,.clean-product,.wavelength-mode-media){border-color:#29292e!important}

/* The image-led homepage hero remains intentionally cinematic in both modes. */
html[data-theme="light"] main .hero{color:#fff;background:#030303!important;border-color:#26262b!important}
html[data-theme="light"] main .hero :where(h1,h2,h3,h4,p,span,strong,small){color:inherit}
html[data-theme="light"] main .hero .hero-lede{color:#e2e2e6!important}

@media (min-width:1001px) and (max-width:1320px){
  .nav-wrap{gap:15px}
  .nav{gap:14px;font-size:.76rem}
  .nav-cta{padding:9px 12px}
  .brand img{width:142px}
  .theme-toggle{padding-inline:11px;font-size:.72rem}
}

@media (max-width:1000px){
  .nav-wrap{gap:10px}
  .theme-toggle{order:3}
  .nav.open{color:#ddd;background:#0b0b0d;border-color:#29292e}
}

@media (max-width:420px){
  .brand img{width:118px}
  .menu-btn{padding:8px 10px}
  .theme-toggle{gap:6px;padding:8px 10px;font-size:.7rem}
}

@media (prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
