.accessibility-tools {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  justify-items: end;
  font-size: 1rem;
}

.accessibility-trigger {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: .6rem;
  padding: .55rem .9rem .55rem .6rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #261638;
  color: #fff;
  box-shadow: 0 5px 20px rgb(20 8 38 / 25%);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.accessibility-trigger:hover { background: #000; }

.accessibility-trigger-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #261638;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: -.05em;
}

.accessibility-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + .75rem);
  width: min(390px, calc(100vw - 2rem));
  max-height: min(680px, calc(100vh - 6rem));
  overflow-y: auto;
  padding: 1.15rem;
  border: 2px solid #261638;
  border-radius: 20px;
  background: #fff;
  color: #261638;
  box-shadow: 0 16px 45px rgb(20 8 38 / 28%);
}

.accessibility-panel[hidden] { display: none; }

.accessibility-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.accessibility-kicker {
  margin: 0;
  color: #5c3a7d;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.accessibility-panel h2 {
  margin: .25rem 0 0;
  color: #261638;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.accessibility-close {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #a890bb;
  border-radius: 50%;
  background: #f5f0f8;
  color: #261638;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.accessibility-intro {
  margin: .85rem 0 1rem;
  color: #51445f;
  font-size: .84rem;
  line-height: 1.5;
}

.accessibility-option-list { display: grid; gap: .55rem; }

.accessibility-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: .7rem .75rem;
  border: 2px solid #c7b7d4;
  border-radius: 13px;
  background: #fff;
  color: #261638;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.accessibility-option:hover {
  border-color: #6f3fb0;
  background: #f8f4fb;
}

.accessibility-option[aria-pressed="true"] {
  border-color: #4c2287;
  background: #f0e8f7;
}

.accessibility-option strong,
.accessibility-option small { display: block; }

.accessibility-option strong { font-size: .9rem; }

.accessibility-option small {
  margin-top: .2rem;
  color: #5f5169;
  font-size: .72rem;
  line-height: 1.35;
}

.accessibility-option-state {
  display: grid;
  min-width: 46px;
  min-height: 30px;
  place-items: center;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: #e9e2ee;
  color: #43364e;
  font-size: .7rem;
  font-weight: 900;
}

.accessibility-option[aria-pressed="true"] .accessibility-option-state {
  background: #4c2287;
  color: #fff;
}

.accessibility-reset {
  min-height: 44px;
  margin-top: .7rem;
  padding: .55rem .2rem;
  border: 0;
  border-radius: .3rem;
  background: transparent;
  color: #4c2287;
  font: inherit;
  font-size: .8rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}

html[data-text-size="large"] { font-size: 120%; }

html[data-text-size="large"] .header-inner,
html[data-text-size="large"] .footer-inner,
html[data-text-size="large"] .button-row {
  flex-wrap: wrap;
}

html[data-text-size="large"] .site-header nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem 1rem;
}

html[data-text-size="large"] :is(.access-cta-inner, .section-heading) {
  grid-template-columns: 1fr;
}

html[data-text-spacing="wide"] body {
  letter-spacing: .025em;
  line-height: 1.65;
  word-spacing: .06em;
}

html[data-text-spacing="wide"] :is(h1, h2, h3, h4, .brand strong, .brand small) {
  letter-spacing: .01em;
  line-height: 1.2;
}

html[data-motion="reduced"] { scroll-behavior: auto; }

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  transition-duration: .01ms !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
}

html[data-contrast="high"] {
  --ink: #000;
  --text: #000;
  --muted: #1a1a1a;
  --purple: #000;
  --purple-dark: #000;
  --border: #000;
  --paper: #fff;
  --gold: #ffcf00;
}

html[data-contrast="high"] body {
  background: #fff;
  color: #000;
}

html[data-contrast="high"] body :where(h1, h2, h3, h4, p, li, label, small, span) { color: inherit; }

html[data-contrast="high"] :is(
  .site-header,
  .hero,
  .hero-panel,
  .experience-note,
  .eyebrow,
  .principles article,
  .model-page-hero,
  .model-page-symbol,
  .model-page-symbol p,
  .model-overview-grid article,
  .model-context,
  .about,
  .founder-card,
  .about-copy,
  .contact,
  .contact-form-card,
  .access-cta,
  .form-notice
) {
  border-color: #000 !important;
  background: #fff !important;
  background-image: none !important;
  color: #000 !important;
  box-shadow: none !important;
}

html[data-contrast="high"] :is(
  .campaign,
  .campaign-card,
  .case-update,
  .model-origin,
  .model-origin-note,
  .contact-aside,
  .founder-photo,
  footer
) {
  border-color: #fff !important;
  background: #000 !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: none !important;
}

html[data-contrast="high"] :is(.button-primary, .button-facebook, .contact-facebook) {
  border: 2px solid #000 !important;
  background: #000 !important;
  color: #fff !important;
}

html[data-contrast="high"] :is(.campaign, .model-origin, .contact-aside, footer) :is(.button-primary, .button-facebook, .contact-facebook) {
  border-color: #fff !important;
}

html[data-contrast="high"] :is(.button-outline, .button-gold) {
  border: 2px solid #000 !important;
  background: #fff !important;
  color: #000 !important;
}

html[data-contrast="high"] :is(input, select, textarea) {
  border: 2px solid #000 !important;
  background: #fff !important;
  color: #000 !important;
}

html[data-contrast="high"] body a:not(.button):not(.brand):not(.accessibility-trigger) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: .18em;
}

html[data-contrast="high"] :is(button, a, input, select, textarea):focus-visible {
  outline: 4px solid #ffbf00 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px #000 !important;
}

html[data-contrast="high"] .brand-crest {
  border-color: #000 !important;
  background-color: #fff !important;
  box-shadow: none !important;
}

html[data-contrast="high"] .hero-orbit { display: none; }

html[data-contrast="high"] .accessibility-panel {
  border-color: #000;
  background: #fff;
  color: #000;
  box-shadow: none;
}

html[data-contrast="high"] :is(.accessibility-option, .accessibility-close) {
  border-color: #000;
  background: #fff;
  color: #000;
}

html[data-contrast="high"] .accessibility-option[aria-pressed="true"] {
  border-width: 3px;
  background: #ffcf00;
}

html[data-contrast="high"] .accessibility-option-state,
html[data-contrast="high"] .accessibility-option[aria-pressed="true"] .accessibility-option-state {
  background: #000;
  color: #fff;
}

@media (max-width: 640px) {
  .accessibility-tools {
    right: max(.65rem, env(safe-area-inset-right));
    bottom: max(.65rem, env(safe-area-inset-bottom));
  }

  .accessibility-trigger {
    min-height: 44px;
    padding: .45rem .75rem .45rem .5rem;
    font-size: .82rem;
  }

  .accessibility-trigger-icon {
    width: 30px;
    height: 30px;
  }

  .accessibility-panel {
    width: min(390px, calc(100vw - 1.3rem));
    max-height: calc(100vh - 5rem);
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea):focus-visible { outline: 3px solid Highlight !important; }
  .accessibility-trigger,
  .accessibility-option,
  .accessibility-close { forced-color-adjust: auto; }
}
