/*
 * REFTHE shared header bookmarks.
 * This file is deliberately loaded last on every page so the main routes keep
 * the same proportions and visual language throughout the site.
 */

body > header nav:not(.breadcrumbs) > a,
body > header nav:not(.breadcrumbs) > div > a {
  --bookmark-rgb: 58, 99, 105;
  --bookmark-ink: #173b40;
}

body > header nav:not(.breadcrumbs) > a[data-path-tone="fault"],
body > header nav:not(.breadcrumbs) > div > a[data-path-tone="fault"],
body > header .gallery-nav__object--fault {
  --bookmark-rgb: 19, 106, 88;
  --bookmark-ink: #0a4035;
}

body > header nav:not(.breadcrumbs) > a[data-path-tone="alarm"],
body > header nav:not(.breadcrumbs) > div > a[data-path-tone="alarm"] {
  --bookmark-rgb: 200, 16, 46;
  --bookmark-ink: #531220;
}

body > header nav:not(.breadcrumbs) > a[data-path-tone="library"],
body > header nav:not(.breadcrumbs) > div > a[data-path-tone="library"],
body > header .gallery-nav__object--library,
body > header .gallery-nav__object--guide {
  --bookmark-rgb: 23, 93, 173;
  --bookmark-ink: #103660;
}

body > header nav:not(.breadcrumbs) > a[data-path-tone="tools"],
body > header nav:not(.breadcrumbs) > div > a[data-path-tone="tools"],
body > header .gallery-nav__object--tools {
  --bookmark-rgb: 226, 91, 45;
  --bookmark-ink: #713018;
}

body > header nav:not(.breadcrumbs) > a[data-path-tone="calc"],
body > header nav:not(.breadcrumbs) > div > a[data-path-tone="calc"],
body > header .gallery-nav__object--calc {
  --bookmark-rgb: 0, 126, 129;
  --bookmark-ink: #06494b;
}

body > header nav:not(.breadcrumbs) > a[data-path-tone="inverter"],
body > header nav:not(.breadcrumbs) > div > a[data-path-tone="inverter"],
body > header .gallery-nav__object--inverter {
  --bookmark-rgb: 23, 108, 104;
  --bookmark-ink: #153f40;
}

body > header .gallery-nav__object--app {
  --bookmark-rgb: 44, 65, 67;
  --bookmark-ink: #173b3d;
}

body > header nav:not(.breadcrumbs) > a,
body > header nav:not(.breadcrumbs) > div > a {
  position: relative !important;
  isolation: isolate !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 96px !important;
  padding: 22px 10px 18px !important;
  overflow: hidden !important;
  border: 1px solid rgba(var(--bookmark-rgb), .5) !important;
  border-radius: 18px 18px 5px 5px !important;
  background:
    radial-gradient(circle at 0 50%, rgba(var(--bookmark-rgb), .14), transparent 42%),
    linear-gradient(155deg, rgba(255, 255, 255, .99), rgba(255, 255, 255, .9)),
    #fff !important;
  color: var(--bookmark-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 0 0 0 1px rgba(var(--bookmark-rgb), .035),
    0 13px 28px rgba(16, 47, 56, .13),
    0 3px 8px rgba(var(--bookmark-rgb), .1) !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 760 !important;
  line-height: 1.12 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
  transform: translateY(0) !important;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(var(--bookmark-rgb), .12);
}

body > header nav:not(.breadcrumbs) > a::before,
body > header nav:not(.breadcrumbs) > div > a::before {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  top: 15px !important;
  right: auto !important;
  bottom: 15px !important;
  left: 0 !important;
  display: block !important;
  width: 5px !important;
  height: auto !important;
  border-radius: 0 8px 8px 0 !important;
  background: rgb(var(--bookmark-rgb)) !important;
  box-shadow: 5px 0 18px rgba(var(--bookmark-rgb), .17) !important;
  opacity: 1 !important;
  clip-path: none !important;
  transform: none !important;
  pointer-events: none !important;
  transition: width .28s ease !important;
}

body > header nav:not(.breadcrumbs) > a::after,
body > header nav:not(.breadcrumbs) > div > a::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  top: 15px !important;
  right: 15px !important;
  bottom: auto !important;
  left: auto !important;
  display: block !important;
  width: 28px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #e8652d 0 8px, transparent 8px 11px, rgba(var(--bookmark-rgb), .7) 11px 100%) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  clip-path: none !important;
  transform: none !important;
  pointer-events: none !important;
}

