
/* NG theme and desktop-layout correction — July 2026
   Semantic surface colors keep every component readable in both modes. */
:root,
html[data-theme="light"]{
  --ng-page:#ffffff;
  --ng-page-alt:#f4f7fb;
  --ng-card:#ffffff;
  --ng-card-soft:#f8fbff;
  --ng-heading:#07172f;
  --ng-text:#26354a;
  --ng-muted:#586579;
  --ng-border:#dce3ec;
  --ng-link:#003d97;
  --ng-header:rgba(255,255,255,.96);
  --ng-input:#ffffff;
  --ng-shadow:0 10px 30px rgba(7,23,47,.07);
}
html[data-theme="dark"]{
  --ng-page:#07111f;
  --ng-page-alt:#0a1728;
  --ng-card:#0f2035;
  --ng-card-soft:#132943;
  --ng-heading:#f1f6fc;
  --ng-text:#dbe6f2;
  --ng-muted:#adbbce;
  --ng-border:#314966;
  --ng-link:#8ab9ff;
  --ng-header:rgba(7,17,31,.97);
  --ng-input:#091827;
  --ng-shadow:0 12px 34px rgba(0,0,0,.22);
}

/* Stable desktop header: logo, navigation, theme switch, menu button. */
.site-header .header-inner{width:min(calc(100% - 36px),1280px);max-width:1280px;}
.header-inner>.brand{order:1;flex:0 0 auto;}
.header-inner>.primary-nav{order:2;margin-left:auto;}
.header-inner>.theme-toggle-header{order:3;margin-left:0;}
.header-inner>.menu-toggle{order:4;}
.primary-nav{gap:14px;}
.nav-link{font-size:.82rem;white-space:nowrap;}
.theme-toggle{min-width:42px;width:42px;height:42px;padding:0;border-radius:12px;flex:0 0 auto;}
.theme-toggle-label{display:none!important;}
.theme-toggle-icon{font-size:1.08rem;}

/* Base public theme surfaces. */
body:not(.portal-body):not(.portal-auth-body){background:var(--ng-page);color:var(--ng-text);}
body:not(.portal-body):not(.portal-auth-body) .site-header{background:var(--ng-header);border-color:var(--ng-border);}
body:not(.portal-body):not(.portal-auth-body) .section:not(.section-dark):not(.cta-section):not(.section-muted){background:var(--ng-page);}
body:not(.portal-body):not(.portal-auth-body) .section-muted{background:var(--ng-page-alt);}
body:not(.portal-body):not(.portal-auth-body) :is(h1,h2,h3,h4,h5,h6,strong,legend,label,summary,dt){color:var(--ng-heading);}
body:not(.portal-body):not(.portal-auth-body) :is(p,dd,.lead,.hero-lead,.microcopy,.path-price,.plan-onboarding,.contact-email small,.service-accordion summary small){color:var(--ng-muted);}
body:not(.portal-body):not(.portal-auth-body) :is(.eyebrow,.text-link,.table-action,.path-kicker,.plan-label,.status-label){color:var(--ng-link);}
body:not(.portal-body):not(.portal-auth-body) :is(input,select,textarea){background:var(--ng-input);border-color:var(--ng-border);color:var(--ng-heading);}
body:not(.portal-body):not(.portal-auth-body) :is(input,select,textarea)::placeholder{color:var(--ng-muted);opacity:.85;}
body:not(.portal-body):not(.portal-auth-body) .theme-toggle{background:var(--ng-card);border-color:var(--ng-border);color:var(--ng-heading);box-shadow:none;}
body:not(.portal-body):not(.portal-auth-body) .theme-toggle:hover{color:var(--ng-link);border-color:var(--ng-link);}

