/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #ffcc00;
  color: #000;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1001;
  transition: top 0.3s ease;
  font-weight: bold;
  font-size: 16px;
}

.skip-link:focus {
  top: 6px;
}

.skip-link:focus-visible {
  top: 6px;
  outline: 3px solid #000;
  outline-offset: 2px;
  background: #000;
  color: #ffcc00;
  box-shadow: 0 0 0 1px #ffcc00;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--background-color, #f4f4f4);
  color: var(--text-color, #333);
  transition: background-color 0.3s, color 0.3s;
}

header {
  background-color: #007bff;
  color: white;
  text-align: center;
  padding: 20px;
}

.theme-toggle {
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 14px;
  background-color: #fff;
  color: #007bff;
  border: 1px solid #007bff;
  border-radius: 5px;
  cursor: pointer;
}

.theme-toggle:hover {
  background-color: #0056b3;
  color: white;
}

.theme-toggle:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
  border-color: #000;
}

nav {
  background-color: #333;
  padding: 10px;
  text-align: center;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

nav a:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
  text-decoration: none;
  border-radius: 3px;
  padding: 2px 4px;
}

/* Layout */
.layout {
  display: flex;
  flex: 1;
  gap: 20px;
  padding: 20px;
}

.sidebar {
  width: 300px;
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar h2 {
  margin-top: 0;
  color: #007bff;
}

.sidebar h1 {
  margin-top: 0;
  color: #007bff;
  font-size: 1.8em;
  margin-bottom: 15px;
}

.sidebar h3 {
  color: #333;
  margin-top: 20px;
}

.sidebar ul {
  padding-left: 20px;
}

.sidebar li {
  margin-bottom: 8px;
}

.sidebar .actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 20px;
}

.sidebar-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content {
  flex: 1;
  min-width: 0;
}

section {
  margin: 20px auto;
  padding: 20px;
  max-width: 800px;
  background-color: white;
  color: #121212;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hidden {
  display: none;
}

.code-example {
  background-color: #f9f9f9;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: monospace;
  overflow-x: auto;
  position: relative;
}

.code-example-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  min-width: 44px;
  min-height: 44px;
  transition: all 0.2s ease;
  position: relative;
}

.copy-button:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.copy-button:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.copy-button:active {
  transform: translateY(0);
}

.copy-button.copied {
  background-color: #28a745;
}

.copy-button.copied .copy-text::after {
  content: "ed!";
}

.copy-icon {
  font-size: 16px;
}

.copy-text {
  font-size: 14px;
}

.copy-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #28a745;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.code-example h4 {
  margin-top: 0;
  font-size: 1.1em;
}


.high-contrast {
  background-color: black;
  color: yellow;
}

.box {
  width: 50px;
  height: 50px;
  background-color: red;
  margin-top: 20px;
  animation: move 2s infinite;
}

@keyframes move {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(100px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .box {
    animation: none;
  }
}

.error {
  color: red;
  margin-top: 5px;
  font-weight: bold;
}

footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 10px;
  margin-top: auto;
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    gap: 15px;
  }
  
  .sidebar {
    width: auto;
    position: static;
  }
  
  nav a {
    display: block;
    margin: 10px 0;
  }

  button {
    width: 100%;
  }
  
  .cta-primary,
  .cta-secondary {
    min-width: 44px;
    min-height: 44px;
    width: auto;
  }
  
  .sidebar .actions {
    flex-direction: column;
  }
  
  .sidebar .actions .cta-primary,
  .sidebar .actions .cta-secondary {
    width: 100%;
  }
}


#language-example {
  margin-top: 1em;
}
label {
  font-weight: bold;
  margin-right: 0.5em;
}
select {
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
}
p#hello-world-text {
  margin-top: 1em;
  padding: 4px;
  font-size: 1.2em;
  font-weight: bold;
}
.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

 /* Styles for Slider */
 .slider-container {
  display: flex;
  align-items: center;
  margin: 1em 0;
}
.slider {
  width: 200px;
  margin: 0 1em;
}
.slider-label {
  font-size: 1.2em;
}