body > header nav:not(.breadcrumbs) > a > *,
body > header nav:not(.breadcrumbs) > div > a > * {
  position: relative !important;
  z-index: 2 !important;
}

body > header nav:not(.breadcrumbs) > a :is(svg, img, .refthe-action-icon, .route-icon, .gallery-nav__icon, .gallery-nav__index),
body > header nav:not(.breadcrumbs) > div > a :is(svg, img, .refthe-action-icon, .route-icon, .gallery-nav__icon, .gallery-nav__index) {
  display: none !important;
}

body > header nav:not(.breadcrumbs) > a:hover,
body > header nav:not(.breadcrumbs) > a:focus-visible,
body > header nav:not(.breadcrumbs) > div > a:hover,
body > header nav:not(.breadcrumbs) > div > a:focus-visible {
  border-color: rgba(var(--bookmark-rgb), .72) !important;
  background:
    radial-gradient(circle at 0 50%, rgba(var(--bookmark-rgb), .17), transparent 44%),
    linear-gradient(155deg, #fff, rgba(255, 255, 255, .92)),
    #fff !important;
  color: var(--bookmark-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 0 0 0 1px rgba(var(--bookmark-rgb), .04),
    0 20px 35px rgba(16, 47, 56, .17),
    0 5px 12px rgba(var(--bookmark-rgb), .14) !important;
  text-decoration: none !important;
  transform: translateY(-8px) !important;
}

body > header nav:not(.breadcrumbs) > a:hover::before,
body > header nav:not(.breadcrumbs) > a:focus-visible::before,
body > header nav:not(.breadcrumbs) > div > a:hover::before,
body > header nav:not(.breadcrumbs) > div > a:focus-visible::before {
  width: 8px !important;
}

body > header nav:not(.breadcrumbs) > a:focus-visible,
body > header nav:not(.breadcrumbs) > div > a:focus-visible {
  outline: 3px solid #e8652d !important;
  outline-offset: 4px !important;
}

body > header nav:not(.breadcrumbs) > a[aria-current="page"],
body > header nav:not(.breadcrumbs) > div > a[aria-current="page"] {
  background:
    radial-gradient(circle at 0 50%, rgba(var(--bookmark-rgb), .17), transparent 44%),
    linear-gradient(155deg, #fff, rgba(255, 255, 255, .92)),
    #fff !important;
  color: var(--bookmark-ink) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 0 -4px 0 rgba(var(--bookmark-rgb), .55),
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 13px 28px rgba(16, 47, 56, .14) !important;
  text-decoration: none !important;
}

@media (max-width: 850px) {
  body > header nav:not(.breadcrumbs) {
    max-width: 100% !important;
    gap: 8px !important;
  }

  body > header nav:not(.breadcrumbs) > a,
  body > header nav:not(.breadcrumbs) > div {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 0 !important;
  }

  body > header nav:not(.breadcrumbs) > a,
  body > header nav:not(.breadcrumbs) > div > a {
    min-height: 53px !important;
    height: 53px !important;
    max-height: 53px !important;
    padding: 18px 8px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
  }

  body > header nav:not(.breadcrumbs) > a::before,
  body > header nav:not(.breadcrumbs) > div > a::before {
    top: 9px !important;
    bottom: 9px !important;
    width: 4px !important;
  }

  body > header nav:not(.breadcrumbs) > a::after,
  body > header nav:not(.breadcrumbs) > div > a::after {
    top: 9px !important;
    right: 10px !important;
    width: 22px !important;
  }
}

@media (max-width: 420px) {
  body > header nav:not(.breadcrumbs) > a,
  body > header nav:not(.breadcrumbs) > div > a {
    padding-inline: 7px !important;
    font-size: 12.5px !important;
  }
}

@media (hover: none) {
  body > header nav:not(.breadcrumbs) > a:hover,
  body > header nav:not(.breadcrumbs) > div > a:hover {
    transform: none !important;
  }

  body > header nav:not(.breadcrumbs) > a:active,
  body > header nav:not(.breadcrumbs) > div > a:active {
    transform: translateY(-2px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body > header nav:not(.breadcrumbs) > a,
  body > header nav:not(.breadcrumbs) > div > a {
    transition: none !important;
    transform: none !important;
  }
}

/*
 * REFTHE shared action language.
 *
 * Keep the route bookmarks above as the recognisable navigation system. The
 * rules below align the smaller actions used inside every section: consistent
 * proportions, calm shadows, predictable motion and a single focus treatment.
 * Page-specific colour remains authoritative so Guasti, Biblioteca,
 * Attrezzature, Calcolatori and Inverter retain their identity.
 */
:root {
  --refthe-action-radius: 12px;
  --refthe-action-min-height: 46px;
  --refthe-action-border: rgba(30, 91, 82, .34);
  --refthe-action-ink: #123f3a;
  --refthe-action-shadow: 0 7px 18px rgba(15, 55, 52, .09);
  --refthe-action-shadow-raised: 0 13px 26px rgba(15, 55, 52, .14);
  --refthe-action-ease: .22s cubic-bezier(.2, .75, .25, 1);
  --refthe-focus: #e8652d;
}

/* Every section uses the same bookmark rail, including pages whose local
 * stylesheet previously left the links as a full-width vertical list. */
body > header nav:not(.breadcrumbs) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 142px)) !important;
  justify-content: center !important;
  gap: 12px !important;
  width: min(calc(100% - 32px), 980px) !important;
  max-width: 980px !important;
  margin-inline: auto !important;
}

body > header nav:not(.breadcrumbs) > div {
  display: contents !important;
}

/* Shared geometry and interaction. Colour and layout remain page-owned. */
:where(
  .button,
  .icon-button,
  .menu-toggle,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .guided-actions button,
  .technical-search button,
  .library-search .button,
  .actions button,
  button[data-print]
) {
  box-sizing: border-box;
  min-height: var(--refthe-action-min-height);
  border-radius: var(--refthe-action-radius);
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--refthe-action-shadow);
  transition:
    transform var(--refthe-action-ease),
    box-shadow var(--refthe-action-ease),
    border-color var(--refthe-action-ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(232, 101, 45, .12);
}

/* White technical actions: the site-wide secondary treatment. */
:where(
  .button-light,
  .button-outline,
  .button-outline-light,
  .button-secondary,
  .safety-button-light,
  .safety-button-outline,
  .ec-button-outline,
  .answer-back,
  .clinic-back
) {
  border: 1px solid var(--refthe-action-border);
  color: var(--refthe-action-ink);
  background: rgba(255, 255, 255, .96);
}

/* Compact selectors stay compact while remaining usable by touch. */
:where(
  .filter-button,
  .library-search-suggestions button,
  .controller-brand-tabs button,
  .library-index-row button,
  .field-suite-tabs button,
  .search-examples button
) {
  box-sizing: border-box;
  min-height: 44px;
  border-radius: 10px;
  transition:
    transform var(--refthe-action-ease),
    box-shadow var(--refthe-action-ease),
    border-color var(--refthe-action-ease);
  touch-action: manipulation;
}

/* Text actions remain visually light but gain a reliable touch target. */
:where(
  .text-action,
  .text-link,
  .text-button,
  .safety-text-link,
  .premium-secondary-link,
  .purchase-link,
  .price-link,
  .reset,
  .filter-reset,
  .tools-filter-reset,
  .guided-back,
  .controller-card-actions > a:not(.button)
) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--refthe-action-ink);
  font-weight: 720;
  text-underline-offset: .22em;
  transition: color var(--refthe-action-ease), transform var(--refthe-action-ease);
  touch-action: manipulation;
}

