/* Desktop-only accessibility layer */
@media (max-width: 767px) {
  .acc-desktop-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  :root {
    --acc-bg: #ffffff;
    --acc-surface: #ffffff;
    --acc-text: #1f2937;
    --acc-muted: #4b5563;
    --acc-border: #d1d5db;
    --acc-accent: #dc2323;
  }

  html[data-theme="dark-cyd"] {
    --acc-bg: #081a33;
    --acc-surface: #0e2648;
    --acc-text: #f2f6ff;
    --acc-muted: #cfdaef;
    --acc-border: #1f4471;
    --acc-accent: #dc2323;
  }

  html[data-theme="dark-cyd"] body {
    background-color: var(--acc-bg) !important;
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] header,
  html[data-theme="dark-cyd"] footer,
  html[data-theme="dark-cyd"] main,
  html[data-theme="dark-cyd"] section,
  html[data-theme="dark-cyd"] .bg-white,
  html[data-theme="dark-cyd"] .bg-gray-50 {
    background-color: var(--acc-surface) !important;
    color: var(--acc-text) !important;
    border-color: var(--acc-border) !important;
  }

  html[data-theme="dark-cyd"] p,
  html[data-theme="dark-cyd"] li,
  html[data-theme="dark-cyd"] label {
    color: var(--acc-muted) !important;
  }

  html[data-theme="dark-cyd"] .text-white {
    color: #ffffff !important;
  }

  html[data-theme="dark-cyd"] h1,
  html[data-theme="dark-cyd"] h2,
  html[data-theme="dark-cyd"] h3,
  html[data-theme="dark-cyd"] h4,
  html[data-theme="dark-cyd"] h5,
  html[data-theme="dark-cyd"] h6,
  html[data-theme="dark-cyd"] .text-black,
  html[data-theme="dark-cyd"] .text-gray-800,
  html[data-theme="dark-cyd"] .text-gray-900 {
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] .text-gray-500,
  html[data-theme="dark-cyd"] .text-gray-600,
  html[data-theme="dark-cyd"] .text-gray-700 {
    color: var(--acc-muted) !important;
  }

  html[data-theme="dark-cyd"] a {
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] a:hover,
  html[data-theme="dark-cyd"] a:focus-visible {
    color: var(--acc-accent) !important;
  }

  html[data-theme="dark-cyd"] .linkRojo {
    color: var(--acc-text) !important;
    border-color: transparent !important;
  }

  html[data-theme="dark-cyd"] .linkRojo:hover,
  html[data-theme="dark-cyd"] .linkRojo:focus-visible,
  html[data-theme="dark-cyd"] .linkRojo.text-rojoCYD,
  html[data-theme="dark-cyd"] .text-rojoCYD {
    color: var(--acc-accent) !important;
    border-color: var(--acc-accent) !important;
  }

  html[data-theme="dark-cyd"] .bg-gray-100,
  html[data-theme="dark-cyd"] .bg-gray-200 {
    background-color: #15325b !important;
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] .bg-neutral-300\/25 {
    background-color: #17365f !important;
  }

  html[data-theme="dark-cyd"] .table-container table {
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] .table-container thead th,
  html[data-theme="dark-cyd"] .table-container tbody td {
    border-color: var(--acc-border) !important;
  }

  html[data-theme="dark-cyd"] .table-container thead th,
  html[data-theme="dark-cyd"] .sticky-header {
    background-color: #123056 !important;
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] .table-container tbody,
  html[data-theme="dark-cyd"] .table-container tbody tr,
  html[data-theme="dark-cyd"] .table-container tbody td.bg-white {
    background-color: var(--acc-surface) !important;
    color: var(--acc-text) !important;
  }

  html[data-theme="dark-cyd"] .table-container tbody tr:hover,
  html[data-theme="dark-cyd"] .table-container tbody tr.hover\:bg-gray-50:hover {
    background-color: #123056 !important;
  }

  html[data-theme="dark-cyd"] input,
  html[data-theme="dark-cyd"] select,
  html[data-theme="dark-cyd"] textarea {
    background-color: #102847 !important;
    color: var(--acc-text) !important;
    border-color: var(--acc-border) !important;
  }

  html[data-theme="dark-cyd"] input::placeholder,
  html[data-theme="dark-cyd"] textarea::placeholder {
    color: var(--acc-muted) !important;
  }

  html[data-text-scale="normal"] {
    font-size: 100%;
  }

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

  html[data-text-scale="xlarge"] {
    font-size: 125%;
  }

  html[data-text-scale="large"] body,
  html[data-text-scale="xlarge"] body {
    line-height: 1.7;
  }

  html[data-pattern="on"] .acc-solid-surface,
  html[data-pattern="on"] .btnRojo,
  html[data-pattern="on"] .bg-rojoCYD,
  html[data-pattern="on"] .bg-red-600,
  html[data-pattern="on"] .bg-blue-600,
  html[data-pattern="on"] .bg-gray-800 {
    background-image: repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0.22) 8px,
      rgba(0, 0, 0, 0.12) 8px,
      rgba(0, 0, 0, 0.12) 16px
    ) !important;
    background-blend-mode: multiply;
  }

  .acc-menu-panel {
    width: min(92vw, 26rem);
    z-index: 2000;
  }

  .acc-option-btn {
    border: 1px solid var(--acc-border);
    border-radius: 0.5rem;
    padding: 0.35rem 0.6rem;
    color: var(--acc-text);
    background-color: var(--acc-surface);
    font-size: 0.9rem;
    line-height: 1.25;
    white-space: normal;
  }

  .acc-option-btn:hover {
    border-color: var(--acc-accent);
  }

  .acc-option-active {
    border-color: var(--acc-accent) !important;
    color: var(--acc-accent) !important;
    font-weight: 600;
  }

  .acc-menu-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--acc-text);
    margin-bottom: 0.5rem;
  }
}
