.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999999;
  background: #000;
  color: #fff;
  padding: 1rem;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
}


/* Podstawowe style widgetu accessibility-toolbar */

/* Desktop: fixed side widget (DOM lives inside navbar; position:fixed pulls it out of flow) */
#acc-toolbar {
  position: fixed;
  top: 25vh;
  right: 0;
  z-index: 99999;
  font-family: "Arial", sans-serif;
  user-select: none;
  width: 3.5rem;
  transition: width 0.3s ease;
  box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.15);
  background: #fff;
  border-radius: 8px 0 0 8px;
  border: 1px solid #fff;
}

#acc-toolbar.expanded {
  width: 320px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.acc-toolbar-toggle {
  display: flex;
  width: 100%;
  height: 3.5rem;
  background-color: #001236;
  color: #fff;
  border-radius: 8px 0 0 0;
}

.acc-toolbar-toggle-link {
  appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 100%;
  min-height: 3.5rem;
  text-decoration: none;
  user-select: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px 0 0 0;
  box-sizing: border-box;
}

#acc-toolbar:not(.expanded) .acc-toolbar-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#acc-toolbar.expanded .acc-toolbar-toggle-link {
  justify-content: flex-start;
  padding: 0 1rem;
}

#acc-toolbar.expanded .acc-toolbar-toggle-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
}

.acc-toolbar-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acc-toolbar-toggle-icon img,
.acc-toolbar-toggle-link img {
  width: 1.8rem;
  height: 1.8rem;
  display: block;
  object-fit: contain;
}

.acc-toolbar-toggle-link:hover,
.acc-toolbar-toggle-link:focus {
  background-color: #0a2a5c;
  outline: none;
}

.acc-toolbar-toggle-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

/* Panel z opcjami (ukryty domyślnie) */
.acc-toolbar-overlay {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: 80vh;
}

/* Ukrywamy panel gdy navbar nie jest rozwinięty */
#acc-toolbar:not(.expanded) .acc-toolbar-overlay {
  display: none;
}

.acc-toolbar-panel-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #dde3ea;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.acc-toolbar-close {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin: 0;
  border: 1px solid #001236;
  border-radius: 0.4rem;
  background: #001236;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.acc-toolbar-close span[aria-hidden="true"] {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}

.acc-toolbar-close:hover,
.acc-toolbar-close:focus {
  background: #0a2a5c;
  outline: 2px solid #001236;
  outline-offset: 2px;
}

/* Tytuł */
.acc-toolbar-title {
  font-weight: 700;
  font-size: 1.2rem;
  color: #222;
  margin: 0 0 0.5rem 0;
  user-select: none;
}

/* Lista przycisków */
.acc-toolbar-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Element listy */
.acc-toolbar-item {
  flex: 1 1 50%;
  max-width: 100%;
}

/* Link/przycisk */
.acc-toolbar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #001236;
  color: white;
  padding: 0.7rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.25s;
}

/* Aktywne przyciski */
.acc-toolbar-link[aria-pressed="true"] {
  background-color: #001236;
}

/* Hover i focus */
.acc-toolbar-link:hover,
.acc-toolbar-link:focus {
  background-color: #001236;

}

/* Ikona SVG */
.acc-toolbar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}