/* Every light card/surface receives one matching theme treatment. */
body:not(.portal-body):not(.portal-auth-body) :is(
  .trust-strip,.path-card,.standard-card,.service-card,.step-card,.benefit,
  .price-snapshot,.admin-team-visual,.comparison-wrap,.admin-comparison-wrap,
  .service-accordion,.category-accordion,.partner-category,.responsibility-panel,
  .responsibility-card,.detail-card,.contact-form,.contact-info,.leadership-card,
  .pricing-summary,.feature-banner,.training-banner,.support-category-card,
  .admin-plan-card,.eligibility-card,.custom-team-card,.faq-item,.notice,
  .included-strip,.process-strip article,.brand-showcase-logo,.contact-email,
  .pill-list span,.timeline-content,.portal-summary-grid div
){background:var(--ng-card);border-color:var(--ng-border);color:var(--ng-text);box-shadow:var(--ng-shadow);}
body:not(.portal-body):not(.portal-auth-body) :is(
  .price-snapshot .highlight,.popular-row,.service-accordion[open] summary,
  .category-accordion[open] summary,.team-lines span,.training-checks span,
  .included-strip span,.portal-summary-grid div
){background:var(--ng-card-soft);color:var(--ng-heading);}
body:not(.portal-body):not(.portal-auth-body) :is(
  .path-price strong,.price-snapshot strong,.pricing-summary strong,.accordion-price,
  .plan-price,.plan-hours,.category-accordion summary,.contact-email span,
  .comparison-table td strong,.admin-comparison-table td strong
){color:var(--ng-heading)!important;}
body:not(.portal-body):not(.portal-auth-body) :is(
  .price-snapshot span,.comparison-table td,.admin-comparison-table td,
  .process-strip p,.step-card p,.benefit p,.support-category-card p,
  .partner-category p,.responsibility-panel p,.timeline-content p
){color:var(--ng-muted);}
body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table td,.comparison-table th,.admin-comparison-table td,.admin-comparison-table th,.price-snapshot>div){border-color:var(--ng-border);}
body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table td,.admin-comparison-table td){background:var(--ng-card);}
body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table th,.admin-comparison-table th){background:#0b2b59;color:#fff;}
body:not(.portal-body):not(.portal-auth-body) .mini-path{background:var(--ng-card);border-color:var(--ng-border);}
body:not(.portal-body):not(.portal-auth-body) .mini-path strong{color:var(--ng-heading);}
body:not(.portal-body):not(.portal-auth-body) .mini-path small{color:var(--ng-muted);}
body:not(.portal-body):not(.portal-auth-body) .mini-number{background:var(--ng-card-soft);color:var(--ng-link);}
body:not(.portal-body):not(.portal-auth-body) .button-outline{background:var(--ng-card);border-color:var(--ng-border);color:var(--ng-heading);}
body:not(.portal-body):not(.portal-auth-body) .button-secondary{background:#fff;color:#07172f;}
body:not(.portal-body):not(.portal-auth-body) .primary-nav{background:var(--ng-card);border-color:var(--ng-border);}
body:not(.portal-body):not(.portal-auth-body) .nav-link{color:var(--ng-text);}
body:not(.portal-body):not(.portal-auth-body) .nav-link:hover,
body:not(.portal-body):not(.portal-auth-body) .nav-link.active{color:var(--ng-link);}
body:not(.portal-body):not(.portal-auth-body) .brand-copy strong{color:var(--ng-heading);}
body:not(.portal-body):not(.portal-auth-body) .brand-copy small{color:var(--ng-muted);}

/* Keep intentionally dark marketing sections dark in both modes. */
body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section,.site-footer){color:#fff;}
body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section,.site-footer) :is(h1,h2,h3,h4,strong,summary,label){color:#fff;}
body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section,.site-footer) p{color:#d5e1ef;}

/* Portal semantic theme correction. */
html[data-theme="light"]{
  --portal-page:#f3f6fa;--portal-card:#fff;--portal-card-soft:#f4f7fb;
  --portal-heading:#07172f;--portal-text:#26354a;--portal-muted2:#5d6a7c;
  --portal-border2:#dce3ec;--portal-input:#fff;--portal-header2:#fff;
}
html[data-theme="dark"]{
  --portal-page:#07111f;--portal-card:#0f2035;--portal-card-soft:#132943;
  --portal-heading:#f1f6fc;--portal-text:#dbe6f2;--portal-muted2:#adbbce;
  --portal-border2:#314966;--portal-input:#091827;--portal-header2:#0a1728;
}
body.portal-body,body.portal-auth-body{background:var(--portal-page);color:var(--portal-text);}
.portal-header{background:var(--portal-header2);border-color:var(--portal-border2);}
:is(.portal-panel,.portal-stat,.portal-opportunity-card,.portal-auth-card,.portal-document-request){background:var(--portal-card);border-color:var(--portal-border2);color:var(--portal-text);box-shadow:var(--ng-shadow);}
:is(.portal-welcome h1,.portal-panel h2,.portal-panel-heading h2,.portal-opportunity-card h3,.portal-stat strong,.portal-summary-grid strong,.portal-action-list strong,.portal-form label,.portal-brand,.portal-audit-list strong,.portal-document-request h3,.portal-message strong){color:var(--portal-heading);}
:is(.portal-welcome p,.portal-opportunity-card p,.portal-muted,.portal-stat span,.portal-card-meta,.portal-document-request p,.portal-document-request small,.portal-activity-list p,.portal-activity-list small,.portal-brand small,.portal-message span){color:var(--portal-muted2);}
:is(.portal-action-list a,.portal-summary-grid div,.portal-secret,.portal-user-head,.portal-closed-request,.portal-stage,.portal-tabs){background:var(--portal-card-soft);border-color:var(--portal-border2);color:var(--portal-text);}
:is(.portal-form input,.portal-form select,.portal-form textarea,.portal-inline-form input,.portal-inline-form textarea,.portal-panel select,.portal-search,.portal-review-form select,.portal-review-form textarea,.portal-user-row select,.portal-approval-form input[type=text]){background:var(--portal-input);border-color:var(--portal-border2);color:var(--portal-heading);}
:is(.portal-button-secondary,.portal-subnav a,.portal-tabs button.active){background:var(--portal-card-soft);border-color:var(--portal-border2);color:var(--portal-heading);}
.portal-file-list,.portal-request-form,.portal-request-actions,.portal-review-form{background:var(--portal-card-soft);border-color:var(--portal-border2);}
.portal-message{background:var(--portal-card-soft);color:var(--portal-text);}
html[data-theme="dark"] .portal-message.client{background:#17375c;}
html[data-theme="light"] .portal-message.client{background:#e6f0ff;}
.portal-theme-note{color:var(--portal-muted2);}

/* Desktop and tablet navigation collapses before it can crowd. */
@media(max-width:1180px){
  .menu-toggle{display:block;}
  .primary-nav{position:fixed;left:20px;right:20px;top:76px;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:16px;border:1px solid var(--ng-border);border-radius:18px;box-shadow:var(--ng-shadow);opacity:0;visibility:hidden;transform:translateY(-10px);transition:.2s;max-height:calc(100dvh - 92px);overflow-y:auto;margin-left:0!important;}
  .primary-nav.open{opacity:1;visibility:visible;transform:none;}
  .nav-link{padding:13px 10px;font-size:.95rem;}
  .nav-link.active:after{display:none;}
  .nav-cta{display:inline-flex;margin-top:10px;}
}
@media(min-width:1181px){.menu-toggle{display:none!important;}.primary-nav{position:static!important;opacity:1!important;visibility:visible!important;transform:none!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important;}}

/* Mobile card/table colors in both themes. */
@media(max-width:700px){
  body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table tr,.admin-comparison-table tr){background:var(--ng-card);border-color:var(--ng-border);color:var(--ng-text);}
  body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table td:before,.admin-comparison-table td:before){color:var(--ng-muted);}
}
@media(max-width:760px){
  .site-header .header-inner{width:min(calc(100% - 24px),1280px);}
  .header-inner>.primary-nav{order:4;}
  .header-inner>.theme-toggle-header{order:2;margin-left:auto;}
  .header-inner>.menu-toggle{order:3;}
  .brand-copy strong{max-width:180px;overflow:hidden;text-overflow:ellipsis;}
}


/* Final visibility and hero-balance corrections. */
body:not(.portal-body):not(.portal-auth-body) .skip-link{background:var(--ng-card);color:var(--ng-heading);border:1px solid var(--ng-border);}
body:not(.portal-body):not(.portal-auth-body) .nav-login{color:var(--ng-heading)!important;border-color:var(--ng-border)!important;background:var(--ng-card);}
body:not(.portal-body):not(.portal-auth-body) .nav-login:hover{color:var(--ng-link)!important;border-color:var(--ng-link)!important;}
body:not(.portal-body):not(.portal-auth-body) :is(
 .comparison-table a,.admin-comparison-table a,.service-accordion a,.category-accordion a,
 .detail-card a,.faq-item a,.contact-info a:not(.button),.pricing-summary a
){color:var(--ng-link);}
body:not(.portal-body):not(.portal-auth-body) :is(
 .process-strip article>span,.standard-card>span,.step-card>span,.timeline-item>span,
 .accordion-body a,.category-accordion summary>span
){color:var(--ng-link);}

@media(min-width:1021px){
  .compact-hero .hero-grid{grid-template-columns:minmax(0,1.08fr) minmax(430px,.92fr);gap:58px;align-items:center;}
  .compact-hero .hero-copy{max-width:660px;}
  .compact-hero .hero-copy h1{font-size:clamp(3rem,3.75vw,3.75rem);line-height:1.03;max-width:none;text-wrap:balance;}
  .compact-hero .hero-lead{max-width:38rem;}
  .service-path-preview{height:auto;min-height:0;align-self:center;padding:24px;}
}
@media(max-width:1020px){
  .compact-hero .hero-copy h1{max-width:14ch;text-wrap:balance;}
}

/* Preserve white portal branding on the permanent navy login panel. */
.portal-auth-brand .portal-brand-light,
.portal-auth-brand .portal-brand-light strong{color:#fff!important;}
.portal-auth-brand .portal-brand-light small{color:#bfd0e4!important;}

/* Comprehensive light/dark contrast repair — July 28, 2026 */
html[data-theme="light"]{
  --ng-hero-start:#ffffff;
  --ng-hero-mid:#f2f7fd;
  --ng-hero-end:#eaf2fb;
  --ng-positive-bg:#eaf7f0;
  --ng-positive-text:#17633f;
  --ng-warning-bg:#fff5d9;
  --ng-warning-text:#765300;
  --ng-danger-bg:#ffebe8;
  --ng-danger-text:#9f2218;
}
html[data-theme="dark"]{
  --ng-hero-start:#081321;
  --ng-hero-mid:#0b1d33;
  --ng-hero-end:#102944;
  --ng-positive-bg:#123522;
  --ng-positive-text:#8ce1b0;
  --ng-warning-bg:#3a3017;
  --ng-warning-text:#f1d68c;
  --ng-danger-bg:#40201e;
  --ng-danger-text:#ffaaa3;
}

/* Page and hero surfaces */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .hero{
  background:
    radial-gradient(circle at 84% 12%,rgba(66,137,224,.20),transparent 31%),
    linear-gradient(135deg,var(--ng-hero-start) 0%,var(--ng-hero-mid) 58%,var(--ng-hero-end) 100%);
}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .page-hero{
  background:
    radial-gradient(circle at 50% 0,rgba(70,139,224,.18),transparent 44%),
    linear-gradient(180deg,var(--ng-hero-start),var(--ng-hero-mid));
  border-color:var(--ng-border);
}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) :is(.hero,.page-hero) :is(h1,h2,h3,strong){color:#f6f9fd;}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) :is(.hero,.page-hero) :is(p,.hero-lead,.microcopy){color:#c4d1e0;}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) :is(.hero,.page-hero) :is(h1,h2,h3,strong){color:#07172f;}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) :is(.hero,.page-hero) :is(p,.hero-lead,.microcopy){color:#526174;}

/* Normal sections, cards, legal content and secondary surfaces */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(
  .legal-link-card,.faq-aside,.detail-columns aside,.custom-team-card.compact,
  .admin-hours-note,.plan-savings
){background:var(--ng-card-soft);border-color:var(--ng-border);color:var(--ng-text);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .legal-link-section{background:var(--ng-page);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .legal-link-card{box-shadow:var(--ng-shadow);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.legal-content,.accordion-body,.category-accordion>div,.faq-item>div,.detail-columns aside){color:var(--ng-text);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.legal-content p,.legal-content li,.accordion-body p,.accordion-body li,.category-accordion li,.faq-item div p,.faq-item div li,.detail-columns aside p,.detail-columns aside li){color:var(--ng-muted);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.legal-content a,.faq-item a,.accordion-body a,.category-accordion a){color:var(--ng-link);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.legal-content code,.legal-content pre){background:var(--ng-card-soft);color:var(--ng-heading);border-color:var(--ng-border);}

/* Make every small/supporting label readable */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(
  small,.file-label small,.admin-comparison-table td small,.comparison-table td small,
  .path-note,.form-note,.consent,.consent span,.included-strip span
){color:var(--ng-muted);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.admin-comparison-table td span:not(.savings-badge),.comparison-table td span){color:var(--ng-muted);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.table-action,.comparison-table a,.admin-comparison-table a){color:var(--ng-link);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .table-badge{background:#b7d1f5;color:#07172f;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .savings-badge{background:var(--ng-positive-bg);color:var(--ng-positive-text);border:1px solid color-mix(in srgb,var(--ng-positive-text) 28%,transparent);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .plan-savings{background:var(--ng-card-soft);color:var(--ng-link);border:1px solid var(--ng-border);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .admin-plan-card.featured .plan-savings{background:#1559b1;color:#fff;border-color:#1559b1;}

/* Notices retain strong contrast in both modes */
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) .notice{background:#fff8e8;border-color:#ead9ad;color:#695d44;}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) .notice :is(strong,p){color:#695d44;}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) .notice{background:#342b17;border-color:#675529;color:#f1ddb0;}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) .notice :is(strong,p){color:#f1ddb0;}

/* Forms and controls */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(fieldset,legend,label,.consent span){color:var(--ng-heading);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(input,select,textarea){background:var(--ng-input);color:var(--ng-heading);border-color:var(--ng-border);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(input,select,textarea):focus{border-color:var(--ng-link);box-shadow:0 0 0 3px color-mix(in srgb,var(--ng-link) 22%,transparent);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) select option{background:var(--ng-input);color:var(--ng-heading);}

/* Fixed dark sections always use light text */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section,.site-footer){background:linear-gradient(145deg,#05080d,#07172f 58%,#0b2b59);color:#fff;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section,.site-footer) :is(h1,h2,h3,h4,h5,h6,strong,legend,label,summary,li,a){color:#fff;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section,.site-footer) :is(p,small,.microcopy,.lead,.hero-lead){color:#d5e1ef;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .site-footer :is(.footer-email,.footer-services,.brand-copy small){color:#b9d2ee;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.section-dark,.cta-section) .eyebrow{color:#a9caff;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .button-primary{background:#1559b1;color:#fff;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .button-primary :is(span,svg){color:#fff;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.button-light,.button-secondary){background:#fff;color:#07172f;border-color:#fff;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.button-light,.button-secondary) :is(span,svg){color:#07172f;}

/* Header and mobile menu */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .menu-toggle span:not(.sr-only){background:var(--ng-heading);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .primary-nav{color:var(--ng-text);}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .nav-login{background:var(--ng-card);color:var(--ng-heading)!important;}

/* Portal: complete semantic theme coverage */
html[data-theme] body.portal-body,
html[data-theme] body.portal-auth-body{background:var(--portal-page);color:var(--portal-text);}
html[data-theme] :is(.portal-main,.portal-layout,.portal-workspace-grid,.portal-sidebar){color:var(--portal-text);}
html[data-theme] :is(
  .portal-panel,.portal-stat,.portal-opportunity-card,.portal-auth-card,.portal-document-request,
  .portal-user-table,.portal-admin-list article,.portal-audit-list article
){background:var(--portal-card);border-color:var(--portal-border2);color:var(--portal-text);box-shadow:var(--ng-shadow);}
html[data-theme] :is(
  .portal-welcome h1,.portal-panel h1,.portal-panel h2,.portal-panel h3,.portal-panel-heading h2,
  .portal-opportunity-card h3,.portal-stat strong,.portal-summary-grid strong,.portal-action-list strong,
  .portal-form label,.portal-inline-form label,.portal-review-form label,.portal-user-row strong,
  .portal-document-request h3,.portal-message strong,.portal-audit-list strong,.portal-admin-list strong,
  .portal-auth-card h1,.portal-auth-card h2,.portal-auth-card h3
){color:var(--portal-heading);}
html[data-theme] :is(
  .portal-welcome p,.portal-opportunity-card p,.portal-muted,.portal-stat span,.portal-card-meta,
  .portal-document-request p,.portal-document-request small,.portal-activity-list p,.portal-activity-list small,
  .portal-brand small,.portal-message span,.portal-message p,.portal-form-message,.portal-security-note,
  .portal-optional,.portal-admin-list span,.portal-admin-list small,.portal-audit-list span,.portal-audit-list small,
  .portal-summary-grid span,.portal-upload-area>span
){color:var(--portal-muted2);}
html[data-theme] :is(
  .portal-action-list a,.portal-summary-grid div,.portal-secret,.portal-user-head,.portal-closed-request,
  .portal-stage,.portal-tabs,.portal-file-list,.portal-request-form,.portal-request-actions,.portal-review-form,
  .portal-subnav a,.portal-button-secondary
){background:var(--portal-card-soft);border-color:var(--portal-border2);color:var(--portal-text);}
html[data-theme] :is(
  .portal-form input,.portal-form select,.portal-form textarea,.portal-inline-form input,.portal-inline-form textarea,
  .portal-panel select,.portal-search,.portal-review-form select,.portal-review-form textarea,
  .portal-user-row select,.portal-approval-form input[type=text]
){background:var(--portal-input);border-color:var(--portal-border2);color:var(--portal-heading);}
html[data-theme] :is(.portal-form input,.portal-form textarea,.portal-search,.portal-inline-form input,.portal-inline-form textarea)::placeholder{color:var(--portal-muted2);opacity:.85;}
html[data-theme] .portal-form select option{background:var(--portal-input);color:var(--portal-heading);}
html[data-theme] .portal-button-primary{background:#1559b1;color:#fff;}
html[data-theme] .portal-button-primary *{color:#fff;}
html[data-theme] :is(.portal-text-button,.portal-upload-button,.portal-back-link.dark){color:var(--ng-link);}
html[data-theme] .portal-progress{background:var(--portal-card-soft);}
html[data-theme] .portal-stage span{background:var(--portal-card-soft);color:var(--portal-muted2);}
html[data-theme] .portal-stage small{color:var(--portal-muted2);}
html[data-theme] .portal-stage.complete span{background:var(--ng-positive-bg);color:var(--ng-positive-text);}
html[data-theme] .portal-stage.current span{background:#1559b1;color:#fff;}
html[data-theme] .portal-stage.current small{color:var(--portal-heading);}
html[data-theme] .portal-message{background:var(--portal-card-soft);color:var(--portal-text);}
html[data-theme="light"] .portal-message.client{background:#e6f0ff;color:#20334b;}
html[data-theme="dark"] .portal-message.client{background:#17375c;color:#e9f2ff;}
html[data-theme] .portal-file-policy{background:var(--portal-card-soft);border-color:var(--portal-border2);color:var(--portal-text);}
html[data-theme] .portal-review-note,
html[data-theme] .portal-demo-notice{background:var(--ng-warning-bg);border-color:color-mix(in srgb,var(--ng-warning-text) 38%,transparent);color:var(--ng-warning-text);}
html[data-theme] .portal-review-note *,
html[data-theme] .portal-demo-notice *{color:var(--ng-warning-text);}
html[data-theme] .portal-approved-record{background:var(--ng-positive-bg);border-color:color-mix(in srgb,var(--ng-positive-text) 38%,transparent);color:var(--ng-positive-text);}
html[data-theme] .portal-status{background:var(--portal-card-soft);color:var(--ng-link);}
html[data-theme] .portal-status.success{background:var(--ng-positive-bg);color:var(--ng-positive-text);}
html[data-theme] .portal-status.warning{background:var(--ng-warning-bg);color:var(--ng-warning-text);}
html[data-theme] .portal-status.danger{background:var(--ng-danger-bg);color:var(--ng-danger-text);}
html[data-theme] :is(.portal-empty,.portal-loading){border-color:var(--portal-border2);color:var(--portal-muted2);}

/* Portal authentication page */
html[data-theme] .portal-auth-shell-balanced{background:var(--portal-page);}
html[data-theme] .portal-auth-brand{background:radial-gradient(circle at 20% 10%,rgba(45,111,197,.35),transparent 30%),linear-gradient(140deg,#06152c,#0b2b59);color:#fff;}
html[data-theme] .portal-auth-brand :is(h1,h2,h3,strong,li,a){color:#fff;}
html[data-theme] .portal-auth-brand :is(p,small){color:#c8d8ea;}
html[data-theme] .portal-auth-card{background:var(--portal-card);border:1px solid var(--portal-border2);color:var(--portal-text);}
html[data-theme] .portal-tabs{background:var(--portal-card-soft);border:1px solid var(--portal-border2);}
html[data-theme] .portal-tabs button{color:var(--portal-muted2);}
html[data-theme] .portal-tabs button.active{background:var(--portal-card);color:var(--portal-heading);box-shadow:0 3px 12px rgba(7,23,47,.12);}
html[data-theme] .portal-consent span{color:var(--portal-muted2);}
html[data-theme] .portal-consent a{color:var(--ng-link);}
html[data-theme] .portal-security-note{border-color:var(--portal-border2);}
html[data-theme] .theme-toggle{background:var(--portal-card);border-color:var(--portal-border2);color:var(--portal-heading);}

/* Permanent navy portal hero keeps white text */
html[data-theme] .portal-opportunity-hero{background:linear-gradient(140deg,#07172f,#0b2b59);color:#fff;}
html[data-theme] .portal-opportunity-hero :is(h1,h2,h3,strong){color:#fff;}
html[data-theme] .portal-opportunity-hero :is(p,span,small){color:#c6d6e9;}

/* Focus visibility */
html[data-theme] :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #6fa8f2;outline-offset:3px;}

@media(max-width:700px){
  html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table tr,.admin-comparison-table tr){background:var(--ng-card)!important;color:var(--ng-text);}
  html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table td,.admin-comparison-table td){background:transparent!important;color:var(--ng-muted);}
  html[data-theme] body:not(.portal-body):not(.portal-auth-body) :is(.comparison-table td strong,.admin-comparison-table td strong){color:var(--ng-heading)!important;}
}

/* Final targeted contrast safeguards */
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .timeline-item>span{background:#07172f;color:#fff!important;}
html[data-theme] body:not(.portal-body):not(.portal-auth-body) .leader-mark{color:#fff!important;}
html[data-theme] .portal-kicker{color:var(--ng-link);}
html[data-theme] .portal-opportunity-hero .portal-kicker{color:#a9caff;}
html[data-theme] .portal-deadline strong{color:var(--ng-link);}
html[data-theme] .portal-action-list span{color:var(--portal-muted2);}
html[data-theme] :is(.portal-file-version,.portal-user-row,.portal-approval-reference,.portal-mfa-card){background:var(--portal-card-soft);border-color:var(--portal-border2);color:var(--portal-text);}
html[data-theme] :is(.portal-file-meta,.portal-file-version small,.portal-user-row span,.portal-user-row small,.portal-approval-reference span){color:var(--portal-muted2);}
html[data-theme] :is(.portal-file-version strong,.portal-user-row strong,.portal-approval-reference strong,.portal-mfa-card h2,.portal-mfa-card h3){color:var(--portal-heading);}
html[data-theme] .portal-mfa-qr{background:#fff;border-color:var(--portal-border2);}
html[data-theme] .portal-demo-bar{background:var(--ng-warning-bg);border-color:color-mix(in srgb,var(--ng-warning-text) 38%,transparent);color:var(--ng-warning-text);}
html[data-theme] .portal-form-message.success{color:var(--ng-positive-text);}
html[data-theme] .portal-form-message.warning{color:var(--ng-warning-text);}
html[data-theme] .portal-form-message.error{color:var(--ng-danger-text);}
html[data-theme] .portal-link-button{color:var(--portal-text);}
html[data-theme] .portal-link-button:hover{color:var(--ng-link);}

/* Verified service detail-card contrast — July 29, 2026 */
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) .service-quick-grid > div {
  background:#132943 !important;
  border:1px solid #36516f !important;
  color:#f4f7fb !important;
}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) .service-quick-grid > div h3 {
  color:#ffffff !important;
}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) .service-quick-grid > div p {
  color:#c8d6e6 !important;
}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) .service-quick-grid > div {
  background:#ffffff !important;
  border:1px solid #dce3ec !important;
  color:#26354a !important;
}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) .service-quick-grid > div h3 {
  color:#07172f !important;
}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) .service-quick-grid > div p {
  color:#586579 !important;
}


/* SITE-WIDE BUG FIX: mobile menu, anchors, and theme contrast — 2026-07-29 */
html{scroll-padding-top:96px;} [id]{scroll-margin-top:96px;}
@media(max-width:1020px){
  html body:not(.portal-body):not(.portal-auth-body) .site-header .primary-nav{
    display:flex!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(-10px)!important;
  }
  html body:not(.portal-body):not(.portal-auth-body) .site-header .primary-nav.open{
    display:flex!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:translateY(0)!important;z-index:1000!important;
  }
  html.nav-open,html.nav-open body{overflow:hidden;}
}
@media(min-width:1021px){
  html body:not(.portal-body):not(.portal-auth-body) .site-header .primary-nav{display:flex!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important;}
}
html[data-theme="light"],html[data-theme="light"] body{background:#fff!important;color:#26354a!important;}
html[data-theme="dark"],html[data-theme="dark"] body{background:#07111f!important;color:#dbe6f2!important;}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) :is(.path-card,.standard-card,.service-card,.step-card,.benefit,.service-accordion,.category-accordion,.partner-category,.responsibility-panel,.responsibility-card,.contact-form,.leadership-card,.faq-item,.notice,.price-snapshot,.comparison-wrap,.admin-comparison-wrap,.training-banner,.admin-team-visual,.custom-team-card){background:#fff!important;border-color:#dce3ec!important;color:#26354a!important;}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) :is(.path-card,.standard-card,.service-card,.step-card,.benefit,.service-accordion,.category-accordion,.partner-category,.responsibility-panel,.responsibility-card,.contact-form,.leadership-card,.faq-item,.notice,.price-snapshot,.comparison-wrap,.admin-comparison-wrap,.training-banner,.admin-team-visual,.custom-team-card) :is(h1,h2,h3,h4,strong,summary,label,legend){color:#07172f!important;}
html[data-theme="light"] body:not(.portal-body):not(.portal-auth-body) :is(.path-card,.standard-card,.service-card,.step-card,.benefit,.service-accordion,.category-accordion,.partner-category,.responsibility-panel,.responsibility-card,.contact-form,.leadership-card,.faq-item,.notice,.price-snapshot,.comparison-wrap,.admin-comparison-wrap,.training-banner,.admin-team-visual,.custom-team-card) :is(p,small,li){color:#586579!important;}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) :is(.path-card,.standard-card,.service-card,.step-card,.benefit,.service-accordion,.category-accordion,.partner-category,.responsibility-panel,.responsibility-card,.contact-form,.leadership-card,.faq-item,.notice,.price-snapshot,.comparison-wrap,.admin-comparison-wrap,.training-banner,.admin-team-visual,.custom-team-card){background:#0f2035!important;border-color:#314966!important;color:#dbe6f2!important;}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) :is(.path-card,.standard-card,.service-card,.step-card,.benefit,.service-accordion,.category-accordion,.partner-category,.responsibility-panel,.responsibility-card,.contact-form,.leadership-card,.faq-item,.notice,.price-snapshot,.comparison-wrap,.admin-comparison-wrap,.training-banner,.admin-team-visual,.custom-team-card) :is(h1,h2,h3,h4,strong,summary,label,legend){color:#f1f6fc!important;}
html[data-theme="dark"] body:not(.portal-body):not(.portal-auth-body) :is(.path-card,.standard-card,.service-card,.step-card,.benefit,.service-accordion,.category-accordion,.partner-category,.responsibility-panel,.responsibility-card,.contact-form,.leadership-card,.faq-item,.notice,.price-snapshot,.comparison-wrap,.admin-comparison-wrap,.training-banner,.admin-team-visual,.custom-team-card) :is(p,small,li){color:#adbbce!important;}
html[data-theme="light"] body .service-quick-grid>div{background:#f8fbff!important;border-color:#dce3ec!important;color:#26354a!important;}
html[data-theme="light"] body .service-quick-grid>div :is(h3,strong){color:#07172f!important;} html[data-theme="light"] body .service-quick-grid>div :is(p,li,span){color:#586579!important;}
html[data-theme="dark"] body .service-quick-grid>div{background:#132943!important;border-color:#314966!important;color:#dbe6f2!important;}
html[data-theme="dark"] body .service-quick-grid>div :is(h3,strong){color:#f1f6fc!important;} html[data-theme="dark"] body .service-quick-grid>div :is(p,li,span){color:#adbbce!important;}
html[data-theme="light"] body:is(.portal-body,.portal-auth-body){background:#f3f6fa!important;color:#26354a!important;} html[data-theme="dark"] body:is(.portal-body,.portal-auth-body){background:#07111f!important;color:#dbe6f2!important;}
html[data-theme="light"] body:is(.portal-body,.portal-auth-body) :is(.portal-panel,.portal-stat,.portal-opportunity-card,.portal-auth-card,.portal-document-request){background:#fff!important;border-color:#dce3ec!important;color:#26354a!important;}
html[data-theme="dark"] body:is(.portal-body,.portal-auth-body) :is(.portal-panel,.portal-stat,.portal-opportunity-card,.portal-auth-card,.portal-document-request){background:#0f2035!important;border-color:#314966!important;color:#dbe6f2!important;}
html[data-theme="light"] body:is(.portal-body,.portal-auth-body) :is(h1,h2,h3,h4,strong,label,legend,summary){color:#07172f!important;} html[data-theme="dark"] body:is(.portal-body,.portal-auth-body) :is(h1,h2,h3,h4,strong,label,legend,summary){color:#f1f6fc!important;}
html[data-theme="light"] body:is(.portal-body,.portal-auth-body) :is(p,small,.portal-muted,.portal-card-meta){color:#5d6a7c!important;} html[data-theme="dark"] body:is(.portal-body,.portal-auth-body) :is(p,small,.portal-muted,.portal-card-meta){color:#adbbce!important;}
:target{scroll-margin-top:96px;animation:ng-target-flash 1.35s ease-out;} @keyframes ng-target-flash{0%{outline:3px solid rgba(21,89,177,.7);outline-offset:5px}100%{outline:3px solid transparent;outline-offset:9px}} @media(prefers-reduced-motion:reduce){:target{animation:none;}}