/* Styles for Date Picker */
.datepicker {
  position: relative;
  margin-top: 1em;
}
.calendar {
  display: none;
  position: absolute;
  left:5em;
  top: 2em;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.calendar.active {
  display: block;
}
.calendar table {
  border-collapse: collapse;
  width: 100%;
}
.calendar th,
.calendar td {
  padding: 0.5em;
  text-align: center;
  cursor: pointer;
}
.calendar .today {
  background-color: #007bff;
  color: white;
}
/* Accessible Notifications */
.toast-notification {
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  background-color: #0056b3;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  z-index: 1000;
  opacity: 1;
  animation: fadeout 4s forwards;
}

@keyframes fadeout {
  0% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.btn{
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 14px;
  background-color: #fff;
  color: #007bff;
  border: 1px solid #007bff;
  border-radius: 5px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
  color: white;
}

.btn:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
  border-color: #000;
}

.btn-primary {
  background-color: #007bff;
  color: white;
  font-weight: bold;
  padding: 12px 24px;
}

.btn-primary:hover {
  background-color: #0056b3;
  color: white;
}

.btn-primary:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.btn-secondary {
  background-color: transparent;
  color: #007bff;
  border: 2px solid #007bff;
  padding: 12px 24px;
}

.btn-secondary:hover {
  background-color: #007bff;
  color: white;
}

.btn-secondary:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
  border-color: #000;
}

/* Focus styles for buttons and links */
button:focus-visible, 
a:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