/* Tekst przycisku */
.acc-toolbar-text {
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

/* Druga lista (linki mapy i kontaktu) */
.acc-toolbar-items.acc-links {
  margin-top: 1rem;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}




/* Usuń outline: none z hover i focus */
.acc-toolbar-link:hover {
  background-color: #001236;
}

/* Dodaj mocny czarny outline na focus */
.acc-toolbar-link:focus {
  outline: 3px solid black;
  outline-offset: 2px;
  background-color: #001236; /* opcjonalnie podświetl tło również */
}

.acc-toolbar-toggle-link:focus {
  outline: 3px solid #fff;
  outline-offset: -3px;
}



/*
 * Accessibility modes
 * -------------------
 * Negative contrast: invert() on body DIRECT CHILDREN (not the toolbar).
 * That flips every light section/card/gradient without fighting site.css
 * !important rules, and keeps position:fixed toolbar working.
 *
 * High contrast: light theme + forced dark text/borders on page chrome.
 */

/*
 * Filters must NOT hit #acc-toolbar / backdrops (filter creates a containing
 * block and breaks position:fixed drawers). Toolbar is a direct child of body.
 */
html body.acc-grayscale:not(.acc-negative-contrast) > *:not(#acc-toolbar):not(.acc-backdrop):not(.nav-drawer-backdrop):not(script):not(style) {
  filter: grayscale(100%) !important;
}

/* ========== NEGATIVE CONTRAST ========== */
html body.acc-negative-contrast {
  background: #000 !important;
  background-color: #000 !important;
  color: #fff !important;
}

html body.acc-negative-contrast > *:not(#acc-toolbar):not(.acc-backdrop):not(.nav-drawer-backdrop):not(script):not(style) {
  filter: invert(1) hue-rotate(180deg) !important;
}

html body.acc-negative-contrast.acc-grayscale > *:not(#acc-toolbar):not(.acc-backdrop):not(.nav-drawer-backdrop):not(script):not(style) {
  filter: invert(1) hue-rotate(180deg) grayscale(100%) !important;
}

html body.acc-negative-contrast.acc-links-underline > *:not(#acc-toolbar) a {
  text-decoration: underline !important;
}

/* ========== HIGH CONTRAST (light) ========== */
html body.acc-high-contrast {
  background: #fff !important;
  background-color: #fff !important;
  color: #000 !important;
}

html body.acc-high-contrast .navbar,
html body.acc-high-contrast .navbar.bg-white,
html body.acc-high-contrast #main-content,
html body.acc-high-contrast .site-footer,
html body.acc-high-contrast .site-institutions,
html body.acc-high-contrast .hero-main,
html body.acc-high-contrast .hero-main__veil,
html body.acc-high-contrast .home-section,
html body.acc-high-contrast .section-wrap,
html body.acc-high-contrast main,
html body.acc-high-contrast .card,
html body.acc-high-contrast .card-soft,
html body.acc-high-contrast .resource-card,
html body.acc-high-contrast .resource-card__body,
html body.acc-high-contrast .resource-card__preview,
html body.acc-high-contrast .home-empty-panel,
html body.acc-high-contrast .editorial-island,
html body.acc-high-contrast .modal-content,
html body.acc-high-contrast .dropdown-menu,
html body.acc-high-contrast .list-group-item,
html body.acc-high-contrast .form-control,
html body.acc-high-contrast .form-select,
html body.acc-high-contrast .alert,
html body.acc-high-contrast .person-card,
html body.acc-high-contrast .news-card,
html body.acc-high-contrast .invitation-panel {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  color: #000 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html body.acc-high-contrast .navbar,
html body.acc-high-contrast .resource-card,
html body.acc-high-contrast .card-soft,
html body.acc-high-contrast .home-empty-panel,
html body.acc-high-contrast .person-card,
html body.acc-high-contrast .news-card,
html body.acc-high-contrast .btn,
html body.acc-high-contrast .btn-cta {
  border: 2px solid #000 !important;
}

html body.acc-high-contrast,
html body.acc-high-contrast #main-content,
html body.acc-high-contrast .navbar,
html body.acc-high-contrast .site-footer,
html body.acc-high-contrast .site-institutions {
  color: #000 !important;
}

html body.acc-high-contrast h1,
html body.acc-high-contrast h2,
html body.acc-high-contrast h3,
html body.acc-high-contrast h4,
html body.acc-high-contrast h5,
html body.acc-high-contrast h6,
html body.acc-high-contrast p,
html body.acc-high-contrast li,
html body.acc-high-contrast span,
html body.acc-high-contrast label,
html body.acc-high-contrast td,
html body.acc-high-contrast th,
html body.acc-high-contrast .text-muted,
html body.acc-high-contrast .text-secondary,
html body.acc-high-contrast .section-heading__title,
html body.acc-high-contrast .resource-card__title,
html body.acc-high-contrast .resource-card__blurb,
html body.acc-high-contrast .hero-title,
html body.acc-high-contrast .hero-subtitle {
  color: #000 !important;
  opacity: 1 !important;
}

html body.acc-high-contrast a:not(#acc-toolbar a),
html body.acc-high-contrast .nav-link,
html body.acc-high-contrast .site-footer a {
  color: #0000a8 !important;
  background: transparent !important;
  text-decoration: none !important;
}

html body.acc-high-contrast a:hover:not(#acc-toolbar a),
html body.acc-high-contrast a:focus:not(#acc-toolbar a) {
  color: #000 !important;
  text-decoration: underline !important;
}

html body.acc-high-contrast .btn,
html body.acc-high-contrast .btn-cta,
html body.acc-high-contrast .btn-igf-primary,
html body.acc-high-contrast .btn-igf-outline,
html body.acc-high-contrast .btn-primary,
html body.acc-high-contrast .btn-secondary,
html body.acc-high-contrast .btn-social {
  background: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  text-decoration: none !important;
}

html body.acc-high-contrast .btn:hover,
html body.acc-high-contrast .btn-cta:hover {
  background: #000 !important;
  color: #fff !important;
}

html body.acc-high-contrast .navbar-toggler {
  border: 2px solid #000 !important;
  background: #fff !important;
}

html body.acc-high-contrast .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  background-color: transparent !important;
}

/* Underline only when the dedicated tool is on (toolbar controls excluded). */
body.acc-links-underline a:not(#acc-toolbar a),
.page-wrapper.acc-links-underline a:not(#acc-toolbar a) {
  text-decoration: underline !important;
}

body.acc-readable-font,
.page-wrapper.acc-readable-font {
  font-family: "Arial Black", Arial, sans-serif !important;
}

body.acc-large-text,
.page-wrapper.acc-large-text {
  font-size: 1.25rem !important;
}

.acc-toolbar-policy a {
  color: inherit;
  text-decoration: underline;
}

/* Scrollbar dla paska, jeśli dużo opcji */
.acc-toolbar-overlay {
  scrollbar-width: thin;
  scrollbar-color: #001236 #eee;
}
.acc-toolbar-overlay::-webkit-scrollbar {
  width: 6px;
}
.acc-toolbar-overlay::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 3px;
}
.acc-toolbar-overlay::-webkit-scrollbar-thumb {
  background-color: #001236;
  border-radius: 3px;
}






/* Never put filter on #acc-toolbar — it breaks position:fixed panel/toggle. */

/* Toolbar: isolated from page link/underline rules; always readable. */
#acc-toolbar a.acc-toolbar-link,
#acc-toolbar .acc-toolbar-toggle-link,
#acc-toolbar .acc-toolbar-policy a {
  text-decoration: none !important;
}


#acc-toolbar.acc-high-contrast {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
}

#acc-toolbar.acc-high-contrast .acc-toolbar-title,
#acc-toolbar.acc-high-contrast .acc-toolbar-text,
#acc-toolbar.acc-high-contrast .acc-toolbar-icon,
#acc-toolbar.acc-high-contrast .acc-toolbar-icon svg,
#acc-toolbar.acc-high-contrast .acc-toolbar-policy a {
  color: #000 !important;
  fill: #000 !important;
}

