:root {
  --ring: var(--brand-blue);
  --sidebar-ring: var(--brand-blue);
}

#main-content,
#main-content :is(h1, h2, h3, h4, h5, p, a, label, th, td, summary, button, input, select, textarea),
#site-search :is(h2, p, label, input, button) {
  font-family: var(--font-brand, Kanit, "Noto Sans TC Variable", "Noto Sans TC", sans-serif);
}

/* The product styles also set an important shell color. Keep a single contrast-safe backing. */
[data-site-header] [data-header-shell][data-scrolled] {
  background-color: var(--brand-blue) !important;
}

body:has(.home-hero) [data-site-header] [data-header-shell][data-scrolled="false"] {
  background-color: rgb(8 24 39 / 78%) !important;
  filter: none;
}

[data-site-header] [data-header-shell][data-scrolled] > a img {
  filter: brightness(0) invert(1) !important;
}

[data-site-header] [data-header-shell][data-scrolled] :is([data-nav-item] > a, [data-nav-item] > a > svg, .header-social, [data-site-search-open], [data-language-trigger], [data-slot="sheet-trigger"]) {
  color: var(--brand-white) !important;
}

[data-site-header] [data-header-shell][data-scrolled] :is([data-nav-item] > a, .header-social, [data-site-search-open], [data-language-trigger], [data-slot="sheet-trigger"]):is(:hover, :focus-visible) {
  background-color: rgb(0 0 0 / 20%);
}

[data-site-header] [data-header-shell] [data-nav-item] > a:is(:hover, :focus-visible) {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

#main-content :is(.home-glance, .home-contact, .news-hero + .news-surface) {
  background-color: var(--brand-surface);
}

#main-content :is(.vision-kicker, .home-glance .eyebrow, .home-news .eyebrow, .home-film .eyebrow, .about-section .eyebrow) {
  color: var(--brand-blue);
}

#main-content .glance-gradient {
  isolation: isolate;
}

/* Keep the moving brand gradient readable under white metrics. */
#main-content .glance-gradient::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgb(0 0 0 / 34%);
  pointer-events: none;
  content: "";
}

#main-content .mc_a1t_a .mc_a1t_dian {
  background: var(--brand-cyan);
  border-color: var(--brand-cyan);
  outline: 2px solid var(--brand-deep);
  box-shadow: 0 0 0 3px var(--brand-white);
}

#main-content .mc_a1t_a .mc_a1t_dian::before,
#main-content .mc_a1t_a .mc_a1t_dian::after {
  background: rgb(0 174 239 / 38%);
}

#main-content .mc_a1t_xl {
  background-color: var(--brand-blue);
}

#main-content .news-hero.news-hero-updated[data-pptx-hero] {
  background-color: var(--brand-blue);
}

#main-content.product-site :is(.cabinet-artboard, .legion-artboard) {
  background-color: var(--brand-cyan);
}

#main-content.product-site .cabinet-artboard .sheet-logo {
  margin-block-start: -12px;
}

@media (width <= 600px) {
  #main-content.product-site .cabinet-artboard .sheet-logo {
    width: 164px;
    margin-block-start: 0;
  }

  #main-content.product-site .legion-artboard .sheet-logo {
    width: 154px;
  }
}

#main-content.product-site :is(.title-rule, .feature-symbol) {
  background-color: var(--brand-cyan);
  color: var(--brand-black);
}

#main-content.product-site .certification-strip {
  background-color: var(--brand-surface);
}

#main-content :is(.pdf-link, .specs-heading h2, .hero-subtitle, .etica-solution-cta) {
  color: var(--brand-blue);
}

#main-content table thead,
#main-content table thead :is(th, td) {
  background: var(--brand-blue);
  color: var(--brand-white);
}

#main-content table tbody tr:nth-child(even),
#main-content .etica-solution-table-wrap tbody td:last-child,
#main-content.product-site .spec-table tbody :is(th, td) {
  background-color: var(--brand-surface);
  color: var(--brand-ink);
}

#main-content :is(.etica-solution-card, .esg-hero-media) {
  background-color: var(--brand-surface);
  border-color: var(--brand-border);
}

html[lang="en"] #main-content .health-talk > p {
  white-space: normal;
}

#main-content :is([role="tab"][aria-selected="true"], nav a[aria-current="location"], nav a[aria-current="true"], .assessment-submit) {
  background: var(--brand-blue);
  color: var(--brand-white);
}

#main-content #assessment.site-assessment {
  background: linear-gradient(120deg, var(--brand-blue), color-mix(in srgb, var(--brand-blue) 46%, var(--brand-deep)));
}

#main-content #assessment .assessment-submit:not(:disabled):is(:hover, :focus-visible) {
  background-color: color-mix(in srgb, var(--brand-blue) 80%, var(--brand-black));
}

#main-content :is(select, textarea, input:not([type="checkbox"], [type="radio"], [type="hidden"])):not(:disabled) {
  border-color: var(--brand-muted);
}

#main-content :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

[data-site-header] [data-header-shell] :is([data-nav-item] > a, .header-social, [data-site-search-open], [data-language-trigger]):focus-visible,
#site-search :where(a, button, input):focus-visible,
footer :where(a, button):focus-visible {
  outline: 2px solid var(--brand-white);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  #main-content .mc_a1t_a .mc_a1t_dian {
    animation-name: etica-hotspot-pulse;
  }

  #main-content .mc_a1t_a .mc_a1t_dian::before,
  #main-content .mc_a1t_a .mc_a1t_dian::after {
    animation-name: etica-hotspot-wave;
  }

  @keyframes etica-hotspot-pulse {
    50% { transform: scale(1.1); }
  }

  @keyframes etica-hotspot-wave {
    from { opacity: 0.7; transform: translate(-50%, -50%) scale(0.7); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(1.9); }
  }

  [data-esg-reveal="site"]:not([data-esg-pending]),
  .esg [data-esg-reveal="seetel"]:not([data-esg-pending]) {
    transition-duration: 480ms, 480ms, 240ms, 180ms, 180ms;
  }

  [data-esg-pending]:not(:focus-within),
  .esg [data-esg-reveal="seetel"][data-esg-pending]:not(:focus-within) {
    translate: 0 18px !important;
  }

  #site-search[open] .site-search-inner,
  [data-solution-tabs] [role="tabpanel"]:not([hidden]),
  #assessment [data-assessment-verification]:not([hidden]) {
    animation: etica-ui-enter 260ms var(--ease-etica) both;
  }

  @keyframes etica-ui-enter {
    from { opacity: 0; translate: 0 7px; }
    to { opacity: 1; translate: 0 0; }
  }

  #main-content :is(.etica-solution-cta, .assessment-submit, .pdf-link) {
    transition: color 140ms ease-out, background-color 140ms ease-out, scale 140ms var(--ease-etica);
  }

  #main-content .assessment-submit:active:not(:disabled) {
    scale: 0.98;
  }

  [data-site-back-to-top] > span {
    animation-iteration-count: 2;
  }
}
