/* ADMS public light/dark theme contract v3.2.7
   Corrects component-specific color inheritance without changing layout. */

/* Public headers stay dark in both site themes. */
header.adms-public-header,
header.adms-home-header{
  color-scheme:dark;
}

/* Static-page account action contrast. */
header.adms-public-header .adms-public-login{
  border-color:#3b404b!important;
  background:#11131a!important;
  color:#f3f0ea!important;
  opacity:1!important;
  -webkit-text-fill-color:#f3f0ea!important;
}
header.adms-public-header .adms-public-login:hover,
header.adms-public-header .adms-public-login:focus-visible{
  border-color:#ff6b00!important;
  color:#ff8127!important;
  -webkit-text-fill-color:#ff8127!important;
}

/* Compiled homepage account controls receive explicit classes in
   homepage-header-v325.js. This prevents the light theme from turning
   the login label dark against the permanent dark header. */
header.adms-home-header .adms-home-login-action{
  border:1px solid #3b404b!important;
  background:#11131a!important;
  color:#f3f0ea!important;
  opacity:1!important;
  -webkit-text-fill-color:#f3f0ea!important;
}
header.adms-home-header .adms-home-login-action:hover,
header.adms-home-header .adms-home-login-action:focus-visible{
  border-color:#ff6b00!important;
  color:#ff8127!important;
  -webkit-text-fill-color:#ff8127!important;
}
header.adms-home-header .adms-home-request-action{
  border-color:#ff6b00!important;
  background:#ff6b00!important;
  color:#160900!important;
  opacity:1!important;
  -webkit-text-fill-color:#160900!important;
}
header.adms-home-header .adms-home-request-action:hover,
header.adms-home-header .adms-home-request-action:focus-visible{
  background:#ff8127!important;
  color:#160900!important;
  -webkit-text-fill-color:#160900!important;
}

/* The Service Operations hero now follows the selected site theme. */
html.dark body.field-resources-page .fr-hero{
  background:
    radial-gradient(circle at 86% 20%,color-mix(in srgb,#00d5ff 8%,transparent),transparent 28%),
    linear-gradient(135deg,#130d08 0%,#08090d 58%,#061014 100%)!important;
}
html:not(.dark) body.field-resources-page .fr-hero{
  background:
    radial-gradient(circle at 86% 20%,rgba(0,163,170,.10),transparent 30%),
    radial-gradient(circle at 10% 8%,rgba(224,83,0,.08),transparent 28%),
    linear-gradient(135deg,#fffaf6 0%,#f8f8fc 55%,#eef8fa 100%)!important;
}

/* The technical poster intentionally remains dark in both themes. */
body.field-resources-page .fr-poster{
  color:#f3f0ea!important;
  background:
    linear-gradient(90deg,#141924 1px,transparent 1px),
    linear-gradient(#141924 1px,transparent 1px),
    #07090e!important;
}
body.field-resources-page .fr-poster strong,
body.field-resources-page .fr-poster small{
  color:#f3f0ea!important;
}
body.field-resources-page .fr-poster p{
  color:#aeb7c6!important;
}

/* Form controls and cards explicitly follow the selected theme. */
body.field-resources-page :where(.fr-module-card,.fr-card,.fr-calc-form,.fr-calc-results,.fr-side-box),
body.tech-tips-page :where(.tt-category-card,.tt-card,.tt-side-box,.tt-check,.tt-callout){
  color:var(--text)!important;
}
body.field-resources-page :where(.fr-module-card h3,.fr-card h3,.fr-section-head h2,.fr-page-hero h1,.fr-article h1),
body.tech-tips-page :where(.tt-category-card b,.tt-card h3,.tt-section h2,.tt-category-hero h1,.tt-article h1){
  color:var(--text-strong)!important;
}

/* Native controls should use the matching browser color scheme. */
html.dark body :where(input,select,textarea){color-scheme:dark}
html:not(.dark) body :where(input,select,textarea){color-scheme:light}