#acc-toolbar.acc-high-contrast .acc-toolbar-link {
  background-color: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
  text-decoration: none !important;
}

#acc-toolbar.acc-high-contrast .acc-toolbar-toggle {
  background-color: #000 !important;
  color: #fff !important;
}

#acc-toolbar.acc-high-contrast .acc-toolbar-panel-head {
  background: #fff !important;
  border-bottom-color: #000 !important;
}

#acc-toolbar.acc-high-contrast .acc-toolbar-close {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

/* Active / hover: dark tile + WHITE label (never dark-on-dark). */
#acc-toolbar.acc-high-contrast .acc-toolbar-link[aria-pressed="true"],
#acc-toolbar.acc-high-contrast .acc-toolbar-link:hover,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:focus {
  background-color: #000 !important;
  color: #fff !important;
  text-decoration: none !important;
}

#acc-toolbar.acc-high-contrast .acc-toolbar-link[aria-pressed="true"] .acc-toolbar-text,
#acc-toolbar.acc-high-contrast .acc-toolbar-link[aria-pressed="true"] .acc-toolbar-icon,
#acc-toolbar.acc-high-contrast .acc-toolbar-link[aria-pressed="true"] .acc-toolbar-icon svg,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:hover .acc-toolbar-text,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:hover .acc-toolbar-icon,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:hover .acc-toolbar-icon svg,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:focus .acc-toolbar-text,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:focus .acc-toolbar-icon,
#acc-toolbar.acc-high-contrast .acc-toolbar-link:focus .acc-toolbar-icon svg {
  color: #fff !important;
  fill: #fff !important;
}

