/* AppSystem 3.23 — zaawansowane centrum dostępności */

.accessibility-command-center {
  --a11y-accent: #075f9b;
  --a11y-accent-dark: #05466f;
  --a11y-soft: #edf7ff;
  --a11y-soft-2: #f5f9fc;
  --a11y-green: #08765b;
  --a11y-violet: #6d4bc3;
  width: min(760px, 100vw);
  border-left: 1px solid #b8cad6;
  box-shadow: -28px 0 80px rgba(6, 27, 43, .2);
}

.accessibility-command-head {
  min-height: 178px;
  padding: 26px 30px 24px;
  background:
    radial-gradient(circle at 86% 8%, rgba(127, 211, 255, .27), transparent 34%),
    linear-gradient(145deg, #072f4c 0%, #075f9b 58%, #0c739f 100%);
  color: #fff;
}

.accessibility-command-head .accessibility-head-copy {
  max-width: 610px;
}

.accessibility-command-head .accessibility-eyebrow,
.accessibility-command-head h2,
.accessibility-command-head p,
.accessibility-command-head small {
  color: inherit;
}

.accessibility-command-head .accessibility-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #bfe9ff;
  font-size: .78rem;
  letter-spacing: .08em;
}

.accessibility-command-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -.025em;
}

.accessibility-command-head p {
  max-width: 590px;
  margin: 8px 0 10px;
  color: #e2f4ff !important;
  font-size: .96rem;
  line-height: 1.55;
}

.accessibility-command-head small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(0, 0, 0, .13);
  color: #fff;
  font-size: .75rem;
  font-weight: 750;
}

.accessibility-command-head small::before {
  content: "✓";
  font-weight: 900;
}

.accessibility-command-head .accessibility-close-btn {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .48);
  background: rgba(0, 0, 0, .16);
  color: #fff;
  font-size: 1.6rem;
}

.accessibility-command-center .accessibility-panel-body {
  padding: 22px 24px 30px;
  background: #eef3f7;
}

.accessibility-command-center .accessibility-panel-view {
  display: grid;
  gap: 18px;
}

.accessibility-command-center .accessibility-panel-view[hidden] {
  display: none !important;
}

.a11y-command-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 20px;
  overflow: hidden;
  min-height: 250px;
  padding: 26px;
  border: 1px solid #b7d7ea;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 18%, rgba(92, 190, 237, .31), transparent 37%),
    linear-gradient(135deg, #fff 0%, #f2faff 100%);
  box-shadow: 0 14px 34px rgba(24, 63, 88, .1);
}

.a11y-command-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.a11y-command-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #9ed4c5;
  border-radius: 999px;
  background: #e8f8f2;
  color: #075742;
  font-size: .76rem;
  font-weight: 850;
}

.a11y-command-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a8d68;
  box-shadow: 0 0 0 4px rgba(10, 141, 104, .13);
}

.a11y-command-hero h3 {
  max-width: 430px;
  margin: 14px 0 7px;
  color: #102f43;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.16;
  letter-spacing: -.025em;
}

.a11y-command-hero p {
  max-width: 470px;
  margin: 0;
  color: #496777;
  font-size: .94rem;
  line-height: 1.55;
}

.a11y-setup-launch {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 8px;
  margin-top: 19px;
  min-height: 50px;
  border-radius: 13px;
}

.a11y-setup-launch small {
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,.35);
  font-size: .68rem;
  font-weight: 700;
}

.a11y-command-hero-visual {
  align-self: center;
  display: grid;
  grid-template-rows: 76px repeat(3, 15px);
  gap: 13px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 18px 45px rgba(7, 76, 118, .18);
  transform: rotate(3deg);
}

.a11y-command-hero-visual span {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #075f9b;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.a11y-command-hero-visual i {
  border-radius: 999px;
  background: #c5d7e2;
}

.a11y-command-hero-visual i:nth-child(3) { width: 82%; }
.a11y-command-hero-visual i:nth-child(4) { width: 62%; }

