
/* NexGen v2.0.92-rc46 — Premium Public Website Light & Dark Themes */

/* ---------- Shared theme system ---------- */
body.public-site{
  --pw-bg:#f6f8fb;
  --pw-surface:#ffffff;
  --pw-surface-2:#f8fafc;
  --pw-surface-3:#eef3f8;
  --pw-text:#17243a;
  --pw-muted:#66758a;
  --pw-border:#dfe6ee;
  --pw-shadow:0 12px 30px rgba(21,41,74,.075);
  --pw-shadow-lg:0 22px 50px rgba(15,35,68,.13);
  --pw-nav:rgba(255,255,255,.96);
  --pw-input:#ffffff;
  --pw-hover:#f3f6fb;
  --pw-accent:#6b3fe0;
  --pw-gold:#f4b719;
  background:var(--pw-bg)!important;
  color:var(--pw-text)!important;
  transition:background-color .2s ease,color .2s ease;
}

html[data-theme="dark"] body.public-site{
  --pw-bg:#08111f;
  --pw-surface:#0f1b2b;
  --pw-surface-2:#132235;
  --pw-surface-3:#1a2a3f;
  --pw-text:#eef4fb;
  --pw-muted:#a7b5c8;
  --pw-border:#2a3a50;
  --pw-shadow:0 14px 34px rgba(0,0,0,.28);
  --pw-shadow-lg:0 24px 58px rgba(0,0,0,.40);
  --pw-nav:rgba(10,20,34,.96);
  --pw-input:#111f31;
  --pw-hover:#17273a;
  --pw-accent:#9b83ff;
  --pw-gold:#ffd45e;
}

/* ---------- Header / navigation ---------- */
body.public-site>.topbar.public-nav{
  background:var(--pw-nav)!important;
  border-bottom-color:var(--pw-border)!important;
  box-shadow:0 7px 24px rgba(17,34,61,.07)!important;
}
body.public-site>.topbar.public-nav .brand strong{color:var(--pw-text)!important}
body.public-site>.topbar.public-nav .brand small{color:var(--pw-muted)!important}
body.public-site>.topbar.public-nav nav>a,
body.public-site>.topbar.public-nav .portal-trigger{color:var(--pw-text)!important}
body.public-site>.topbar.public-nav nav>a:not(.apply-now):hover,
body.public-site>.topbar.public-nav nav>a.active{color:var(--pw-accent)!important}

.public-portals summary{
  background:var(--pw-surface-2)!important;
  border-color:var(--pw-border)!important;
  color:var(--pw-text)!important;
}
.public-portals[open] summary{
  background:color-mix(in srgb,var(--pw-accent) 12%,var(--pw-surface))!important;
  color:var(--pw-accent)!important;
  border-color:color-mix(in srgb,var(--pw-accent) 32%,var(--pw-border))!important;
}
.public-portals-menu{
  background:var(--pw-surface)!important;
  border-color:var(--pw-border)!important;
  box-shadow:var(--pw-shadow-lg)!important;
}
.public-portals-menu a{color:var(--pw-text)!important}
.public-portals-menu a:hover{
  background:color-mix(in srgb,var(--pw-accent) 10%,var(--pw-surface))!important;
  color:var(--pw-accent)!important;
}

.public-theme-switch{
  display:flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid var(--pw-border);
  border-radius:10px;
  background:var(--pw-surface-2);
}
.public-theme-switch button{
  width:30px;height:30px;
  display:grid;place-items:center;
  border:0;border-radius:7px;
  background:transparent;
  color:var(--pw-muted);
  font-size:12px;
  cursor:pointer;
}
.public-theme-switch button:hover{background:var(--pw-hover);color:var(--pw-text)}
.public-theme-switch button.active{
  background:var(--pw-surface);
  color:var(--pw-accent);
  box-shadow:0 2px 8px rgba(20,40,70,.09);
}

