.skip-link {
  position: fixed;
  left: 1rem;
  top: -3rem;
  z-index: 2001;
  padding: 0.75rem 1rem;
  background: #fff;
  color: var(--color-ink-900);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--color-accent-700, #0b6555) !important;
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  border-color: rgba(74, 116, 142, 0.38);
}

input,
select,
textarea {
  font-size: max(16px, 1rem);
}

summary {
  cursor: pointer;
}

/* Keep keyboard focus visible over the dark navigation and clipped controls. */
.app-shell :focus-visible {
  outline-color: #fff !important;
}

.currency-switch:focus-within {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.currency-switch select:focus-visible {
  outline-offset: -3px;
}

/* The fallback remains useful when scripts are unavailable. */
.no-script-notice {
  margin: 1.5rem auto;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--ui-border, #c9dcd4);
  border-radius: var(--radius-md, 1rem);
  background: #fff;
  overflow-wrap: anywhere;
}

.no-script-notice h1 {
  font-size: clamp(1.65rem, 5vw, 2.5rem);
}

.no-script-notice nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-block: 1.25rem;
}

.no-script-notice a {
  color: #0b6555;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.no-script-notice nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Reserve room for the full header actions at desktop widths. */
@media (min-width: 1081px) {
  .app-shell .brand-mark {
    min-width: 230px !important;
    flex: 0 0 230px;
    padding: 0.65rem 2rem 0.65rem 0.85rem;
  }

  .app-shell .brand-logo {
    width: 4rem !important;
  }

  .app-shell .brand-copy span {
    display: none;
  }

  .app-shell .nav-link,
  .app-shell .nav-dropdown__trigger {
    gap: 0.35rem !important;
    padding: 0.7rem 0.45rem !important;
    font-size: 0.85rem !important;
  }

  .app-shell .nav-label {
    font-size: inherit;
  }
}

@media (min-width: 1081px) and (max-width: 1250px) {
  .app-shell .main-nav > .nav-link > svg,
  .app-shell .nav-dropdown__trigger > svg {
    display: none;
  }
}

/* Keep complete words readable and both language buttons inside their group. */
@media (max-width: 767px) {
  .home-hero__copy h1 {
    max-width: 100% !important;
    font-size: clamp(1.7rem, 8vw, 1.9375rem) !important;
    line-height: 1.08 !important;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .app-shell .lang-switch {
    display: inline-flex !important;
    flex: 0 0 66px !important;
    flex-wrap: nowrap !important;
    width: 66px !important;
    min-width: 66px;
    align-items: center;
    justify-content: center;
    gap: 1px;
    transform: none !important;
  }

  .app-shell .lang-switch button {
    flex: 0 0 29px !important;
    width: 29px !important;
    min-width: 29px !important;
    max-width: 29px !important;
    padding-inline: 0 !important;
    white-space: nowrap;
  }
}

/* A logo-only brand must leave space for language, currency and the menu. */
@media (max-width: 420px) {
  .app-shell .brand-mark {
    min-width: 82px !important;
    flex: 0 0 82px;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
  }

  .app-shell .shell-toggle {
    flex-shrink: 0;
  }

  .app-shell .shell-actions {
    gap: 0.1rem !important;
  }

  .currency-switch select {
    max-width: 90px;
  }
}

@media (forced-colors: active) {
  * {
    forced-color-adjust: auto;
  }

  .button,
  .button--secondary,
  .button--ghost,
  .ghost-button,
  .chip-button {
    border: 1px solid ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
