[data-theme="high-contrast"] {
  /* High Contrast Theme — WCAG AAA (7:1 minimum contrast ratio) */

  /* Core colors: pure black/white for maximum contrast */
  --green-primary: #000000;
  --green-secondary: #003300;
  --green-tertiary: #006600;
  --green-tertiary-hover: #008800;
  --green-darker: #000000;
  --green-lighter: #336633;
  --green-light: #CCDDCC;
  --grass-green-primary: #336600;
  --grass-green-secondary: #66AA00;

  --white: #FFFFFF;
  --black: #000000;

  /* Greys: high contrast steps, no subtle greys */
  --grey-primary: #000000;
  --grey-secondary: #555555;
  --grey-tertiary: #CCCCCC;
  --grey-tetradic: #F0F0F0;
  --grey-pentadic: #AAAAAA;
  --grey-dark: #333333;
  --grey-green: #1A2E1A;
  --grey-orange: #664400;
  --grey-purple: #220044;
  --grey-white: #FFFFFF;
  --grey-footer: #000000;
  --grey-footer-text: #FFFFFF;
  --grey-footer-border: #FFFFFF;
  --grey-medium: #555555;
  --grey-6f: #444444;
  --grey-slider: #666666;

  /* Orange — saturated for visibility */
  --orange-primary: #CC6600;
  --orange-secondary: #884400;
  --orange-tertiary: #DD7700;
  --orange-tetradic: #FFF0DD;

  /* Red — bright and unmistakable */
  --red-primary: #CC0000;
  --red-secondary: #DD0000;

  /* Yellow — darkened for white bg readability */
  --yellow: #997700;
  --yellow-secondary: #886600;
  --yellow-tertiary: #775500;
  --pure-yellow: #997700;

  /* Blue — high contrast variants */
  --blue-badge: #003399;
  --blue-border: #002266;
  --blue-dark: #001144;
  --google-blue: #0044CC;
  --light-blue-bg: #CCE0FF;

  /* Gender colors — AAA compliant */
  --gender-female: #AA0055;
  --gender-male: #004488;
  --gender-non-binary: #660099;
  --gender-unknown: #336633;

  /* POS colors — AAA compliant */
  --pos-purple: #660088;
  --pos-teal: #006655;

  /* Error — unmistakable red on white */
  --error-border: #CC0000;
  --error-bg: #FFE0E0;
  --error-text: #990000;
  --error-focus-glow: rgba(204, 0, 0, 0.8);

  /* Spacers unchanged */

  /* Alpha variants — stronger opacities for visibility */
  --black-5: rgba(0, 0, 0, 0.15);
  --black-6: rgba(0, 0, 0, 0.15);
  --black-7: rgba(0, 0, 0, 0.2);
  --black-8: rgba(0, 0, 0, 0.2);
  --black-10: rgba(0, 0, 0, 0.25);
  --black-12: rgba(0, 0, 0, 0.25);
  --black-15: rgba(0, 0, 0, 0.3);
  --black-20: rgba(0, 0, 0, 0.35);
  --black-23: rgba(0, 0, 0, 0.4);
  --black-25: rgba(0, 0, 0, 0.4);
  --black-30: rgba(0, 0, 0, 0.5);
  --black-35: rgba(0, 0, 0, 0.55);
  --black-40: rgba(0, 0, 0, 0.6);
  --black-50: rgba(0, 0, 0, 0.7);
  --black-75: rgba(0, 0, 0, 0.9);

  --white-6: rgba(255, 255, 255, 0.2);
  --white-7: rgba(255, 255, 255, 0.2);
  --white-13: rgba(255, 255, 255, 0.3);
  --white-15: rgba(255, 255, 255, 0.3);
  --white-20: rgba(255, 255, 255, 0.4);
  --white-26: rgba(255, 255, 255, 0.5);
  --white-50: rgba(255, 255, 255, 0.7);
  --white-80: rgba(255, 255, 255, 0.9);

  --green-primary-25: rgba(0, 0, 0, 0.25);
  --green-primary-50: rgba(0, 0, 0, 0.5);
  --green-primary-80: rgba(0, 0, 0, 0.8);

  --grey-tetradic-60: rgba(240, 240, 240, 0.8);
  --yellow-50: rgba(153, 119, 0, 0.7);

  --pos-teal-30: rgba(0, 102, 85, 0.5);
  --pos-teal-85: rgba(0, 102, 85, 0.95);

  --grey-light-border-80: rgba(0, 0, 0, 0.4);
  --blue-focus-60: rgba(0, 51, 153, 0.8);

  /* Social media — darkened for AAA on white */
  --facebook-blue: #223366;
  --facebook-blue-dark: #1A2855;
  --facebook-blue-darker: #162244;
  --facebook-blue-darkest: #0E1633;
  --twitter-blue: #005588;
  --twitter-blue-dark: #004477;
  --twitter-blue-darker: #003366;
  --twitter-blue-darkest: #002255;

  /* BS3 legacy — high contrast versions */
  --bs3-success: #006600;
  --bs3-success-dark: #004400;
  --bs3-danger-dark: #AA0000;
  --bs3-danger-border: #990000;
  --bs3-danger-darker: #880000;
  --bs3-info-blue: #004488;
  --bs3-info-text: #003366;
  --bs3-warning: #886600;
  --bs3-warning-text: #664400;
  --bs3-primary-blue: #003377;
  --bs3-info-bg: #005588;

  /* Status colors */
  --light-red: #CC0000;
  --light-green: #006600;
  --light-pink: #990044;
  --mint-green: #E0FFE0;
  --bright-green: #005500;
  --pink: #880044;

  --light-green-0: rgba(0, 102, 0, 0.0);
}