.public-mobile-toggle{
  background:var(--pw-surface)!important;
  border-color:var(--pw-border)!important;
  color:var(--pw-text)!important;
}
.public-mobile-drawer{
  background:var(--pw-surface)!important;
  box-shadow:-20px 0 46px rgba(0,0,0,.22)!important;
}
.public-mobile-links a{
  color:var(--pw-text)!important;
  background:var(--pw-surface-2)!important;
  border-color:var(--pw-border)!important;
}
.public-mobile-links a:hover,.public-mobile-links a.active{
  background:color-mix(in srgb,var(--pw-accent) 12%,var(--pw-surface))!important;
  color:var(--pw-accent)!important;
  border-color:color-mix(in srgb,var(--pw-accent) 30%,var(--pw-border))!important;
}
.public-mobile-section,.public-mobile-foot{color:var(--pw-muted)!important}
.public-mobile-foot{border-color:var(--pw-border)!important}
.public-mobile-theme{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  padding:5px 13px 13px;
}
.public-mobile-theme button{
  min-height:55px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid var(--pw-border);
  border-radius:10px;
  background:var(--pw-surface-2);
  color:var(--pw-muted);
  cursor:pointer;
}
.public-mobile-theme button span{font-size:16px}
.public-mobile-theme button strong{font-size:12px}
.public-mobile-theme button.active{
  background:color-mix(in srgb,var(--pw-accent) 12%,var(--pw-surface));
  color:var(--pw-accent);
  border-color:color-mix(in srgb,var(--pw-accent) 32%,var(--pw-border));
}

/* ---------- Light theme polish ---------- */
html[data-theme="light"] body.public-site .public-content{
  background:
    radial-gradient(circle at 10% 10%,rgba(107,63,224,.025),transparent 26%),
    radial-gradient(circle at 90% 18%,rgba(244,183,25,.035),transparent 24%),
    var(--pw-bg)!important;
}
html[data-theme="light"] body.public-site :is(
  .ngh-quick-card,.ngh-about-card,.ngh-programme,.ngh-market-card,.ngh-panel,.ngh-feed-card,
  .nga-card,.nga-stat,.nga-tabs-wrap,.nga-tab,.nga-value,.nga-focus-card,
  .ngp-tools,.ngp-filter,.ngp-card,.ngp-why-card,
  .ngn-tools,.ngn-tab,.ngn-featured,.ngn-card,.ngn-article-body,
  .nge-tools,.nge-tab,.nge-featured,.nge-featured-date,.nge-card,.nge-detail-body,.nge-detail-side,
  .ngf-tools,.ngf-item,.ngf-question,.ngf-side-card,
  .ngd-tools,.ngd-card,.ngd-info-card,
  .ngc-quick-card,.ngc-card,.ngc-form-card
){
  border-color:var(--pw-border)!important;
  box-shadow:var(--pw-shadow)!important;
}
html[data-theme="light"] body.public-site :is(
  .ngh-quick-card,.ngh-about-card,.ngh-programme,.ngh-market-card,.ngh-panel,.ngh-feed-card,
  .nga-card,.nga-stat,.nga-tabs-wrap,.nga-value,.nga-focus-card,
  .ngp-card,.ngp-why-card,.ngn-featured,.ngn-card,.ngn-article-body,
  .nge-featured,.nge-card,.nge-detail-body,.nge-detail-side,
  .ngf-item,.ngf-side-card,.ngd-card,.ngd-info-card,.ngc-quick-card,.ngc-card,.ngc-form-card
){
  background:#fff!important;
}
html[data-theme="light"] body.public-site input,
html[data-theme="light"] body.public-site select,
html[data-theme="light"] body.public-site textarea{
  background:#fff;
  color:#17243a;
  border-color:#dbe3ec;
}