.a11y-command-summary {
  margin: 0;
  padding: 19px 20px;
  border: 1px solid #b5d9cd;
  border-radius: 18px;
  background: #f4fcf9;
}

.a11y-command-summary .accessibility-foundation-note {
  color: #365f54;
}

.accessibility-command-center .accessibility-v4-section {
  margin: 0;
  padding: 22px;
  border: 1px solid #cfdae2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(33, 58, 73, .055);
}

.accessibility-command-center .accessibility-section-heading > div > h3 {
  font-size: 1.16rem;
}

.a11y-profile-ribbon {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.a11y-profile-ribbon button {
  grid-template-columns: 1fr;
  align-content: start;
  min-height: 166px;
  padding: 14px 12px;
  border-radius: 15px;
  text-align: left;
}

.a11y-profile-ribbon .accessibility-profile-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.a11y-profile-ribbon .accessibility-profile-copy {
  margin-top: 8px;
}

.a11y-profile-ribbon .accessibility-profile-copy strong {
  font-size: .9rem;
}

.a11y-profile-ribbon .accessibility-profile-copy small {
  margin-top: 5px;
  font-size: .75rem;
  line-height: 1.38;
}

.a11y-profile-ribbon .accessibility-profile-action {
  align-self: end;
  justify-self: start;
  margin-top: 9px;
}

.a11y-scale-command {
  margin-top: 2px;
  border: 1px solid #c8d8e3;
  border-radius: 16px;
  background: #f8fbfd;
}

.a11y-quick-setting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.a11y-quick-setting-grid .accessibility-setting-row {
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  min-height: 128px;
}

.a11y-quick-setting-grid .accessibility-switch {
  justify-self: start;
  margin-top: 12px;
}

.a11y-settings-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 40px;
  align-items: center;
  min-height: 54px;
  margin-top: 4px;
  padding: 0 7px 0 15px;
  border: 2px solid #b8cad7;
  border-radius: 15px;
  background: #fff;
  color: #476579;
}

.a11y-settings-search:focus-within {
  border-color: #075f9b;
  box-shadow: 0 0 0 4px rgba(7, 95, 155, .14);
}

.a11y-settings-search > span:first-child {
  font-size: 1.2rem;
  font-weight: 900;
}

.a11y-settings-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 10px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #173a51;
  font: inherit;
}

.a11y-settings-search button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #e8f1f6;
  color: #244e68;
  font-size: 1.25rem;
  cursor: pointer;
}

.a11y-search-status {
  min-height: 1.3em;
  margin: 7px 3px 0;
  color: #557080;
  font-size: .78rem;
}

.a11y-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 11px;
}

.a11y-category-grid > [hidden] {
  display: none !important;
}

.a11y-category-grid .accessibility-subview-card {
  min-height: 112px;
  border-radius: 16px;
}

.a11y-category-grid .accessibility-subview-card:last-child {
  grid-column: 1 / -1;
}

.a11y-category-grid .accessibility-subview-card-icon {
  border-radius: 14px;
}

