.hori-desktop-treatments {
  position: relative;
}

.hori-blog-treatment-menu > summary {
  cursor: pointer;
  list-style: none;
}

.hori-blog-treatment-menu > summary::-webkit-details-marker {
  display: none;
}

.hori-desktop-treatments > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 12px;
  color: var(--hori-treatment-label-color, hsl(var(--foreground) / .7));
}

.hori-desktop-treatments > a.text-primary,
.hori-desktop-treatments > a:hover,
.hori-desktop-treatments > a:focus-visible,
.hori-desktop-treatments:focus-within > a {
  color: var(--hori-treatment-label-color, hsl(var(--primary)));
}

/* Both dark headers switch back to their light theme when scrolled. */
.hori-home-black:not([data-hori-hero-scrolled]) > header .hori-desktop-treatments,
html.hori-lenses-theme:not([data-hori-lenses-scrolled]) #root > header .hori-desktop-treatments {
  --hori-treatment-label-color: #f7f6f2;
}

.hori-blog-treatment-menu > summary {
  color: inherit;
}

.hori-desktop-treatments > a::after {
  content: "";
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  margin-inline: 3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1.5px) rotate(45deg);
}

.hori-desktop-treatment-links {
  box-sizing: border-box;
  position: absolute;
  top: calc(100% + 8px);
  left: -18px;
  z-index: 100;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  width: 440px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  background: #fff;
  border: 1px solid #d6e0eb;
  border-radius: 18px;
  box-shadow: 0 12px 28px #102e5912;
}

/* Keep the mouse inside the dropdown when crossing the gap below the title. */
.hori-desktop-treatment-links::before {
  content: "";
  position: absolute;
  inset: -9px 0 100%;
}

@media (hover: hover) and (pointer: fine) {
  .hori-desktop-treatments:not([data-dismissed]):is(:hover, [data-pointer-over]) > .hori-desktop-treatment-links {
    display: grid;
  }

  .hori-desktop-treatments:not([data-dismissed]):is(:hover, [data-pointer-over]) > a::after {
    transform: translateY(1.5px) rotate(225deg);
  }
}

.hori-desktop-treatments:not([data-dismissed]):focus-within > .hori-desktop-treatment-links {
  display: grid;
}

.hori-desktop-treatments:not([data-dismissed]):focus-within > a::after {
  transform: translateY(1.5px) rotate(225deg);
}

.hori-desktop-treatments .hori-desktop-treatment-links > a {
  display: block;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  font: 400 13px/1.45 Inter, Arial, sans-serif;
  color: #102e59;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.hori-desktop-treatment-links .hori-menu-treatment-badge {
  display: none;
}

.hori-desktop-treatments .hori-desktop-treatment-links > a:last-child {
  grid-column: 1 / -1;
  text-align: center;
}

.hori-desktop-treatments .hori-desktop-treatment-links > a:is(:hover, :focus-visible, [aria-current="page"]) {
  background: #edf3f9;
  color: #195c8d;
}

.hori-desktop-treatments a:focus-visible {
  outline: 2px solid #397bb7;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .hori-desktop-treatments > a::after {
    transition: transform 180ms ease;
  }

  .hori-desktop-treatment-links > a {
    transition: background-color 150ms ease;
  }
}

@media (max-width: 1279.98px) {
  header.glass-effect {
    inset-inline: 0;
    max-inline-size: 100vw;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  header.glass-effect > .container {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    width: 100%;
    max-width: min(100%, 100vw);
    margin-inline: auto;
    padding-inline-start: max(1rem, env(safe-area-inset-left, 0px));
    padding-inline-end: max(1rem, env(safe-area-inset-right, 0px));
  }
  header.glass-effect > .container > a { justify-self: start; }
  header.glass-effect > .container > nav { display: none; }
  header.glass-effect > .container > div:last-child {
    grid-column: 2;
    justify-self: end;
  }
  header.glass-effect button[aria-label="Abrir menu"] {
    display: inline-flex;
    flex: none;
    visibility: visible;
    opacity: 1;
    min-height: 44px;
  }
  .hori-home-hero-copy > .hori-home-treatment-links { display: none; }
  .hori-blog-menu[open] > nav {
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .hori-blog-menu .hori-mobile-treatment-list > summary {
    padding: 10px 12px;
    font: inherit;
    color: inherit;
    cursor: pointer;
  }
  .hori-blog-menu .hori-mobile-treatment-list > div { padding-inline-start: 12px; }
}
@media (max-width: 1279.98px) {
  /* Switch foreground and background together when the scroll threshold is crossed. */
  #root header.glass-effect,
  #root header.glass-effect button[aria-label="Abrir menu"],
  #root header.glass-effect button[aria-label="Abrir menu"] * {
    transition: none !important;
  }
  #root .hori-home-black[data-hori-hero-scrolled] > header.glass-effect,
  html.hori-lenses-theme[data-hori-lenses-scrolled] #root > header.glass-effect {
    background-color: #fff !important;
  }
  #root .hori-home-black[data-hori-hero-scrolled] > header.glass-effect button[aria-label="Abrir menu"],
  html.hori-lenses-theme[data-hori-lenses-scrolled] #root > header.glass-effect button[aria-label="Abrir menu"] {
    color: #171717 !important;
    background: transparent !important;
  }
  #root .hori-home-black[data-hori-hero-scrolled] > header.glass-effect button[aria-label="Abrir menu"] :is(svg,span),
  html.hori-lenses-theme[data-hori-lenses-scrolled] #root > header.glass-effect button[aria-label="Abrir menu"] :is(svg,span) {
    color: #171717 !important;
  }
}