/* ---------- Dark page-variable overrides ---------- */
html[data-theme="dark"]{
  --ngh-ink:#eef4fb;--ngh-muted:#a7b5c8;--ngh-line:#2a3a50;--ngh-soft:#132235;
  --nga-ink:#eef4fb;--nga-muted:#a7b5c8;--nga-line:#2a3a50;--nga-soft:#132235;
  --ngp-ink:#eef4fb;--ngp-muted:#a7b5c8;--ngp-line:#2a3a50;--ngp-soft:#132235;
  --ngn-ink:#eef4fb;--ngn-muted:#a7b5c8;--ngn-line:#2a3a50;--ngn-soft:#132235;
  --nge-ink:#eef4fb;--nge-muted:#a7b5c8;--nge-line:#2a3a50;--nge-soft:#132235;
  --ngf-ink:#eef4fb;--ngf-muted:#a7b5c8;--ngf-line:#2a3a50;--ngf-soft:#132235;
  --ngd-ink:#eef4fb;--ngd-muted:#a7b5c8;--ngd-line:#2a3a50;--ngd-soft:#132235;
  --ngc-ink:#eef4fb;--ngc-muted:#a7b5c8;--ngc-line:#2a3a50;
}

/* ---------- Dark surfaces across public modules ---------- */
html[data-theme="dark"] body.public-site .public-content{
  background:
    radial-gradient(circle at 8% 8%,rgba(111,82,235,.08),transparent 24%),
    radial-gradient(circle at 90% 15%,rgba(244,183,25,.05),transparent 20%),
    var(--pw-bg)!important;
}
html[data-theme="dark"] body.public-site :is(
  .ngh-home,.nga-about,.ngp-page,.ngn-page,.nge-page,.ngf-page,.ngd-page,.ngc-page
){color:var(--pw-text)!important}

html[data-theme="dark"] body.public-site :is(
  .ngh-quick-card,.ngh-about-card,.ngh-programme,.ngh-market-card,.ngh-panel,.ngh-feed-card,
  .nga-float,.nga-card,.nga-stat,.nga-tabs-wrap,.nga-tab,.nga-value,.nga-focus-card,
  .ngp-tools,.ngp-filter,.ngp-card,.ngp-why-card,
  .ngn-tools,.ngn-tab,.ngn-featured,.ngn-card,.ngn-article-body,
  .nge-tools,.nge-tab,.nge-featured,.nge-featured-date,.nge-card,.nge-detail-body,.nge-detail-side,
  .ngf-tools,.ngf-item,.ngf-question,.ngf-side-card,
  .ngd-tools,.ngd-card,.ngd-info-card,
  .ngc-quick-card,.ngc-card,.ngc-form-card
){
  background:var(--pw-surface)!important;
  border-color:var(--pw-border)!important;
  color:var(--pw-text)!important;
  box-shadow:var(--pw-shadow)!important;
}

html[data-theme="dark"] body.public-site :is(
  .ngh-quick-card,.ngh-programme,.ngh-market-card,.ngh-feed-card,
  .nga-card,.nga-stat,.nga-value,.nga-focus-card,
  .ngp-card,.ngp-why-card,
  .ngn-card,.nge-card,.ngf-item,.ngd-card,.ngd-info-card,.ngc-quick-card,.ngc-card
):hover{
  border-color:#3b4d66!important;
  box-shadow:0 15px 34px rgba(0,0,0,.30)!important;
}

html[data-theme="dark"] body.public-site :is(
  .ngh-section,.nga-section,.ngp-section,.ngn-section,.nge-section,.ngf-section,.ngd-section,.ngc-section
){
  color:var(--pw-text)!important;
}

html[data-theme="dark"] body.public-site :is(
  h1,h2,h3,h4,h5,h6,
  .ngh-head h2,.nga-head h2
){color:var(--pw-text)}

html[data-theme="dark"] body.public-site :is(
  p,.muted,
  .ngh-section p,.nga-section p,
  .ngh-card p,.nga-card p,.ngp-card p,.ngn-card p,.nge-card p,.ngf-item p,.ngd-card p,.ngc-card p
){color:var(--pw-muted)}

