:root {
  --focus-ring: #8450a5;
  --field-border: #8b7b8e;
}

:is(.hero, .announcement, .newsletter, .site-footer) {
  --focus-ring: #f4ddff;
}

:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.site-search:focus-within {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.site-search input:focus-visible {
  outline: 0;
}

.shop-dialog {
  scroll-padding-block-start: 5.7rem;
}

.announcement {
  height: auto;
  min-height: 34px;
  padding-block: .35rem;
}

.site-search {
  height: auto;
  min-height: 44px;
}

:is(.shop-field, .filter-form, .public-form, .product-form, .academy-search, .portal-form) :is(input:not([type=checkbox],[type=radio]), select, textarea),
.site-search {
  border-color: var(--field-border);
}

.site-search :is(button, input) {
  min-height: 42px;
  height: auto;
}

.header-nav nav {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 0;
}

.footer-grid > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-base {
  flex-wrap: wrap;
}

.site-footer [data-a11y-open] {
  display: block;
  max-width: 100%;
  min-height: 44px;
  padding: .25rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  text-decoration: underline;
  text-underline-offset: .22em;
  font-size: .86rem;
}

.a11y-panel {
  width: min(calc(100% - 2rem), 33rem);
  max-width: 100%;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}

.a11y-panel::backdrop {
  background: rgb(32 22 38 / .65);
}

.a11y-panel h2 {
  font-size: clamp(1.8rem, 5.5vw, 2.65rem);
  overflow-wrap: anywhere;
}

.a11y-panel h2 + p {
  margin-block: .75rem 1rem;
}

.a11y-options {
  display: grid;
  gap: .35rem;
}

.a11y-options label {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem .65rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: .35rem;
  font-weight: 600;
  cursor: pointer;
}

.a11y-options input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: none;
}

.a11y-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-block-start: 1.2rem;
}

body:has(.a11y-panel[open]) {
  overflow: hidden;
}

html[data-a11y-large-text] {
  font-size: 125%;
}

[data-a11y-large-text] .hero h1 em {
  white-space: normal;
}

.product-main h1,
.page-heading h1,
.shop-cart-line > div,
.shop-compact-product > span,
.shop-checkout-lines li > span {
  overflow-wrap: anywhere;
}

.shop-field,
.filter-form label,
.portal-form label {
  min-width: 0;
}

html[data-a11y-contrast] {
  --ink: #180e19 !important;
  --muted: #3c2c40 !important;
  --paper: #fff !important;
  --plum: #190d1f !important;
  --accent: #f1dafa !important;
  --line: #736779 !important;
  --focus-ring: #64228b;
  --field-border: #736779;
}

[data-a11y-contrast] :is(.hero, .announcement, .newsletter, .site-footer) {
  background: #190d1f;
  color: #fff;
  --focus-ring: #f4ddff;
}

[data-a11y-contrast] :is(.hero p, .hero h1 em, .newsletter p, .newsletter .consent, .site-footer p, .site-footer .footer-grid a, .site-footer .footer-base) {
  color: #fff;
}

[data-a11y-contrast] :is(a:not(.button,.shop-button,.wordmark), .text-button) {
  text-decoration: underline;
  text-underline-offset: .19em;
}

[data-a11y-contrast] :is(.eyebrow, .shop-muted, .shop-empty) {
  color: var(--ink);
}

[data-a11y-contrast] .hero .eyebrow {
  color: #fff;
}

[data-a11y-reduced-motion], [data-a11y-reduced-motion] *, [data-a11y-reduced-motion] *::before, [data-a11y-reduced-motion] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  :root, :is(.hero, .announcement, .newsletter, .site-footer) { --focus-ring: Highlight; }
  .site-search:focus-within { outline: 2px solid Highlight; }
  .a11y-panel, .a11y-options label { border-color: ButtonText; }
}

@media (max-width: 900px) {
  .header-nav nav {
    justify-content: flex-start;
    column-gap: clamp(.8rem, 3vw, 1.25rem);
  }
}

@media (max-width: 760px) {
  .hero h1 em {
    white-space: normal;
  }
}

@media (max-width: 650px) {
  html {
    scroll-padding-block-end: calc(4rem + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .announcement {
    min-height: 30px;
  }

  .header-nav a {
    min-height: 38px;
  }

  [data-search-results] {
    min-width: 0;
  }

  .newsletter-form > div {
    flex-wrap: wrap;
  }

  .newsletter-form input:not([type=checkbox]) {
    flex: 1 1 10rem;
  }
}

@media (max-width: 425px) {
  .shop-saved-line {
    flex-wrap: wrap;
  }

  .shop-cart-line {
    grid-template-columns: 2.9rem minmax(0, 1fr);
    gap: .35rem .75rem;
  }

  .shop-cart-line img {
    width: 2.9rem;
    height: 2.9rem;
  }

  .shop-cart-line strong {
    grid-column: 2;
  }

  .shop-checkout-lines li {
    gap: .5rem;
  }
}