/* Small utility controls still need a comfortable touch and reading size. */
:where(.language-switcher-toggle, .language-switcher-menu a) {
  min-height: 44px;
}

:where(.controller-card-actions a, .controller-card-actions button, .text-action) {
  font-size: max(12px, .75rem);
}

/* Editorial and footer links look light, but remain easy to tap in the field. */
:where(
  .simulation-feedback,
  .desk-notes a,
  .document-actions a,
  .brand-grid a,
  .ec-brand-grid a,
  .calc-footer a,
  .lean-footer a,
  footer nav a
) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* The wordmark is also navigation and needs a visible keyboard state. */
:where(.brand, .lean-brand, .calc-brand, .home-mark):focus-visible {
  border-radius: 8px;
  outline: 3px solid var(--refthe-focus) !important;
  outline-offset: 4px !important;
}

@media (hover: hover) {
  :where(
    .button,
    .icon-button,
    .menu-toggle,
    .case-link,
    .safety-button,
    .ec-button,
    .button-secondary,
    .answer-back,
    .clinic-back,
    .fault-object-submit,
    .fault-alarm-cta,
    .search-alarm,
    .field-primary,
    .guided-action-link,
    .guided-actions button,
    .technical-search button,
    .library-search .button,
    .actions button,
    button[data-print]
  ):not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: var(--refthe-action-shadow-raised);
  }

  :where(
    .filter-button,
    .library-search-suggestions button,
    .controller-brand-tabs button,
    .library-index-row button,
    .field-suite-tabs button,
    .search-examples button
  ):not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 55, 52, .1);
  }

  :where(
    .text-action,
    .text-link,
    .text-button,
    .safety-text-link,
    .premium-secondary-link,
    .purchase-link,
    .price-link,
    .reset,
    .filter-reset,
    .tools-filter-reset,
    .guided-back,
    .controller-card-actions > a:not(.button)
  ):hover {
    transform: translateY(-1px);
  }
}