html[data-theme="dark"] body.public-site :is(
  .ngn-tab,.nge-tab,.ngf-tab,.ngd-tab,.nga-tab,.ngp-filter
){
  background:var(--pw-surface-2)!important;
  color:var(--pw-muted)!important;
  border-color:var(--pw-border)!important;
}
html[data-theme="dark"] body.public-site :is(
  .ngn-tab.active,.nge-tab.active,.ngf-tab.active,.ngd-tab.active,.nga-tab.active,.ngp-filter.active
){
  background:color-mix(in srgb,var(--pw-accent) 16%,var(--pw-surface))!important;
  color:#c8bbff!important;
  border-color:#584b8d!important;
}

html[data-theme="dark"] body.public-site input,
html[data-theme="dark"] body.public-site select,
html[data-theme="dark"] body.public-site textarea{
  background:var(--pw-input)!important;
  color:var(--pw-text)!important;
  border-color:var(--pw-border)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body.public-site input::placeholder,
html[data-theme="dark"] body.public-site textarea::placeholder{color:#7f8da1!important}
html[data-theme="dark"] body.public-site input:focus,
html[data-theme="dark"] body.public-site select:focus,
html[data-theme="dark"] body.public-site textarea:focus{
  border-color:#7f68e8!important;
  box-shadow:0 0 0 3px rgba(127,104,232,.15)!important;
}

html[data-theme="dark"] body.public-site :is(
  table,.financial-document,.oc-panel,.card,.prose
){
  color:var(--pw-text);
}
html[data-theme="dark"] body.public-site table th{
  background:#15263a!important;
  color:#cfdae8!important;
  border-color:var(--pw-border)!important;
}
html[data-theme="dark"] body.public-site table td{
  border-color:var(--pw-border)!important;
  color:#d8e1ed!important;
}
html[data-theme="dark"] body.public-site table tr:nth-child(even) td{
  background:rgba(255,255,255,.012);
}

html[data-theme="dark"] .public-support-label{
  background:var(--pw-surface)!important;
  border-color:var(--pw-border)!important;
  color:var(--pw-text)!important;
  box-shadow:var(--pw-shadow)!important;
}
html[data-theme="dark"] body.public-site>footer.public-footer{
  background:#050d19!important;
  color:#aab8ca!important;
  border-top:1px solid #172438;
}

/* Hero remains intentionally rich in both themes, but dark mode gains cleaner contrast */
html[data-theme="dark"] body.public-site :is(
  .ngh-hero,.nga-hero,.ngp-hero,.ngn-hero,.nge-hero,.ngf-hero,.ngd-hero,.ngc-hero
){
  box-shadow:0 25px 58px rgba(0,0,0,.32)!important;
}
html[data-theme="dark"] body.public-site :is(
  .ngh-hero p,.nga-hero p,.ngp-hero p,.ngn-hero p,.nge-hero p,.ngf-hero p,.ngd-hero p,.ngc-hero p
){color:#eef4fb!important}

/* ---------- General readability ---------- */
body.public-site .public-content{
  font-size:15px;
  line-height:1.65;
}
body.public-site :is(button,input,select,textarea,a){text-rendering:optimizeLegibility}
body.public-site :is(input,select,textarea){min-height:42px}
body.public-site :is(.ngh-btn,.nga-btn,.ngp-btn,.ngc-btn,.oc-btn,.cd-btn,.cm-btn,.cc-btn){
  min-height:42px;
  align-items:center;
}
body.public-site :is(.ngh-quick-card,.nga-card,.ngp-card,.ngn-card,.nge-card,.ngf-item,.ngd-card,.ngc-card){
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

/* Mobile */
@media(max-width:1080px){
  .public-theme-switch{display:none!important}
}
@media(max-width:620px){
  body.public-site .public-content{font-size:14px}
  .public-mobile-theme button{min-height:58px}
}
@media(prefers-reduced-motion:reduce){
  body.public-site *,body.public-site *::before,body.public-site *::after{
    transition:none!important;
    animation:none!important;
  }
}