/* Fallback for older browsers */
button:focus, 
a:focus {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

/* Accessible Button Styles */
.cta-primary,
.cta-secondary {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  line-height: 1.2;
}

.cta-primary:focus-visible,
.cta-secondary:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

.cta-primary {
  background: #000;
  color: #fff;
}

.cta-primary:hover,
.cta-primary:focus {
  background: #333;
}

.cta-secondary {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

.cta-secondary:hover,
.cta-secondary:focus {
  background: #000;
  color: #fff;
}

/* Dark mode adjustments for copy button */
.dark-mode .copy-button {
  background-color: #3182ce;
  color: #e2e8f0;
}

.dark-mode .copy-button:hover {
  background-color: #2c5282;
}

.dark-mode .copy-button:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.dark-mode .copy-button.copied {
  background-color: #38a169;
}

.dark-mode .copy-feedback {
  background-color: #38a169;
  color: #e2e8f0;
}

/* High contrast mode adjustments for copy button */
.high-contrast .copy-button {
  background-color: #000;
  color: #ffcc00;
  border: 2px solid #ffcc00;
}

.high-contrast .copy-button:hover {
  background-color: #ffcc00;
  color: #000;
}

.high-contrast .copy-button:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.high-contrast .copy-button.copied {
  background-color: #000;
  color: #00ff00;
  border-color: #00ff00;
}

.high-contrast .copy-feedback {
  background-color: #000;
  color: #00ff00;
  border: 2px solid #00ff00;
}

.dark-mode .cta-primary:hover,
.dark-mode .cta-primary:focus {
  background: #ccc;
}

.dark-mode .cta-secondary {
  background: #000;
  color: #fff;
  border: 1px solid #fff;
}

.dark-mode .cta-secondary:hover,
.dark-mode .cta-secondary:focus {
  background: #fff;
  color: #000;
}

/* High contrast mode button adjustments */
.high-contrast .cta-primary {
  background: #000;
  color: #ffcc00;
  border: 2px solid #ffcc00;
}

.high-contrast .cta-primary:hover,
.high-contrast .cta-primary:focus {
  background: #ffcc00;
  color: #000;
}

.high-contrast .cta-secondary {
  background: #ffcc00;
  color: #000;
  border: 2px solid #000;
}

.high-contrast .cta-secondary:hover,
.high-contrast .cta-secondary:focus {
  background: #000;
  color: #ffcc00;
}

/* GitHub Corner SVG */
.github-corner {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  width: 80px;
  height: 80px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.github-corner:hover {
  transform: scale(1.1);
}

.github-corner svg {
  width: 80px;
  height: 80px;
  fill: #151513;
  color: #fff;
}

.github-corner:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

.github-corner:focus {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

/* GitHub Star Button */
.github-star-container {
  position: fixed;
  top: 0;
  right: 90px; /* Positioned to the left of the corner */
  z-index: 1000;
}

.github-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #24292e;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #24292e;
  transition: all 0.3s ease;
}

.github-button:hover {
  background-color: #0366d6;
  border-color: #0366d6;
  color: #fff;
  text-decoration: none;
}

.github-button:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
  border-color: #000;
}

.github-button:focus {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

/* Dark mode adjustments for GitHub elements */
.dark-mode .github-corner svg {
  fill: #f0f6fc;
  color: #0d1117;
}

.dark-mode .github-corner:hover svg {
  fill: #ffffff;
  color: #000000;
}

.dark-mode .github-button {
  background-color: #21262d;
  border-color: #30363d;
  color: #f0f6fc;
}

.dark-mode .github-button:hover {
  background-color: #238636;
  border-color: #238636;
  color: #f0f6fc;
}

/* High contrast mode adjustments for GitHub elements */
.high-contrast .github-corner svg {
  fill: #000;
  color: #ffcc00;
}

.high-contrast .github-corner:hover svg {
  fill: #ffcc00;
  color: #000;
}

.high-contrast .github-button {
  background-color: #000;
  border-color: #ffcc00;
  color: #ffcc00;
}

.high-contrast .github-button:hover {
  background-color: #ffcc00;
  border-color: #000;
  color: #000;
}

/* Table of Contents Styles */
.toc-nav {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.toc-nav h3 {
  margin: 0 0 15px 0;
  color: #007bff;
  font-size: 1.1em;
  font-weight: bold;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-link {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.95em;
  line-height: 1.4;
}

.toc-link:hover {
  background-color: #e9ecef;
  color: #007bff;
  text-decoration: none;
}

.toc-link:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
  background-color: #ffcc00;
  color: #000;
}

.toc-link[aria-current="page"] {
  background-color: #007bff;
  color: white;
  font-weight: bold;
}

.toc-link[aria-current="page"]:hover {
  background-color: #0056b3;
  color: white;
}

.toc-link[aria-current="page"]:focus-visible {
  background-color: #ffcc00;
  color: #000;
}

/* Dark mode adjustments for TOC */
.dark-mode .toc-nav {
  background-color: #2d3748;
  border-left-color: #63b3ed;
}

.dark-mode .toc-nav h3 {
  color: #63b3ed;
}

.dark-mode .toc-link {
  color: #e2e8f0;
}

.dark-mode .toc-link:hover {
  background-color: #4a5568;
  color: #63b3ed;
}

.dark-mode .toc-link[aria-current="page"] {
  background-color: #3182ce;
  color: white;
}

.dark-mode .toc-link[aria-current="page"]:hover {
  background-color: #2c5282;
}

/* High contrast mode adjustments for TOC */
.high-contrast .toc-nav {
  background-color: #000;
  border-left-color: #ffcc00;
}

.high-contrast .toc-nav h3 {
  color: #ffcc00;
}

.high-contrast .toc-link {
  color: #ffcc00;
  border: 1px solid transparent;
}

.high-contrast .toc-link:hover {
  background-color: #ffcc00;
  color: #000;
  border-color: #000;
}

.high-contrast .toc-link[aria-current="page"] {
  background-color: #ffcc00;
  color: #000;
  border-color: #000;
}

.high-contrast .toc-link[aria-current="page"]:hover {
  background-color: #000;
  color: #ffcc00;
}

/* Mobile adjustments for TOC */
@media (max-width: 768px) {
  .toc-nav {
    margin: 15px 0;
    padding: 12px;
  }
  
  .toc-link {
    padding: 10px 12px;
    font-size: 1em;
  }
}

/* Section Permalink Styles */
.section-link {
  color: #999;
  text-decoration: none;
  font-size: 0.8em;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
  padding: 2px 4px;
  border-radius: 3px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

h2:hover .section-link,
h2:focus-within .section-link,
.section-link:focus {
  opacity: 1;
}

.section-link:hover {
  color: #007bff;
  background-color: #f8f9fa;
}

.section-link:focus-visible {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
  background-color: #ffcc00;
  color: #000;
  opacity: 1;
}

/* Dark mode adjustments for section links */
.dark-mode .section-link {
  color: #666;
}

.dark-mode .section-link:hover {
  color: #63b3ed;
  background-color: #2d3748;
}

.dark-mode .section-link:focus-visible {
  background-color: #ffcc00;
  color: #000;
}

/* High contrast mode adjustments for section links */
.high-contrast .section-link {
  color: #ffcc00;
}

.high-contrast .section-link:hover {
  color: #000;
  background-color: #ffcc00;
}

.high-contrast .section-link:focus-visible {
  background-color: #ffcc00;
  color: #000;
  outline: 2px solid #000;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  min-width: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.back-to-top:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.back-to-top:active {
  transform: translateY(0);
}

/* Dark mode adjustments for back to top button */
.dark-mode .back-to-top {
  background-color: #3182ce;
  color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.dark-mode .back-to-top:hover {
  background-color: #2c5282;
  box-shadow: 0 6px 16px rgba(49, 130, 206, 0.4);
}

.dark-mode .back-to-top:focus-visible {
  background-color: #ffcc00;
  color: #000;
}

/* High contrast mode adjustments for back to top button */
.high-contrast .back-to-top {
  background-color: #000;
  color: #ffcc00;
  border: 2px solid #ffcc00;
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

.high-contrast .back-to-top:hover {
  background-color: #ffcc00;
  color: #000;
  box-shadow: 0 6px 16px rgba(255, 204, 0, 0.4);
}

.high-contrast .back-to-top:focus-visible {
  background-color: #ffcc00;
  color: #000;
  outline: 3px solid #000;
}

/* Mobile adjustments for back to top button */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    min-width: 45px;
    min-height: 45px;
  }
}

/* Contrast Checker Styles */
.contrast-checker {
  margin-top: 20px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.contrast-inputs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.color-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.color-input-group label {
  font-weight: bold;
  color: #333;
  font-size: 14px;
}

.color-input-group input[type="color"] {
  width: 100%;
  height: 44px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 0;
  transition: border-color 0.2s ease;
}

.color-input-group input[type="color"]:hover {
  border-color: #007bff;
}

.color-input-group input[type="color"]:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
  border-color: #007bff;
}

.contrast-results {
  background-color: white;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.contrast-ratio {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
}

.contrast-ratio span {
  color: #007bff;
}

.wcag-compliance {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.compliance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 100px;
}

.compliance-label {
  font-size: 14px;
  font-weight: bold;
  color: #666;
}

.compliance-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  min-width: 60px;
}

.compliance-status.pass {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.compliance-status.fail {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Dark mode adjustments for contrast checker */
.dark-mode .contrast-checker {
  background-color: #2d3748;
  border-color: #4a5568;
}

.dark-mode .color-input-group label {
  color: #e2e8f0;
}

.dark-mode .color-input-group input[type="color"] {
  border-color: #4a5568;
}

.dark-mode .color-input-group input[type="color"]:hover {
  border-color: #63b3ed;
}

.dark-mode .color-input-group input[type="color"]:focus-visible {
  border-color: #63b3ed;
}

.dark-mode .contrast-results {
  background-color: #1a202c;
  border-color: #4a5568;
}

.dark-mode .contrast-ratio {
  color: #e2e8f0;
}

.dark-mode .contrast-ratio span {
  color: #63b3ed;
}

.dark-mode .compliance-label {
  color: #a0aec0;
}

.dark-mode .compliance-status.pass {
  background-color: #22543d;
  color: #9ae6b4;
  border-color: #38a169;
}

.dark-mode .compliance-status.fail {
  background-color: #742a2a;
  color: #feb2b2;
  border-color: #e53e3e;
}

/* High contrast mode adjustments for contrast checker */
.high-contrast .contrast-checker {
  background-color: #000;
  border-color: #ffcc00;
}

.high-contrast .color-input-group label {
  color: #ffcc00;
}

.high-contrast .color-input-group input[type="color"] {
  border-color: #ffcc00;
}

.high-contrast .color-input-group input[type="color"]:hover {
  border-color: #ffffff;
}

.high-contrast .color-input-group input[type="color"]:focus-visible {
  border-color: #ffffff;
}

.high-contrast .contrast-results {
  background-color: #000;
  border-color: #ffcc00;
}

.high-contrast .contrast-ratio {
  color: #ffcc00;
}

.high-contrast .contrast-ratio span {
  color: #ffffff;
}

.high-contrast .compliance-label {
  color: #ffcc00;
}

.high-contrast .compliance-status.pass {
  background-color: #000;
  color: #00ff00;
  border-color: #00ff00;
}

.high-contrast .compliance-status.fail {
  background-color: #000;
  color: #ff0000;
  border-color: #ff0000;
}

/* Print Stylesheet */
@media print {
  /* Reset and base styles for print */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    font-family: "Times New Roman", Times, serif;
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
    background: #fff;
    margin: 0;
    padding: 0;
  }
  
  /* Single column layout */
  .layout {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    gap: 0 !important;
    padding: 0 !important;
  }
  
  .sidebar {
    display: none !important;
  }
  
  .content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    min-width: auto !important;
  }
  
  /* Hide decorative UI elements */
  .github-corner,
  .github-star-container,
  .back-to-top,
  .theme-toggle,
  .skip-link,
  .copy-button,
  .copy-feedback,
  .toast-notification {
    display: none !important;
  }
  
  /* Navigation styling */
  nav {
    display: none !important;
  }
  
  /* Header styling */
  header {
    border-bottom: 2px solid #000;
    margin-bottom: 20pt;
    padding-bottom: 10pt;
    background: #fff !important;
    color: #000 !important;
  }
  
  header p {
    font-size: 14pt;
    font-weight: bold;
    margin: 0;
    color: #000 !important;
  }
  
  /* Show all sections (remove hidden class) */
  section.hidden {
    display: block !important;
  }
  
  section {
    margin: 20pt 0;
    padding: 0;
    background: #fff !important;
    color: #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  
  /* Typography for print */
  h1 {
    font-size: 18pt;
    font-weight: bold;
    margin: 20pt 0 10pt 0;
    page-break-after: avoid;
    color: #000 !important;
  }
  
  h2 {
    font-size: 16pt;
    font-weight: bold;
    margin: 18pt 0 8pt 0;
    page-break-after: avoid;
    border-bottom: 1px solid #000;
    padding-bottom: 4pt;
    color: #000 !important;
  }
  
  h3 {
    font-size: 14pt;
    font-weight: bold;
    margin: 14pt 0 6pt 0;
    page-break-after: avoid;
    color: #000 !important;
  }
  
  h4 {
    font-size: 12pt;
    font-weight: bold;
    margin: 12pt 0 4pt 0;
    page-break-after: avoid;
    color: #000 !important;
  }
  
  p {
    margin: 6pt 0;
    text-align: justify;
    color: #000 !important;
  }
  
  /* Lists */
  ul, ol {
    margin: 6pt 0;
    padding-left: 20pt;
  }
  
  li {
    margin: 3pt 0;
    page-break-inside: avoid;
    color: #000 !important;
  }
  
  /* Code styling */
  code {
    font-family: "Courier New", Courier, monospace;
    font-size: 10pt;
    background: #f5f5f5;
    padding: 2pt 4pt;
    border: 1px solid #ccc;
    border-radius: 2pt;
    color: #000 !important;
    word-break: break-word;
  }
  
  pre {
    font-family: "Courier New", Courier, monospace;
    font-size: 10pt;
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 8pt;
    margin: 8pt 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    page-break-inside: avoid;
    color: #000 !important;
  }
  
  .code-example {
    border: 1px solid #ccc;
    margin: 8pt 0;
    padding: 8pt;
    background: #f5f5f5;
    page-break-inside: avoid;
  }
  
  .code-example-header {
    display: none !important;
  }
  
  /* Links - show URLs after anchor text */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
    text-decoration: none;
  }
  
  /* Don't show URLs for internal links */
  a[href^="#"]:after {
    content: "";
  }
  
  /* Don't show URLs for mailto links */
  a[href^="mailto:"]:after {
    content: "";
  }
  
  /* Don't show URLs for javascript: links */
  a[href^="javascript:"]:after {
    content: "";
  }
  
  /* Buttons and interactive elements */
  button,
  input[type="color"],
  input[type="email"],
  input[type="range"],
  input[type="text"],
  select {
    display: none !important;
  }
  
  /* Form labels should be visible */
  label {
    font-weight: bold;
    color: #000 !important;
  }
  
  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    margin: 8pt 0;
    page-break-inside: avoid;
  }
  
  th, td {
    border: 1px solid #000;
    padding: 4pt;
    text-align: left;
    color: #000 !important;
  }
  
  th {
    background: #f0f0f0;
    font-weight: bold;
  }
  
  /* Footer */
  footer {
    border-top: 1px solid #000;
    margin-top: 30pt;
    padding-top: 10pt;
    text-align: center;
    font-size: 10pt;
    background: #fff !important;
    color: #000 !important;
  }
  
  /* Page breaks */
  h1, h2 {
    page-break-before: auto;
  }
  
  /* Avoid breaking these elements */
  .contrast-checker,
  .slider-container,
  .datepicker,
  .calendar,
  .language-example {
    display: none !important;
  }
  
  /* Live regions and feedback */
  [aria-live],
  .copy-feedback {
    display: none !important;
  }
  
  /* Ensure proper spacing */
  .section-link {
    display: none !important;
  }
  
  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }
  
  /* Ensure high contrast remains readable */
  .high-contrast,
  .dark-mode {
    background: #fff !important;
    color: #000 !important;
  }
  
  .high-contrast *,
  .dark-mode * {
    background: #fff !important;
    color: #000 !important;
  }
  
  /* Remove any remaining shadows and backgrounds */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  /* Ensure proper spacing for readability */
  .btn,
  .cta-primary,
  .cta-secondary {
    display: none !important;
  }
  
  /* Hide interactive widgets */
  .slider,
  .calendar,
  .datepicker,
  .contrast-checker,
  .toast-notification {
    display: none !important;
  }
  
  /* Show form labels but hide inputs */
  .color-input-group label,
  .slider-label,
  .datepicker-label {
    display: block !important;
    font-weight: bold;
    margin-bottom: 4pt;
  }
  
  /* Ensure proper page breaks for sections */
  section {
    page-break-inside: avoid;
  }
  
  /* Avoid breaking code blocks */
  pre,
  .code-example {
    page-break-inside: avoid;
  }
  
  /* Ensure links are readable */
  a {
    color: #000 !important;
    text-decoration: underline;
  }
}

/* Live Playground Styles */
.playground {
  margin: 20px 0;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background-color: #f8f9fa;
  overflow: hidden;
}

.playground summary {
  padding: 15px 20px;
  background-color: #007bff;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.playground summary:hover {
  background-color: #0056b3;
}

.playground summary:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.pg-controls {
  padding: 20px;
  background-color: white;
}

.pg-controls label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

#pg-code {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  background-color: #f8f9fa;
  color: #333;
  transition: border-color 0.2s ease;
}

#pg-code:focus {
  outline: none;
  border-color: #007bff;
}

#pg-code:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
  border-color: #007bff;
}