:where(
  .button,
  .icon-button,
  .menu-toggle,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .guided-actions button,
  .technical-search button,
  .library-search .button,
  .actions button,
  button[data-print],
  .filter-button,
  .library-search-suggestions button,
  .controller-brand-tabs button,
  .library-index-row button,
  .field-suite-tabs button,
  .search-examples button,
  .text-action,
  .text-link,
  .text-button,
  .safety-text-link,
  .premium-secondary-link,
  .purchase-link,
  .price-link,
  .reset,
  .filter-reset,
  .tools-filter-reset,
  .guided-back,
  .controller-card-actions > a:not(.button)
):focus-visible {
  outline: 3px solid var(--refthe-focus) !important;
  outline-offset: 3px !important;
}

:where(button, [role="button"], .button)[disabled],
:where(button, [role="button"], .button)[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .55;
  box-shadow: none;
  transform: none;
}

@media (max-width: 620px) {
  body > header nav:not(.breadcrumbs) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: min(calc(100% - 24px), 560px) !important;
  }

  :where(
    .button,
    .safety-button,
    .ec-button,
    .button-secondary,
    .answer-back,
    .clinic-back,
    .fault-object-submit,
    .search-alarm,
    .field-primary,
    .guided-action-link,
    .guided-actions button,
    .technical-search button,
    .library-search .button,
    .actions button,
    button[data-print]
  ) {
    min-height: 48px;
  }
}

/* Final high-specificity bridge for legacy page bundles that used !important
   route colours.  Header bookmarks and large navigation cards are excluded. */
html body button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
html body a.button,
html body a.search-primary-link,
html body .case-link,
html body .safety-button,
html body .ec-button,
html body .button-secondary,
html body .answer-back,
html body .clinic-back,
html body .fault-object-submit,
html body .fault-alarm-cta,
html body .search-alarm,
html body .field-primary,
html body .guided-action-link,
html body .tool-card-actions a,
html body .document-actions a,
html body .controller-card-actions a,
html body .premium-card-actions a,
html body .danfoss-card-actions a,
html body .temperature-card-actions a,
html body .manual-product-actions a,
html body .product-action,
html body .section-nav a,
html body .field-shortcuts a,
html body .lean-bottom > a {
  border-color: var(--refthe-control-border) !important;
  background: #fff !important;
  color: var(--refthe-control-text) !important;
  box-shadow: var(--refthe-control-shadow) !important;
}