/* WCAG AAA structural overrides — these supplement the variable swaps above */
[data-theme="high-contrast"],
[data-theme="high-contrast"] * {
  background-color: black !important;
  color: white !important;
  border-color: white !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Exempt carousel/hero — let images display normally in high contrast */
[data-theme="high-contrast"] .carousel,
[data-theme="high-contrast"] .carousel-inner,
[data-theme="high-contrast"] .carousel-item,
[data-theme="high-contrast"] .carousel-item *,
[data-theme="high-contrast"] .carousel img {
  background-color: transparent !important;
  background-image: inherit !important;
}

[data-theme="high-contrast"] .carousel-control-prev,
[data-theme="high-contrast"] .carousel-control-next {
  background-color: transparent !important;
  background-image: inherit !important;
}

[data-theme="high-contrast"] .carousel-indicators [data-bs-target] {
  background-color: white !important;
  border-color: white !important;
}

[data-theme="high-contrast"] #btn-search {
  border: 1px solid white !important;
}

[data-theme="high-contrast"] #main_image_bg {
  background-color: #ff0000 !important;
  background-image: none !important;
}

[data-theme="high-contrast"] i {
  border-color: transparent !important;
}

[data-theme="high-contrast"] a,
[data-theme="high-contrast"] button {
  box-shadow: none !important;
  text-decoration: underline !important;
  color: white !important;
}

[data-theme="high-contrast"] a:hover,
[data-theme="high-contrast"] a:visited {
  box-shadow: none !important;
  text-decoration: underline !important;
  color: white !important;
}

[data-theme="high-contrast"] button:hover,
[data-theme="high-contrast"] button:visited {
  border: 1px solid white !important;
  box-shadow: none !important;
  text-decoration: underline !important;
  color: white !important;
}

[data-theme="high-contrast"] button,
[data-theme="high-contrast"] input[type="submit"] {
  border: 1px solid white;
}

[data-theme="high-contrast"] .usa-alert-success::before {
  background-color: white;
}

[data-theme="high-contrast"] .usa-media_block {
  border: 2px solid white !important;
}

[data-theme="high-contrast"] .usa-footer {
  border-top: 1px solid white !important;
}