#acc-toolbar.acc-negative-contrast {
  background: #000 !important;
  color: #ffff00 !important;
  border: 1px solid #ffff00 !important;
  filter: none !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-overlay,
#acc-toolbar.acc-negative-contrast .acc-toolbar-inner {
  background: #000 !important;
  color: #ffff00 !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-title,
#acc-toolbar.acc-negative-contrast .acc-toolbar-text,
#acc-toolbar.acc-negative-contrast .acc-toolbar-icon,
#acc-toolbar.acc-negative-contrast .acc-toolbar-icon svg,
#acc-toolbar.acc-negative-contrast .acc-toolbar-policy a,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link {
  color: #ffff00 !important;
  fill: #ffff00 !important;
  background: #000 !important;
  border-color: #ffff00 !important;
  text-decoration: none !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-toggle {
  background-color: #000 !important;
  color: #ffff00 !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-panel-head {
  background: #000 !important;
  border-bottom-color: #ffff00 !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-close {
  background: #ffff00 !important;
  color: #000 !important;
  border-color: #ffff00 !important;
  filter: none !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-link[aria-pressed="true"],
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:hover,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:focus {
  background-color: #333 !important;
  color: #ffff00 !important;
  text-decoration: none !important;
}

#acc-toolbar.acc-negative-contrast .acc-toolbar-link[aria-pressed="true"] .acc-toolbar-text,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link[aria-pressed="true"] .acc-toolbar-icon,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link[aria-pressed="true"] .acc-toolbar-icon svg,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:hover .acc-toolbar-text,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:hover .acc-toolbar-icon,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:hover .acc-toolbar-icon svg,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:focus .acc-toolbar-text,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:focus .acc-toolbar-icon,
#acc-toolbar.acc-negative-contrast .acc-toolbar-link:focus .acc-toolbar-icon svg {
  color: #ffff00 !important;
  fill: #ffff00 !important;
}

/* === MOBILE / tablet (< lg): a11y only via main menu item; panel from LEFT === */
@media (max-width: 991.98px) {
  /* Toolbar is a body child (JS); zero footprint when closed, drawer when open */
  #acc-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: none;
    background: transparent;
    box-shadow: none;
    z-index: 1070;
    filter: none !important;
    transform: none !important;
  }

  #acc-toolbar.expanded {
    width: 0;
    box-shadow: none;
    z-index: 1070;
    filter: none !important;
    transform: none !important;
  }

  #acc-toolbar .acc-toolbar-toggle {
    display: none !important;
  }

  .acc-toolbar-panel-head {
    display: flex;
  }

  .acc-toolbar-panel-head .acc-toolbar-title {
    margin: 0;
    font-size: 1.05rem;
  }

  /*
   * Sit BELOW the sticky header (--igf-header-h from JS) so title + Close
   * are never hidden under the logo/menu bar.
   */
  #acc-toolbar .acc-toolbar-overlay {
    position: fixed;
    top: var(--igf-header-h, 3.75rem);
    left: 0;
    right: auto;
    bottom: 0;
    width: min(88vw, 320px);
    max-height: none;
    height: calc(100vh - var(--igf-header-h, 3.75rem));
    height: calc(100dvh - var(--igf-header-h, 3.75rem));
    z-index: 1071;
    background: #fff;
    box-shadow: 8px 0 28px rgba(0, 18, 54, 0.22);
    padding: 0.85rem 1rem 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    filter: none !important;
    box-sizing: border-box;
  }

  #acc-toolbar:not(.expanded) .acc-toolbar-overlay {
    display: none !important;
    pointer-events: none;
  }

  #acc-toolbar.expanded .acc-toolbar-overlay {
    display: flex !important;
    flex-direction: column;
    pointer-events: auto;
    transform: translateX(0);
    left: 0;
    right: auto;
  }

  .acc-backdrop {
    display: none;
    position: fixed;
    top: var(--igf-header-h, 3.75rem);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 18, 54, 0.55);
    z-index: 1065;
    opacity: 0;
    transition: opacity 0.35s ease;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }

  body.acc-open .acc-backdrop {
    display: block;
    opacity: 1;
  }

  /* Dimmed area under header: tapping closes a11y (backdrop handles it) */
  body.acc-open {
    touch-action: none;
  }
}

@media (min-width: 992px) {
  .acc-backdrop {
    display: none !important;
  }
}