html body button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle)::before,
html body button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle)::after,
html body a.button::before,
html body a.button::after,
html body a.search-primary-link::before,
html body a.search-primary-link::after,
html body .section-nav a::before,
html body .section-nav a::after,
html body .field-shortcuts a::before,
html body .field-shortcuts a::after,
html body .lean-bottom > a::before,
html body .lean-bottom > a::after {
  content: none !important;
  display: none !important;
}

html body button[aria-pressed="true"]:not(.menu-toggle):not(.icon-button),
html body button[aria-selected="true"]:not(.menu-toggle):not(.icon-button),
html body button.active:not(.menu-toggle):not(.icon-button),
html body button.is-active:not(.menu-toggle):not(.icon-button),
html body .section-nav a[aria-current="page"],
html body .field-shortcuts a[aria-current="page"] {
  border-color: var(--refthe-control-active) !important;
  background: var(--refthe-control-active) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(18, 65, 60, .16) !important;
}

/* Composite selectors (brand covers, filters and catalogue cards) contain
   labels with their own dark colours. On the petrol selected surface every
   textual child must inherit the accessible white foreground. */
html body :is(
  button[aria-pressed="true"],
  button[aria-selected="true"],
  button.active,
  button.is-active
):not(.menu-toggle):not(.icon-button) :is(strong, small, span, b) {
  color: inherit !important;
}

@media (prefers-reduced-motion: reduce) {
  :where(
    .button,
    .icon-button,
    .menu-toggle,
    .case-link,
    .safety-button,
    .ec-button,
    .button-secondary,
    .answer-back,
    .clinic-back,
    .fault-object-submit,
    .fault-alarm-cta,
    .search-alarm,
    .field-primary,
    .guided-action-link,
    .guided-actions button,
    .technical-search button,
    .library-search .button,
    .actions button,
    button[data-print],
    .filter-button,
    .library-search-suggestions button,
    .controller-brand-tabs button,
    .library-index-row button,
    .field-suite-tabs button,
    .search-examples button,
    .text-action,
    .text-link,
    .text-button,
    .safety-text-link,
    .premium-secondary-link,
    .purchase-link,
    .price-link,
    .reset,
    .filter-reset,
    .tools-filter-reset,
    .guided-back,
    .controller-card-actions > a:not(.button),
    .entry-switch a
  ) {
    transition: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  :where(
    .button,
    .icon-button,
    .menu-toggle,
    .case-link,
    .safety-button,
    .ec-button,
    .button-secondary,
    .answer-back,
    .clinic-back,
    .fault-object-submit,
    .fault-alarm-cta,
    .search-alarm,
    .field-primary,
    .guided-action-link,
    .guided-actions button,
    .technical-search button,
    .library-search .button,
    .actions button,
    button[data-print]
  ) {
    border: 1px solid ButtonText;
  }
}

/*
 * REFTHE final control system · 2026-10
 *
 * One calm, white technical surface for actions in every section.  Route
 * colour remains available for text, borders and selected states, while the
 * old gradients, ornamental side bars and detached icon tiles are removed.
 */
:root {
  --refthe-control-bg: #fff;
  --refthe-control-text: #154b46;
  --refthe-control-border: #6f9992;
  --refthe-control-hover: #f7fbfa;
  --refthe-control-active: #174f49;
  --refthe-control-shadow: 0 5px 14px rgba(18, 65, 60, .07);
}

body :where(
  button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
  a.button,
  a.search-primary-link,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .tool-card-actions a,
  .document-actions a,
  .premium-card-actions a,
  .danfoss-card-actions a,
  .temperature-card-actions a,
  .manual-product-actions a,
  .product-action,
  .lean-bottom > a
) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--refthe-control-border) !important;
  border-radius: 10px !important;
  background: var(--refthe-control-bg) !important;
  color: var(--refthe-control-text) !important;
  box-shadow: var(--refthe-control-shadow) !important;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  transform: none;
  transition: border-color .18s ease, box-shadow .18s ease,
    background-color .18s ease, transform .18s ease !important;
}