.pg-actions {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.pg-run,
.pg-reset {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg-run {
  background-color: #28a745;
  color: white;
}

.pg-run:hover {
  background-color: #218838;
}

.pg-run:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.pg-reset {
  background-color: #6c757d;
  color: white;
}

.pg-reset:hover {
  background-color: #5a6268;
}

.pg-reset:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
  background-color: #ffcc00;
  color: #000;
}

.pg-output {
  width: 100%;
  height: 300px;
  border: none;
  border-top: 1px solid #e9ecef;
  background-color: white;
  display: block;
}

.pg-status {
  padding: 8px 20px;
  background-color: #e9ecef;
  font-size: 14px;
  color: #666;
  border-top: 1px solid #ddd;
}

/* Dark mode adjustments for playground */
.dark-mode .playground {
  background-color: #2d3748;
  border-color: #4a5568;
}

.dark-mode .playground summary {
  background-color: #3182ce;
  color: #e2e8f0;
}

.dark-mode .playground summary:hover {
  background-color: #2c5282;
}

.dark-mode .playground summary:focus-visible {
  background-color: #ffcc00;
  color: #000;
}

.dark-mode .pg-controls {
  background-color: #1a202c;
}

.dark-mode .pg-controls label {
  color: #e2e8f0;
}

.dark-mode #pg-code {
  background-color: #2d3748;
  color: #e2e8f0;
  border-color: #4a5568;
}

