:root {
  --tag-content-scale: 1;
  --tag-font-scale: 1;
  --tag-line-height: 1.5;
  --tag-letter-spacing: 0px;
}

.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;
}

.a11y-skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100002;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  background: #fff;
  color: #111;
  font: 700 14px/1.2 Arial, sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transition: top .18s ease;
}

.a11y-skip-link:focus { top: 0; }

.djacc-toolbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99999;
  height: 40px;
  overflow: hidden;
  border-top: 1px solid #353536;
  background: #2f2f2f;
  color: #fff;
  font: 400 14px/40px Roboto, Arial, sans-serif;
  box-shadow: 0 -2px 12px rgba(0,0,0,.12);
}

.djacc__toggle,
.djacc__backdrop,
.djacc__panel-head { display: none; }

.djacc__panel {
  display: flex;
  justify-content: center;
  min-width: max-content;
  height: 40px;
  margin: 0 auto;
}

.djacc__list,
.djacc__group {
  display: flex;
  height: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.djacc__scale-set {
  display: flex;
  height: 40px;
  border-left: 1px solid #474747;
}

.djacc__scale-identity {
  display: flex;
  align-items: center;
  gap: 5px;
  width: auto;
  min-width: 58px;
  padding: 0 7px;
  color: #d9d9d9;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.djacc__scale-identity svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.djacc__group + .djacc__group { border-left: 1px solid #474747; }

.djacc__label {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #d6d6d6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.djacc__btn {
  position: relative;
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #353536;
  border-radius: 0;
  background: #2f2f2f;
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: background-color .15s ease, color .15s ease;
}

.djacc__btn:hover,
.djacc__btn:focus-visible,
.djacc__btn[aria-pressed="true"] {
  outline: 0;
  background: #087f79;
  color: #fff;
}

.djacc__btn:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
.djacc__btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.djacc__btn--step { width: 31px; min-width: 31px; padding: 0 6px; }
.djacc__btn--step svg { width: 15px; height: 15px; }
.djacc__btn--text { display: flex; width: auto; min-width: 75px; padding: 0 13px; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.djacc__btn--text svg { flex: 0 0 auto; }

.djacc__btn::before {
  content: attr(data-tooltip);
  position: fixed;
  bottom: 48px;
  left: var(--tip-left, 50%);
  z-index: 100003;
  width: max-content;
  max-width: 220px;
  padding: 6px 9px;
  transform: translateX(-50%) translateY(4px);
  border-radius: 4px;
  background: #111;
  color: #fff;
  font: 600 12px/1.25 Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}

.djacc__btn:hover::before,
.djacc__btn:focus-visible::before { opacity: 1; transform: translateX(-50%) translateY(0); }

body { padding-bottom: 40px; }
body.a11y-highlight-links a { outline: 3px solid #ffb000 !important; outline-offset: 3px !important; text-decoration: underline !important; }
body.a11y-highlight-headings :is(h1,h2,h3,h4,h5,h6) { outline: 3px solid #0ba7a0 !important; outline-offset: 4px !important; }
body.a11y-content-scale > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { zoom: var(--tag-content-scale); }
body.a11y-font-scale :is(main,header,footer,nav) { font-size: calc(1em * var(--tag-font-scale)); }
body.a11y-typography :is(main,header,footer,nav) { line-height: var(--tag-line-height) !important; letter-spacing: var(--tag-letter-spacing) !important; }

body[data-a11y-filter="invert"] > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { filter: invert(1) hue-rotate(180deg); }
body[data-a11y-filter="mono"] > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { filter: grayscale(1); }
body[data-a11y-filter="dark"] > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { filter: contrast(1.22) brightness(.68); }
body[data-a11y-filter="light"] > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { filter: contrast(1.1) brightness(1.16); }
body[data-a11y-filter="low"] > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { filter: saturate(.35); }
body[data-a11y-filter="high"] > :not(.djacc-toolbar):not(.w3g-search):not(.a11y-reader):not(.a11y-skip-link) { filter: saturate(1.85); }

.w3g-search {
  position: fixed;
  inset: 0 0 40px;
  z-index: 100000;
  display: grid;
  place-items: start center;
  padding: clamp(72px, 12vh, 128px) 20px 24px;
  background: rgba(13,15,17,.72);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.w3g-search.is-open { opacity: 1; visibility: visible; }
.w3g-search__dialog { width: min(680px,100%); max-height: calc(88vh - 40px); overflow: auto; border-radius: 18px; background: #fff; color: #151719; box-shadow: 0 26px 80px rgba(0,0,0,.3); }
.w3g-search__head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid #e3e5e7; }
.w3g-search__input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: #151719; font: 600 clamp(18px,3vw,26px)/1.2 Manrope,Arial,sans-serif; }
.w3g-search__close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #eff1f2; color: #151719; cursor: pointer; font-size: 24px; }
.w3g-search__body { padding: 16px 18px 20px; }
.w3g-search__status { margin: 0 0 10px; color: #62666b; font: 600 13px/1.4 Manrope,Arial,sans-serif; }
.w3g-search__results { display: grid; gap: 8px; }
.w3g-search__result { display: block; padding: 12px 14px; border-radius: 10px; background: #f3f5f5; color: #17191b; text-decoration: none; font: 600 14px/1.45 Manrope,Arial,sans-serif; }
.w3g-search__result:hover,.w3g-search__result:focus-visible { outline: 2px solid #087f79; background: #e9f4f3; }

.a11y-reader {
  position: fixed;
  inset: 0 0 40px;
  z-index: 100001;
  display: none;
  overflow: auto;
  padding: clamp(54px,8vw,100px) max(24px,calc((100vw - 780px)/2));
  background: #fbfaf5;
  color: #181818;
  font: 400 19px/1.8 Georgia,serif;
}
.a11y-reader.is-open { display: block; }
.a11y-reader h1 { margin: 0 60px 30px 0; font: 700 clamp(34px,6vw,58px)/1.05 Manrope,Arial,sans-serif; }
.a11y-reader__close { position: fixed; top: 18px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #222; color: #fff; cursor: pointer; font-size: 25px; }

@media (max-width: 1180px) {
  body { padding-bottom: 0; }
  .djacc-toolbar {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: auto;
    width: 58px;
    height: 58px;
    overflow: visible;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }
  .djacc__toggle {
    position: relative;
    z-index: 3;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: #087f79;
    color: #fff;
    box-shadow: 0 12px 36px rgba(0,0,0,.3);
    cursor: pointer;
  }
  .djacc__toggle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .djacc__toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .djacc__backdrop { position: fixed; inset: 0; z-index: 1; background: rgba(8,10,12,.56); backdrop-filter: blur(7px); }
  .djacc__panel {
    position: fixed;
    right: 12px;
    bottom: 84px;
    left: 12px;
    z-index: 2;
    display: none;
    width: auto;
    min-width: 0;
    max-height: calc(100dvh - 104px);
    height: auto;
    overflow: auto;
    margin: 0;
    border: 1px solid #4a4a4a;
    border-radius: 20px;
    background: #2f2f2f;
    box-shadow: 0 24px 80px rgba(0,0,0,.42);
  }
  .djacc.is-open .djacc__backdrop,
  .djacc.is-open .djacc__panel { display: block; }
  .djacc__panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid #474747; font: 700 15px/1.2 Arial,sans-serif; }
  .djacc__panel-close { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #424242; color: #fff; cursor: pointer; }
  .djacc__panel-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .djacc__list { display: grid; height: auto; padding: 8px 12px 14px; }
  .djacc__group { display: flex; flex-wrap: wrap; height: auto; padding: 10px 0; border-bottom: 1px solid #474747; }
  .djacc__group + .djacc__group { border-left: 0; }
  .djacc__group:last-child { border-bottom: 0; }
  .djacc__label { width: 100%; height: auto; padding: 0 2px 8px; color: #cfcfcf; font-size: 11px; line-height: 1; }
  .djacc__btn { flex: 1 1 44px; width: auto; min-width: 42px; border: 1px solid #4f4f4f; border-radius: 9px; }
  .djacc__btn + .djacc__btn { margin-left: 5px; }
  .djacc__group--scaling { display: grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap: 8px; }
  .djacc__group--scaling .djacc__label { grid-column: 1/-1; }
  .djacc__scale-set { display: grid; grid-template-columns:1fr 36px 36px; height: 46px; overflow: hidden; border: 1px solid #505050; border-radius: 10px; }
  .djacc__scale-identity { min-width: 0; padding: 0 8px; }
  .djacc__scale-identity span { overflow: hidden; text-overflow: ellipsis; }
  .djacc__scale-set .djacc__btn { width: 36px; min-width: 36px; height: 44px; margin: 0; border-width: 0 0 0 1px; border-radius: 0; }
  .djacc__group--reset { display: block; }
  .djacc__btn--text { width: 100%; height: 44px; }
  .djacc__btn::before { display: none; }
  .w3g-search,.a11y-reader { bottom: 0; }
}

@media (max-width: 460px) {
  .djacc__group--scaling { grid-template-columns:1fr; }
  .djacc__panel { right: 8px; bottom: 78px; left: 8px; max-height: calc(100dvh - 94px); }
  .djacc-toolbar { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .djacc__btn,.w3g-search,.a11y-skip-link { transition: none; }
}