/* Remove the former coloured rail and decorative highlights. */
body :where(
  button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
  a.button,
  a.search-primary-link,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .tool-card-actions a,
  .document-actions a,
  .premium-card-actions a,
  .danfoss-card-actions a,
  .temperature-card-actions a,
  .manual-product-actions a,
  .product-action,
  .lean-bottom > a
)::before,
body :where(
  button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
  a.button,
  a.search-primary-link,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .tool-card-actions a,
  .document-actions a,
  .premium-card-actions a,
  .danfoss-card-actions a,
  .temperature-card-actions a,
  .manual-product-actions a,
  .product-action,
  .lean-bottom > a
)::after {
  content: none !important;
  display: none !important;
}

/* Icons remain in technical selectors, but no longer precede normal CTAs. */
body :where(
  a.button,
  a.search-primary-link,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .tool-card-actions a,
  .document-actions a,
  .premium-card-actions a,
  .danfoss-card-actions a,
  .temperature-card-actions a,
  .manual-product-actions a,
  .product-action,
  .lean-bottom > a
) > :is(.refthe-action-icon, .route-icon) {
  display: none !important;
}

@media (hover: hover) {
  body :where(
    button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
    a.button,
    a.search-primary-link,
    .case-link,
    .safety-button,
    .ec-button,
    .button-secondary,
    .answer-back,
    .clinic-back,
    .fault-object-submit,
    .fault-alarm-cta,
    .search-alarm,
    .field-primary,
    .guided-action-link,
    .tool-card-actions a,
    .document-actions a,
    .premium-card-actions a,
    .danfoss-card-actions a,
    .temperature-card-actions a,
    .manual-product-actions a,
    .product-action,
    .lean-bottom > a
  ):not(:disabled):hover {
    border-color: #315f59 !important;
    background: var(--refthe-control-hover) !important;
    color: #103f3a !important;
    box-shadow: 0 9px 20px rgba(18, 65, 60, .11) !important;
    transform: translateY(-1px);
  }
}

/* Selected filters need an unmistakable state, while keeping the same shape. */
body :where(
  button[aria-pressed="true"],
  button[aria-selected="true"],
  button.active,
  button.is-active
) {
  border-color: var(--refthe-control-active) !important;
  background: var(--refthe-control-active) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(18, 65, 60, .16) !important;
}

body :where(
  button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
  a.button,
  a.search-primary-link,
  .case-link,
  .safety-button,
  .ec-button,
  .button-secondary,
  .answer-back,
  .clinic-back,
  .fault-object-submit,
  .fault-alarm-cta,
  .search-alarm,
  .field-primary,
  .guided-action-link,
  .tool-card-actions a,
  .document-actions a,
  .premium-card-actions a,
  .danfoss-card-actions a,
  .temperature-card-actions a,
  .manual-product-actions a,
  .product-action,
  .lean-bottom > a
):focus-visible {
  outline: 3px solid var(--refthe-focus) !important;
  outline-offset: 3px !important;
}

/* Legacy section styles used stronger selectors.  These explicit bridges
   ensure the shared white treatment reaches every real control without
   changing large navigation cards or the bookmark rail. */
body :is(
  .search-examples button,
  .search-refine button,
  .fault-filter-bar button,
  .fault-search button,
  .library-search-suggestions button,
  .controller-brand-tabs button,
  .controller-sector-filters button,
  .library-index-row button,
  .field-suite-tabs button,
  .utility-tabs button,
  .diagnostic-mode button,
  #categories button,
  .compare-card__actions a,
  .path-decision button,
  .path-branch button,
  .path-confirm button,
  .path-result button,
  .top10-feature-actions a,
  .top10-ranking-table .product-action,
  .safety-cart-link,
  .shop-category-links a
) {
  border: 1px solid var(--refthe-control-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--refthe-control-text) !important;
  box-shadow: var(--refthe-control-shadow) !important;
}

