/* Novaj Tech sky preview, sky-v1.
   Loaded after mist-v1.css. Mist is not edited.
   A script in the head sets --sky-1 through --sky-4 and data-sky
   from the visitor's local time before first paint.
   With no script, none of these rules match and the Mist look stays. */

@property --sky-1 { syntax: "<color>"; inherits: true; initial-value: #F4F7FD; }
@property --sky-2 { syntax: "<color>"; inherits: true; initial-value: #E7EEF8; }
@property --sky-3 { syntax: "<color>"; inherits: true; initial-value: #F7F4EE; }
@property --sky-4 { syntax: "<color>"; inherits: true; initial-value: #FBFCFE; }

:root {
  --sky-1: #F4F7FD;
  --sky-2: #E7EEF8;
  --sky-3: #F7F4EE;
  --sky-4: #FBFCFE;
  --sky-gradient: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 34%, var(--sky-3) 68%, var(--sky-4) 100%);
  --sky-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

/* One sky for the page. The gradient covers the first screen.
   Below that the base color holds, so lower sections stay one readable tone. */
html[data-sky] {
  background-color: var(--sky-1);
}
html[data-sky] body,
html[data-sky] body:has(> .wrap) {
  background-color: var(--sky-4) !important;
  background-image: var(--sky-grain), var(--sky-gradient) !important;
  background-repeat: repeat, no-repeat !important;
  background-size: 180px 180px, 100% 100vh !important;
  background-position: 0 0, center top !important;
  background-attachment: scroll, scroll !important;
}

/* Mist meshes and washes step aside wherever they covered the page. */
html[data-sky] body main > section,
html[data-sky] body main:not(.hx) > section[style*="background:"],
html[data-sky] body main > section:first-of-type:not(.hx-hero),
html[data-sky] body main > section:nth-of-type(even):not(.hx-hero):not(.hx-end):not(.nv-end-cta):not(.thanks-hero),
html[data-sky] body main > section.hx-end,
html[data-sky] body main > section.nv-end-cta,
html[data-sky] body main .hx-hero,
html[data-sky] body main .hs-feature,
html[data-sky] body main .hs-risk,
html[data-sky] body main .hs-proof,
html[data-sky] body main .hx-proof,
html[data-sky] body main .pg-hero,
html[data-sky] body main .pg-sec,
html[data-sky] body main .ai-strip {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
}
html[data-sky] body main .hs-feature {
  box-shadow: none !important;
}
html[data-sky] body main .hx-hero::before,
html[data-sky] body main .hx-hero::after,
html[data-sky] body main > section:first-of-type:not(.hx-hero)::before,
html[data-sky] body main > section.hx-end::before,
html[data-sky] body main > section.nv-end-cta::before,
html[data-sky] body main .hs-feature::before {
  opacity: 0 !important;
  background: none !important;
  background-image: none !important;
  animation: none !important;
  mix-blend-mode: normal !important;
}

/* Light surfaces keep the Mist ink, so cards, menus and fields stay readable
   on every phase. The header, logo and navy buttons are unchanged. */
html[data-sky="night"] :is(
  header,
  .nh,
  .nh-sheet,
  .nh-panel,
  .pl-card,
  .nv-card,
  .nv-card-d,
  .pg-card,
  .ai-box,
  .ai-chip,
  .nvp3,
  .pg-band,
  .hx-tabs button,
  .hs-pill,
  .nh-feat,
  details[style*="background:#fff"],
  input,
  textarea,
  select
) {
  --mist-ink: #0B1730;
  --mist-body: #1E2C44;
  --mist-small: #243044;
  --mist-navy: #162B4E;
}
html[data-sky] :is(.pl-card, .nv-card, .nv-card-d, .pg-card, .ai-box, .ai-chip, .nvp3, details[style*="background:#fff"]) {
  background-color: #fff !important;
}
html[data-sky] body main .hx-tabs button,
html[data-sky] body main .hx-tabs button:hover,
html[data-sky] body main .hx-tabs button.on {
  background: #fff !important;
}
html[data-sky] .pg-band {
  background-color: #F4F6FA !important;
}
html[data-sky] main :is(input, textarea, select) {
  background-color: #fff !important;
  color: #1E2C44 !important;
  -webkit-text-fill-color: #1E2C44 !important;
}

/* Dark phases. Text on the sky switches to light.
   Roughly from sunset through blue hour (18:15 to 06:20), which is
   when the sky itself is too dark for the Mist ink. */
html[data-sky="night"] {
  --mist-ink: #F4F7FB;
  --mist-body: #E6EDF7;
  --mist-small: #D5DEEE;
  --mist-navy: #F7F9FC;
}
html[data-sky="night"] body {
  color: #E6EDF7;
}
html[data-sky="night"] header,
html[data-sky="night"] .nh,
html[data-sky="night"] .nh-sheet {
  color: #0B1730;
}
html[data-sky="night"] body:has(header) main#main .hx-copy h1:not(#_) {
  background: none !important;
  color: #F4F7FB !important;
  -webkit-text-fill-color: #F4F7FB !important;
}
html[data-sky="night"] body:has(header) main#main nav[aria-label="Breadcrumb"]:not(#_),
html[data-sky="night"] body:has(header) main#main nav[aria-label="Breadcrumb"] :is(a, span):not(#_) {
  color: #D5DEEE !important;
}
html[data-sky="night"] body:has(header) main#main a.hx-tlink:not(#_) {
  color: #F7F9FC !important;
  -webkit-text-fill-color: #F7F9FC !important;
  text-decoration-color: rgba(247, 249, 252, .72) !important;
}
html[data-sky="night"] body:has(header) main#main :is(p, li, .pg-lead, .pg-intro, .pg-note, .pg-crumb) a:not(.pg-btn):not(.hx-btn):not(.nv-b1):not(.nv-b2):not(.hs-go) {
  text-decoration-color: rgba(247, 249, 252, .65) !important;
}
html[data-sky="night"] body:has(header) main#main :is(.pl-card, .nv-card, .nv-card-d, .pg-card, .ai-box, .pg-band, details[style*="background:#fff"]) :is(p, li, .pg-note) a:not(.pg-btn):not(.hx-btn):not(.nv-b1):not(.nv-b2):not(.hs-go) {
  color: #162B4E !important;
  -webkit-text-fill-color: #162B4E !important;
  text-decoration-color: rgba(22, 43, 78, .45) !important;
}

