/* Global accessibility controls for SvetoPravoslavie.org */
:root{
  --a11y-focus:#fff4a8;
  --a11y-panel:#fffaf0;
  --a11y-ink:#25170f;
  --a11y-wine:#5b0708;
  --a11y-gold:#d19a29;
}

.skip-link{
  position:fixed;
  left:12px;
  top:10px;
  z-index:10020;
  transform:translateY(-180%);
  padding:10px 14px;
  border:2px solid var(--a11y-gold);
  border-radius:8px;
  background:#fffaf0;
  color:#32190e;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 4px 18px rgba(0,0,0,.28);
}
.skip-link:focus{transform:none}

.site-tools{
  position:absolute;
  z-index:40;
  top:14px;
  right:14px;
  display:flex;
  align-items:center;
  gap:7px;
  font-family:Arial,Helvetica,sans-serif;
}
.site-tools button,
.site-tools a{
  font:inherit;
}
.language-switcher{position:relative}
.site-tool-button{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:7px 10px;
  border:1px solid #d5a13e;
  border-radius:10px;
  background:linear-gradient(180deg,#741011,#470506);
  color:#fff1ce;
  box-shadow:0 3px 10px rgba(0,0,0,.34);
  font-weight:800;
  line-height:1;
  cursor:pointer;
}
.site-tool-button:hover,
.site-tool-button:focus-visible{
  background:linear-gradient(180deg,#8b1717,#570708);
  outline:3px solid rgba(255,244,168,.88);
  outline-offset:2px;
}
.site-tool-button .tool-label{font-size:.82rem}
.language-menu{
  position:absolute;
  top:48px;
  right:0;
  width:210px;
  margin:0;
  padding:7px;
  border:2px solid #b77b1e;
  border-radius:12px;
  background:#fff8e8;
  box-shadow:0 10px 30px rgba(0,0,0,.34);
}
.language-menu[hidden]{display:none}
.language-menu a,
.language-menu button{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#2f1d12;
  text-decoration:none;
  text-align:left;
  cursor:pointer;
}
.language-menu a:hover,
.language-menu button:hover,
.language-menu a:focus-visible,
.language-menu button:focus-visible{
  background:#f0dfb9;
  outline:2px solid #7b2b18;
}
.language-menu [aria-current="true"]{
  background:#f5e7c6;
  font-weight:800;
}
.language-menu small{
  color:#755d48;
  font-size:.72rem;
  font-weight:700;
}

.a11y-dialog{
  width:min(560px,calc(100vw - 28px));
  max-height:min(760px,calc(100vh - 28px));
  margin:auto;
  padding:0;
  border:3px double #b77b1e;
  border-radius:16px;
  background:var(--a11y-panel);
  color:var(--a11y-ink);
  box-shadow:0 18px 55px rgba(0,0,0,.48);
  overflow:auto;
}
.a11y-dialog::backdrop{background:rgba(12,4,2,.66)}
.a11y-dialog-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid rgba(122,79,22,.28);
  background:linear-gradient(180deg,#6e0a0b,#4a0506);
  color:#fff0ca;
}
.a11y-dialog-header h2{margin:0;font-size:1.32rem;color:inherit}
.a11y-dialog-close{
  width:40px;
  height:40px;
  border:1px solid #d7a94b;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:#fff7dd;
  font-size:1.65rem;
  line-height:1;
  cursor:pointer;
}
.a11y-dialog-body{padding:18px}
.a11y-intro{margin:0 0 16px;line-height:1.55}
.a11y-group{
  margin:0 0 18px;
  padding:0 0 18px;
  border:0;
  border-bottom:1px solid rgba(122,79,22,.22);
}
.a11y-group:last-of-type{border-bottom:0}
.a11y-group legend{
  margin:0 0 10px;
  padding:0;
  color:#691413;
  font-size:1.05rem;
  font-weight:800;
}
.a11y-font-controls{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.a11y-option{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  width:100%;
  margin:7px 0 0;
  padding:9px 12px;
  border:1px solid #ad7b35;
  border-radius:9px;
  background:#fffdf7;
  color:#2f1e13;
  font:700 .96rem/1.25 Arial,Helvetica,sans-serif;
  text-align:left;
  cursor:pointer;
}
.a11y-option:hover,
.a11y-option:focus-visible{
  background:#f4e5c3;
  outline:3px solid rgba(91,7,8,.28);
  outline-offset:1px;
}
.a11y-option[aria-pressed="true"]{
  border-color:#641011;
  background:#6b1011;
  color:#fff6dd;
}
.a11y-font-controls .a11y-option{justify-content:center;font-size:1.08rem}
.a11y-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}
.a11y-reset{
  min-height:44px;
  padding:9px 14px;
  border:1px solid #7a311e;
  border-radius:9px;
  background:#fff8e8;
  color:#5f1713;
  font-weight:800;
  cursor:pointer;
}
.a11y-status{
  min-height:1.4em;
  margin:12px 0 0;
  color:#5b381d;
  font-weight:700;
}
.a11y-note{
  margin:14px 0 0;
  padding:12px;
  border-left:4px solid #8a411a;
  background:#f8edd5;
  line-height:1.5;
}

/* Persistent user modes */
html.a11y-font-110{font-size:110%}
html.a11y-font-125{font-size:125%}
html.a11y-font-150{font-size:150%}

html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea{
  font-family:Arial,Verdana,Tahoma,sans-serif!important;
}
html.a11y-readable .content p,
html.a11y-readable .content li,
html.a11y-readable .content blockquote,
html.a11y-readable .content td,
html.a11y-readable .content th{
  line-height:1.75!important;
  letter-spacing:.035em!important;
  word-spacing:.11em!important;
}
html.a11y-readable .content p,
html.a11y-readable .content li{
  max-width:75ch;
}
html.a11y-readable .content p{text-align:left!important}

html.a11y-spacing .content p,
html.a11y-spacing .content li,
html.a11y-spacing .content td,
html.a11y-spacing .content th{
  line-height:1.8!important;
  letter-spacing:.12em!important;
  word-spacing:.16em!important;
}
html.a11y-links a{
  text-decoration:underline!important;
  text-decoration-thickness:2px!important;
  text-underline-offset:3px!important;
}
html.a11y-large-cursor body,
html.a11y-large-cursor a,
html.a11y-large-cursor button,
html.a11y-large-cursor input,
html.a11y-large-cursor select,
html.a11y-large-cursor textarea{
  cursor:pointer!important;
}
html.a11y-large-cursor body{cursor:default!important}

html.a11y-simple body:before{display:none!important}
html.a11y-simple body{background:#efe6d2!important}
html.a11y-simple .site-shell,
html.a11y-simple .content,
html.a11y-simple .temple-target-board,
html.a11y-simple .temple-target-left,
html.a11y-simple .temple-target-right{
  background:#fffaf0!important;
  background-image:none!important;
  box-shadow:none!important;
}
html.a11y-simple .hero-art{filter:brightness(.6) saturate(.65)!important}

html.a11y-contrast{
  color-scheme:dark;
}
html.a11y-contrast body,
html.a11y-contrast body:before,
html.a11y-contrast .site-shell,
html.a11y-contrast .content,
html.a11y-contrast .temple-target-board,
html.a11y-contrast .temple-target-left,
html.a11y-contrast .temple-target-right,
html.a11y-contrast .card,
html.a11y-contrast article,
html.a11y-contrast section{
  background:#000!important;
  background-image:none!important;
  color:#fff!important;
}
html.a11y-contrast .hero-banner,
html.a11y-contrast .hero-art,
html.a11y-contrast .app-nav,
html.a11y-contrast .footer{
  background:#000!important;
  background-image:none!important;
  color:#fff!important;
  border-color:#fff!important;
}
html.a11y-contrast h1,
html.a11y-contrast h2,
html.a11y-contrast h3,
html.a11y-contrast h4,
html.a11y-contrast p,
html.a11y-contrast li,
html.a11y-contrast span,
html.a11y-contrast strong,
html.a11y-contrast label,
html.a11y-contrast td,
html.a11y-contrast th{
  color:#fff!important;
}
html.a11y-contrast a{
  color:#ffe100!important;
  text-decoration:underline!important;
}
html.a11y-contrast button,
html.a11y-contrast input,
html.a11y-contrast select,
html.a11y-contrast textarea{
  background:#000!important;
  color:#fff!important;
  border:2px solid #fff!important;
}

html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after{
  scroll-behavior:auto!important;
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.001ms!important;
}

:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:3px solid var(--a11y-focus)!important;
  outline-offset:3px!important;
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}

@media (max-width:760px){
  .site-tools{top:8px;right:8px;gap:5px}
  .site-tool-button{min-height:38px;padding:6px 8px}
  .site-tool-button .tool-label{display:none}
  .language-menu{right:0;width:190px}
  .a11y-dialog-body{padding:14px}
}