body :is(
  .search-examples button,
  .search-refine button,
  .fault-filter-bar button,
  .fault-search button,
  .library-search-suggestions button,
  .controller-brand-tabs button,
  .controller-sector-filters button,
  .library-index-row button,
  .field-suite-tabs button,
  .utility-tabs button,
  .diagnostic-mode button,
  #categories button,
  .compare-card__actions a,
  .path-decision button,
  .path-branch button,
  .path-confirm button,
  .path-result button,
  .top10-feature-actions a,
  .top10-ranking-table .product-action,
  .safety-cart-link,
  .shop-category-links a
)::before,
body :is(
  .search-examples button,
  .search-refine button,
  .fault-filter-bar button,
  .fault-search button,
  .library-search-suggestions button,
  .controller-brand-tabs button,
  .controller-sector-filters button,
  .library-index-row button,
  .field-suite-tabs button,
  .utility-tabs button,
  .diagnostic-mode button,
  #categories button,
  .compare-card__actions a,
  .path-decision button,
  .path-branch button,
  .path-confirm button,
  .path-result button,
  .top10-feature-actions a,
  .top10-ranking-table .product-action,
  .safety-cart-link,
  .shop-category-links a
)::after {
  content: none !important;
  display: none !important;
}

body :is(
  .fault-filter-bar button,
  .search-examples button,
  .search-refine button,
  .utility-tabs button,
  .diagnostic-mode button,
  #categories button
) > .refthe-action-icon {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body :is(
  .fault-filter-bar button[aria-pressed="true"],
  .fault-filter-bar button.active,
  .controller-brand-tabs button[aria-selected="true"],
  .controller-sector-filters button[aria-pressed="true"],
  .field-suite-tabs button[aria-selected="true"],
  .utility-tabs button[aria-selected="true"],
  .diagnostic-mode button[aria-pressed="true"],
  #categories button[aria-pressed="true"]
) {
  border-color: var(--refthe-control-active) !important;
  background: var(--refthe-control-active) !important;
  color: #fff !important;
}

/* Route metadata used to tint these actions in the old system.  Keep the
   destination semantics in the markup, but render the control consistently. */
body a.button[data-path-tone],
body a.search-primary-link[data-path-tone],
body .lean-bottom > a[data-path-tone]:not(.button),
body .tool-card-actions a[data-path-tone],
body .document-actions a[data-path-tone],
body .premium-card-actions a[data-path-tone],
body .danfoss-card-actions a[data-path-tone],
body .temperature-card-actions a[data-path-tone],
body .manual-product-actions a[data-path-tone],
body a.product-action[data-path-tone] {
  border-color: var(--refthe-control-border) !important;
  background: #fff !important;
  color: var(--refthe-control-text) !important;
  box-shadow: var(--refthe-control-shadow) !important;
}

@media (max-width: 620px) {
  body :where(
    button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
    a.button,
    a.search-primary-link,
    .case-link,
    .safety-button,
    .ec-button,
    .button-secondary,
    .answer-back,
    .clinic-back,
    .fault-object-submit,
    .fault-alarm-cta,
    .search-alarm,
    .field-primary,
    .guided-action-link,
    .tool-card-actions a,
    .document-actions a,
    .premium-card-actions a,
    .danfoss-card-actions a,
    .temperature-card-actions a,
    .manual-product-actions a,
    .product-action,
    .lean-bottom > a
  ) {
    min-height: 48px;
    padding-inline: 14px;
  }
}

/* Last word for page bundles with legacy route-specific !important rules. */
html body button:not(.menu-toggle):not(.icon-button):not(.feedback-toggle),
html body a.button,
html body a.search-primary-link,
html body .case-link,
html body .safety-button,
html body .ec-button,
html body .button-secondary,
html body .answer-back,
html body .clinic-back,
html body .fault-object-submit,
html body .fault-alarm-cta,
html body .search-alarm,
html body .field-primary,
html body .guided-action-link,
html body .tool-card-actions a,
html body .document-actions a,
html body .controller-card-actions a,
html body .premium-card-actions a,
html body .danfoss-card-actions a,
html body .temperature-card-actions a,
html body .manual-product-actions a,
html body .product-action,
html body .section-nav a,
html body .field-shortcuts a,
html body .lean-bottom > a {
  border-color: var(--refthe-control-border) !important;
  background: #fff !important;
  color: var(--refthe-control-text) !important;
  box-shadow: var(--refthe-control-shadow) !important;
}

html body button[aria-pressed="true"]:not(.menu-toggle):not(.icon-button),
html body button[aria-selected="true"]:not(.menu-toggle):not(.icon-button),
html body button.active:not(.menu-toggle):not(.icon-button),
html body button.is-active:not(.menu-toggle):not(.icon-button),
html body .section-nav a[aria-current="page"],
html body .field-shortcuts a[aria-current="page"] {
  border-color: var(--refthe-control-active) !important;
  background: var(--refthe-control-active) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(18, 65, 60, .16) !important;
}

html body a.case-link[data-path-tone],
html body .tool-card-actions a[data-path-tone],
html body .document-actions a[data-path-tone],
html body .controller-card-actions a[data-path-tone],
html body .premium-card-actions a[data-path-tone],
html body .danfoss-card-actions a[data-path-tone],
html body .temperature-card-actions a[data-path-tone],
html body .manual-product-actions a[data-path-tone],
html body a.product-action[data-path-tone] {
  border-color: #6f9992 !important;
  background: #fff !important;
  color: #154b46 !important;
  box-shadow: 0 5px 14px rgba(18, 65, 60, .07) !important;
}

html body #categories button[aria-pressed="true"],
html body .diagnostic-mode button[aria-pressed="true"],
html body .utility-tabs button[aria-selected="true"],
html body .fault-filter-bar button[aria-pressed="true"],
html body .controller-brand-tabs button[aria-selected="true"],
html body .controller-sector-filters button[aria-pressed="true"] {
  border-color: #174f49 !important;
  background: #174f49 !important;
  color: #fff !important;
}

/* Decorative square icons are now explicit. Keep ordinary controls clean even
   if an older cached script injected the legacy element before this sheet ran. */
html body :where(
  button:not(.icon-button):not(.menu-toggle):not([data-action-icon]),
  a.button:not([data-action-icon]),
  a.search-primary-link:not([data-action-icon]),
  .tool-card-actions a:not([data-action-icon]),
  .document-actions a:not([data-action-icon])
) > .refthe-action-icon {
  display: none !important;
}

/* Manuale tecnico contemporaneo: una superficie calma, senza effetti da
   vetrina. Il colore di sezione resta una sottile informazione di stato. */
body > header .gallery-nav > a,
body > .entry-switch > a{
  border-width:1px!important;
  border-color:#c9d6d2!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 4px 12px rgba(18,52,61,.08)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
body > header .gallery-nav > a::before,
body > .entry-switch > a::before{
  top:auto!important;
  right:12px!important;
  bottom:0!important;
  left:12px!important;
  width:auto!important;
  height:3px!important;
  border-radius:3px 3px 0 0!important;
  box-shadow:none!important;
  opacity:.7!important;
}
body > header .gallery-nav > a::after,
body > .entry-switch > a::after{display:none!important;content:none!important}
body > header .gallery-nav > a:hover,
body > header .gallery-nav > a:focus-visible,
body > .entry-switch > a:hover,
body > .entry-switch > a:focus-visible{
  border-color:rgba(var(--bookmark-rgb),.66)!important;
  background:#fff!important;
  box-shadow:0 7px 17px rgba(18,52,61,.11)!important;
  transform:translateY(-2px)!important;
}
body > header .gallery-nav > a[aria-current="page"],
body > .entry-switch > a[aria-current="page"]{
  background:#fff!important;
  box-shadow:inset 0 -3px 0 rgba(var(--bookmark-rgb),.72),0 5px 14px rgba(18,52,61,.09)!important;
}