.a11y-category-grid .accessibility-subview-card-icon.vision { background: #dff1ff; color: #075f9b; }
.a11y-category-grid .accessibility-subview-card-icon.reading { background: #efe8ff; color: #6542bd; }
.a11y-category-grid .accessibility-subview-card-icon.controls { background: #e1f6ef; color: #08765b; }
.a11y-category-grid .accessibility-subview-card-icon.communication { background: #fff0d5; color: #8b5b00; }
.a11y-category-grid .accessibility-subview-card-icon.assistive { background: #e7ecff; color: #3a55a0; }

.a11y-search-empty {
  margin: 13px 0 0;
  padding: 16px;
  border: 1px dashed #9eb4c2;
  border-radius: 13px;
  background: #f7fafc;
  color: #496575;
  text-align: center;
}

.accessibility-command-center .accessibility-subview-head {
  margin: 0;
  padding: 22px;
  border: 1px solid #c7d8e4;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 10%, rgba(62, 174, 226, .16), transparent 35%),
    #fff;
}

.accessibility-command-center .accessibility-subview-head h3 {
  font-size: 1.45rem;
  letter-spacing: -.02em;
}

.accessibility-command-center .accessibility-subview-group {
  margin: 0;
  padding: 20px;
  border: 1px solid #cfdae2;
  border-radius: 18px;
  background: #fff;
}

.accessibility-command-center .accessibility-subview-group > h4 {
  margin-bottom: 14px;
  color: #173a51;
  font-size: 1.03rem;
}

.a11y-setup-progress {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid #bcd3e1;
  border-radius: 15px;
  background: #f7fbfe;
  color: #35586d;
}

.a11y-setup-progress > span {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dbe7ee;
}

.a11y-setup-progress > span i {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: #08765b;
}

.a11y-setup-progress strong { color: #173a51; font-size: .84rem; }
.a11y-setup-progress small { font-size: .75rem; }

.a11y-setup-fieldset {
  margin: 0;
  padding: 22px;
  border: 1px solid #cad9e2;
  border-radius: 20px;
  background: #fff;
}

.a11y-setup-fieldset legend {
  padding: 0 6px;
  color: #173a51;
  font-size: 1.12rem;
  font-weight: 900;
}

.a11y-setup-fieldset > p {
  margin: 0 0 13px;
  color: #577080;
  font-size: .86rem;
}

.a11y-setup-needs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.a11y-setup-needs button {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 12px;
  min-height: 122px;
  padding: 16px;
  border: 2px solid #c9d7e0;
  border-radius: 17px;
  background: #fff;
  color: #173a51;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.a11y-setup-needs button > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: #e9f4fb;
  color: #075f9b;
  font-size: 1rem;
  font-weight: 900;
}

.a11y-setup-needs button strong {
  align-self: end;
  font-size: .9rem;
  line-height: 1.3;
}

.a11y-setup-needs button small {
  align-self: start;
  color: #5b7382;
  font-size: .76rem;
  line-height: 1.4;
}

.a11y-setup-needs button > i {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #b5c6d1;
  border-radius: 50%;
  color: transparent;
  font-style: normal;
}

.a11y-setup-needs button.active {
  border-color: #08765b;
  background: #effaf6;
  box-shadow: 0 0 0 3px rgba(8, 118, 91, .11);
}

.a11y-setup-needs button.active > i {
  border-color: #08765b;
  background: #08765b;
  color: #fff;
}

.a11y-setup-recommendation {
  display: grid;
  gap: 13px;
  padding: 22px;
  border: 1px solid #a8cfe3;
  border-radius: 20px;
  background:
    radial-gradient(circle at 94% 8%, rgba(66, 176, 226, .18), transparent 32%),
    #f4fbff;
}

.a11y-setup-recommendation > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a11y-setup-recommendation > div:first-child > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #075f9b;
  color: #fff;
}

.a11y-setup-recommendation p,
.a11y-setup-recommendation h4 {
  margin: 0;
}

.a11y-setup-recommendation > div p {
  color: #577080;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.a11y-setup-recommendation h4 {
  color: #173a51;
  font-size: 1.06rem;
}

.a11y-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 4px;
}

.a11y-live-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid #bed3df;
  border-radius: 18px;
  background: #fff;
}

.a11y-live-preview > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a11y-live-preview > div:first-child > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #075f9b;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.a11y-live-preview p,
.a11y-live-preview strong,
.a11y-live-preview small {
  display: block;
  margin: 0;
}

.a11y-live-preview small { margin-top: 3px; color: #5b7382; }
.a11y-live-preview a { color: #075f9b; font-weight: 800; }
.a11y-live-preview button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 11px;
  background: #075f9b;
  color: #fff;
  font: inherit;
  font-weight: 850;
}

.a11y-reader-controller {
  margin: 0;
  padding: 21px;
  border-radius: 19px;
  background:
    radial-gradient(circle at 95% 8%, rgba(92, 190, 237, .18), transparent 32%),
    #f4faff;
}

.a11y-speech-transport {
  grid-template-columns: 48px 1.15fr 1fr 48px 1fr;
}

.a11y-speech-transport button[aria-label] {
  padding: 0;
  font-size: 1.15rem;
}

.a11y-reading-theme-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.a11y-reading-theme-options button {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 10px;
  border: 2px solid #c5d3dc;
  border-radius: 13px;
  background: #fff;
  color: #26495e;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}

.a11y-reading-theme-options i {
  display: block;
  height: 36px;
  border: 1px solid #9db0bd;
  border-radius: 8px;
}

.a11y-reading-theme-options i.standard { background: #fff; }
.a11y-reading-theme-options i.cream { background: #fff4d6; }
.a11y-reading-theme-options i.blue { background: #e8f4fb; }
.a11y-reading-theme-options i.gray { background: #edf0f2; }

.a11y-reading-theme-options button.active {
  border-color: #075f9b;
  background: #edf7ff;
  color: #07507f;
}

.a11y-guide-size {
  margin: 0;
  padding: 17px 20px;
  border: 1px solid #c9d8e1;
  border-radius: 16px;
  background: #fff;
}

.a11y-guide-size legend {
  padding: 0 5px;
  color: #35586d;
  font-size: .84rem;
  font-weight: 850;
}

.a11y-guide-size > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.a11y-guide-size button {
  min-height: 44px;
  border: 1px solid #aebfca;
  border-radius: 11px;
  background: #fff;
  color: #294d63;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
}

.a11y-guide-size button.active {
  border-color: #075f9b;
  background: #075f9b;
  color: #fff;
}

.a11y-baseline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.a11y-baseline-grid > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 3px 9px;
  min-height: 106px;
  padding: 15px;
  border: 1px solid #b9d9cd;
  border-radius: 15px;
  background: #f1faf7;
}

.a11y-baseline-grid span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #08765b;
  color: #fff;
  font-weight: 900;
}

.a11y-baseline-grid strong {
  align-self: end;
  color: #174b3d;
  font-size: .84rem;
}

.a11y-baseline-grid small {
  align-self: start;
  color: #4f7067;
  font-size: .72rem;
  line-height: 1.35;
}

.a11y-keyboard-test {
  padding: 20px;
  border: 1px solid #bdcfe0;
  border-radius: 18px;
  background: #f5f9ff;
}

.a11y-keyboard-test > div:first-child {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
}

.a11y-keyboard-test > div:first-child > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #3d58a2;
  color: #fff;
}

.a11y-keyboard-test h4,
.a11y-keyboard-test p {
  margin: 0;
}

.a11y-keyboard-test p {
  margin-top: 4px;
  color: #577080;
  font-size: .82rem;
  line-height: 1.45;
}

.a11y-keyboard-test-zone {
  display: grid;
  grid-template-columns: auto auto minmax(140px, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 14px;
  border: 1px dashed #9eb5c5;
  border-radius: 13px;
  background: #fff;
}

.a11y-keyboard-test-zone :is(button, a, input) {
  min-height: 44px;
  border-radius: 10px;
}

.a11y-message-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  padding: 19px;
  border: 3px solid #15805f;
  border-radius: 17px;
  background: #effaf6;
  color: #163d32;
}

.a11y-message-preview > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #08765b;
  color: #fff;
  font-weight: 900;
}

.a11y-message-preview p {
  margin: 4px 0 0;
  font-size: .82rem;
  line-height: 1.45;
}

.a11y-assistive-status {
  display: grid;
  gap: 10px;
}

.a11y-assistive-status article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #c8d7e0;
  border-radius: 15px;
  background: #fff;
}

.a11y-assistive-status article > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #e1f6ef;
  color: #08765b;
  font-weight: 900;
}

.a11y-assistive-status strong,
.a11y-assistive-status p {
  margin: 0;
}

.a11y-assistive-status p {
  margin-top: 3px;
  color: #5a7281;
  font-size: .78rem;
  line-height: 1.4;
}

.a11y-assistive-status em {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e1f6ef;
  color: #075742;
  font-size: .7rem;
  font-style: normal;
  font-weight: 850;
}

.a11y-shortcuts-heading {
  margin: 2px 0 -7px;
  color: #173a51;
}

.accessibility-command-actions {
  padding: 14px 24px max(16px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  box-shadow: 0 -10px 24px rgba(15, 38, 53, .07);
}

/* Dodatkowe preferencje użytkownika */
html.a11y-showBorders :where(
  .content button, .content input, .content select, .content textarea,
  .content [role="button"], .content .panel, .content .card,
  .modal button, .modal input, .modal select, .modal textarea,
  .messenger-dock button, .messenger-dock input
) {
  border-width: 2px !important;
  border-style: solid !important;
  border-color: currentColor !important;
}

html.a11y-highlightHeadings .content :is(h1, h2, h3),
html.a11y-highlightHeadings .modal-body :is(h2, h3, h4),
html.a11y-highlightHeadings .messenger-dock-body :is(h2, h3, h4) {
  padding: .28em .5em !important;
  border-left: .28em solid #075f9b !important;
  border-radius: .25em !important;
  background: rgba(7, 95, 155, .09) !important;
}

html.a11y-reduceWhitePoint::after {
  content: "";
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  pointer-events: none;
  background: rgba(13, 22, 28, .13);
}

:is(html.a11y-contrast, html.a11y-darkContrast).a11y-reduceWhitePoint::after {
  display: none;
}

html.a11y-pauseAnimatedMedia *,
html.a11y-pauseAnimatedMedia *::before,
html.a11y-pauseAnimatedMedia *::after {
  animation-play-state: paused !important;
  scroll-behavior: auto !important;
}

html[data-a11y-reading-theme="cream"] :where(.content, .modal-body, .reader-surface) {
  background-color: #fff4d6 !important;
  color: #2d261b !important;
}

html[data-a11y-reading-theme="blue"] :where(.content, .modal-body, .reader-surface) {
  background-color: #e8f4fb !important;
  color: #17374a !important;
}

html[data-a11y-reading-theme="gray"] :where(.content, .modal-body, .reader-surface) {
  background-color: #edf0f2 !important;
  color: #202c33 !important;
}

.a11y-reading-guide {
  top: calc(var(--a11y-reading-y) - (var(--a11y-guide-lines, 1) * 25px));
  height: calc(var(--a11y-guide-lines, 1) * 50px);
}

.a11y-screen-mask {
  top: calc(var(--a11y-reading-y) - (var(--a11y-guide-lines, 1) * 29px));
  height: calc(var(--a11y-guide-lines, 1) * 58px);
}

body.a11y-panel-open .a11y-reading-guide,
body.a11y-panel-open .a11y-screen-mask {
  right: min(760px, 100vw);
}

.a11y-speaking-current {
  position: relative;
  z-index: 1;
  border-radius: 6px !important;
  outline: 4px solid #ffbf47 !important;
  outline-offset: 3px !important;
  background: #fff3b0 !important;
  color: #111 !important;
}

:is(html.a11y-contrast, html.a11y-darkContrast) :where(
  .accessibility-command-center .accessibility-v4-section,
  .a11y-command-hero, .a11y-command-summary, .a11y-setup-fieldset,
  .a11y-setup-recommendation, .a11y-live-preview, .a11y-baseline-grid > div,
  .a11y-keyboard-test, .a11y-message-preview, .a11y-assistive-status article,
  .a11y-reader-controller, .a11y-guide-size
) {
  background: var(--app-surface) !important;
  color: var(--app-text) !important;
  border-color: var(--app-border) !important;
  box-shadow: none !important;
}

:is(html.a11y-contrast, html.a11y-darkContrast) .accessibility-command-center :where(p, small) {
  color: var(--app-muted) !important;
}

:is(html.a11y-contrast, html.a11y-darkContrast) :where(
  .a11y-setup-needs button.active, .a11y-reading-theme-options button.active,
  .a11y-guide-size button.active
) {
  border-color: var(--app-primary) !important;
  background: var(--app-selected-bg) !important;
  color: var(--app-text) !important;
}

@media (max-width: 720px) {
  .accessibility-command-head {
    min-height: 150px;
    padding: 20px 20px 18px;
  }

  .accessibility-command-center .accessibility-panel-body {
    padding: 16px 14px 24px;
  }

  .a11y-command-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 21px;
  }

  .a11y-command-hero-visual {
    display: none;
  }

  .a11y-profile-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a11y-profile-ribbon button {
    min-height: 148px;
  }

  .a11y-profile-ribbon button:last-child {
    grid-column: 1 / -1;
    min-height: 128px;
  }

  .a11y-quick-setting-grid,
  .a11y-category-grid,
  .a11y-setup-needs,
  .a11y-baseline-grid {
    grid-template-columns: 1fr;
  }

  .a11y-category-grid .accessibility-subview-card:last-child {
    grid-column: auto;
  }

  .a11y-quick-setting-grid .accessibility-setting-row {
    min-height: 94px;
  }

  .a11y-speech-transport {
    grid-template-columns: 44px 1fr 1fr 44px;
  }

  .a11y-speech-transport [data-a11y-speech="stop"] {
    grid-column: 1 / -1;
  }

  .a11y-live-preview {
    grid-template-columns: 1fr;
  }

  .a11y-keyboard-test-zone {
    grid-template-columns: 1fr;
  }

  .a11y-setup-progress {
    grid-template-columns: 1fr auto;
  }

  .a11y-setup-progress > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .accessibility-command-head p {
    display: block;
  }

  .accessibility-command-center .accessibility-v4-section,
  .accessibility-command-center .accessibility-subview-head,
  .accessibility-command-center .accessibility-subview-group,
  .a11y-setup-fieldset,
  .a11y-setup-recommendation {
    padding: 17px;
    border-radius: 16px;
  }

  .a11y-profile-ribbon,
  .a11y-reading-theme-options {
    grid-template-columns: 1fr;
  }

  .a11y-profile-ribbon button,
  .a11y-profile-ribbon button:last-child {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 108px;
  }

  .a11y-profile-ribbon .accessibility-profile-icon {
    grid-row: 1 / 3;
  }

  .a11y-profile-ribbon .accessibility-profile-copy {
    margin-top: 0;
  }

  .a11y-profile-ribbon .accessibility-profile-action {
    grid-column: 2;
    margin-top: 2px;
  }

  .a11y-speech-transport,
  .accessibility-speech-rate > div,
  .a11y-guide-size > div {
    grid-template-columns: 1fr;
  }

  .a11y-speech-transport [data-a11y-speech="stop"] {
    grid-column: auto;
  }

  .a11y-setup-actions {
    flex-direction: column-reverse;
  }

  .a11y-setup-actions .btn {
    width: 100%;
  }

  .a11y-assistive-status article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .a11y-assistive-status em {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a11y-command-hero-visual {
    transform: none;
  }
}

@media (forced-colors: active) {
  .a11y-command-hero,
  .accessibility-command-center .accessibility-v4-section,
  .a11y-setup-needs button,
  .a11y-reading-theme-options button,
  .a11y-assistive-status article {
    border: 2px solid CanvasText !important;
  }

  :where(
    .a11y-setup-needs button.active,
    .a11y-reading-theme-options button.active,
    .a11y-guide-size button.active
  ) {
    border: 3px solid Highlight !important;
  }
}