.dark-mode #pg-code:focus {
  border-color: #63b3ed;
}

.dark-mode .pg-run {
  background-color: #38a169;
}

.dark-mode .pg-run:hover {
  background-color: #2f855a;
}

.dark-mode .pg-reset {
  background-color: #718096;
}

.dark-mode .pg-reset:hover {
  background-color: #4a5568;
}

.dark-mode .pg-output {
  background-color: #1a202c;
  border-top-color: #4a5568;
}

.dark-mode .pg-status {
  background-color: #2d3748;
  color: #a0aec0;
  border-top-color: #4a5568;
}

/* High contrast mode adjustments for playground */
.high-contrast .playground {
  background-color: #000;
  border-color: #ffcc00;
}

.high-contrast .playground summary {
  background-color: #000;
  color: #ffcc00;
  border: 2px solid #ffcc00;
}

.high-contrast .playground summary:hover {
  background-color: #ffcc00;
  color: #000;
}

.high-contrast .playground summary:focus-visible {
  background-color: #ffcc00;
  color: #000;
  outline: 3px solid #000;
}

.high-contrast .pg-controls {
  background-color: #000;
}

.high-contrast .pg-controls label {
  color: #ffcc00;
}

.high-contrast #pg-code {
  background-color: #000;
  color: #ffcc00;
  border-color: #ffcc00;
}