/* Filled second buttons stay navy on white. Ghost buttons on the sky pick up the light type. */
html[data-sky="night"] body:has(header) main#main :is(a.hx-btn-paper, a.nv-b2.nv-b2l):not(#_) {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  color: #162B4E !important;
  -webkit-text-fill-color: #162B4E !important;
  border-color: rgba(22, 43, 78, .22) !important;
}
html[data-sky="night"] body:has(header) main#main > section.nv-end-cta a.nv-b2:not(.nv-b2l):not(#_) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #F7F9FC !important;
  -webkit-text-fill-color: #F7F9FC !important;
  border: 1px solid rgba(247, 249, 252, .55) !important;
}
html[data-sky="day"] body:has(header) main#main > section.nv-end-cta a.nv-b2:not(.nv-b2l):not(#_) {
  border-color: rgba(22, 43, 78, .4) !important;
}

html[data-sky="night"] body:has(header) main#main :is(.pl-table, .pg-table) :is(th, td) {
  color: #E6EDF7 !important;
  border-color: rgba(244, 247, 251, .28) !important;
}
html[data-sky="night"] body:has(header) main#main :is(.pl-table, .pg-table) :is(th, b) {
  color: #F4F7FB !important;
}
html[data-sky="night"] body:has(header) main#main :is(.pl-table thead th, .pl-table thead td, .pg-table thead th) {
  border-bottom-color: rgba(244, 247, 251, .72) !important;
}
html[data-sky="night"] body:has(header) main#main :is(.pl-table, .pg-table) span {
  color: #D5DEEE !important;
}
html[data-sky="night"] main .pg-facts li,
html[data-sky="night"] main .pg-item,
html[data-sky="night"] main .pg-faq details,
html[data-sky="night"] main .hs-stats,
html[data-sky="night"] main .hx-quote + .hx-quote {
  border-color: rgba(244, 247, 251, .32) !important;
}
html[data-sky="night"] main .hx-checks svg {
  color: #E6EDF7 !important;
}
html[data-sky="night"] main :is(a, button, summary, input, select, textarea):focus-visible {
  outline-color: #F4F7FB !important;
}

html[data-sky="night"] body:not(:has(header)) main :is(h1, h2, h3) {
  color: #F4F7FB !important;
  -webkit-text-fill-color: #F4F7FB !important;
}
html[data-sky="night"] body:not(:has(header)) main :is(p, li) {
  color: #E6EDF7 !important;
}
html[data-sky="night"] body:has(> .wrap) {
  color: #E6EDF7 !important;
}
html[data-sky="night"] body:has(> .wrap) .wrap h1 {
  color: #F4F7FB !important;
  -webkit-text-fill-color: #F4F7FB !important;
}
html[data-sky="night"] body:has(> .wrap) .wrap p {
  color: #E6EDF7 !important;
}

@media (prefers-reduced-motion: no-preference) {
  html[data-sky] {
    transition: --sky-1 1.4s linear, --sky-2 1.4s linear, --sky-3 1.4s linear, --sky-4 1.4s linear;
  }
}