.high-contrast #pg-code:focus {
  border-color: #ffffff;
}

.high-contrast .pg-run {
  background-color: #000;
  color: #00ff00;
  border: 2px solid #00ff00;
}

.high-contrast .pg-run:hover {
  background-color: #00ff00;
  color: #000;
}

.high-contrast .pg-reset {
  background-color: #000;
  color: #ffcc00;
  border: 2px solid #ffcc00;
}

.high-contrast .pg-reset:hover {
  background-color: #ffcc00;
  color: #000;
}

.high-contrast .pg-output {
  background-color: #000;
  border-top-color: #ffcc00;
}

.high-contrast .pg-status {
  background-color: #000;
  color: #ffcc00;
  border-top-color: #ffcc00;
}

/* Mobile adjustments for playground */
@media (max-width: 768px) {
  .playground summary {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .pg-controls {
    padding: 15px;
  }
  
  .pg-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .pg-run,
  .pg-reset {
    width: 100%;
    padding: 15px;
  }
  
  .pg-output {
    height: 250px;
  }
}

/* Search Input Styles */
.search-container {
  margin: 20px 0;
  position: relative;
}

#guide-search {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background-color: white;
  color: #333;
  transition: all 0.2s ease;
  min-height: 44px;
  box-sizing: border-box;
}

#guide-search:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#guide-search:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
  border-color: #007bff;
}

#guide-search::placeholder {
  color: #666;
  opacity: 1;
}

/* Visually hidden class for screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Dark mode adjustments for search */
.dark-mode #guide-search {
  background-color: #2d3748;
  color: #e2e8f0;
  border-color: #4a5568;
}

.dark-mode #guide-search:focus {
  border-color: #63b3ed;
  box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
}

.dark-mode #guide-search:focus-visible {
  border-color: #63b3ed;
}

.dark-mode #guide-search::placeholder {
  color: #a0aec0;
}

/* High contrast mode adjustments for search */
.high-contrast #guide-search {
  background-color: #000;
  color: #ffcc00;
  border-color: #ffcc00;
}

.high-contrast #guide-search:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.high-contrast #guide-search:focus-visible {
  border-color: #ffffff;
  outline: 3px solid #ffffff;
}

.high-contrast #guide-search::placeholder {
  color: #ffcc00;
  opacity: 0.7;
}

/* Mobile adjustments for search */
@media (max-width: 768px) {
  .search-container {
    margin: 15px 0;
  }
  
  #guide-search {
    padding: 15px 16px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}