html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* -----------------------------------
   OPTIMIZED FLEX-BASED TOP BAR
----------------------------------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 10px;
  background: #f9f9f9;
  font-size: 0.85rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.top-bar > div:first-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.lang-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.lang-switch {
  margin: 0 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-switch label {
  margin: 0 6px;
}

.header-tools {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.header-tools li {
  display: flex;
  align-items: center;
}

.header-tools a,
.header-tools button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  color: #000;
  font-size: 0.9rem;
}

.header-tools img {
  width: 17px;
  height: 17px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.inverted {
  filter: invert(100%);
}

.skip-link {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  color: #000;
}

.skip-link img {
  width: 18px;
  height: 18px;
}

.skip-link:focus,
.skip-link:hover {
  background: #002244;
  outline: 2px solid #ffbf47;
  outline-offset: 2px;
}

a:focus,
button:focus {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .top-bar {
    display: block;
    padding: 6px 10px;
    white-space: normal;
  }

  nav[aria-label="Header tools"] {
    margin-top: 6px;
  }

  .lang-switch {
    margin: 6px 0;
  }

  .header-tools {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

#skip-main-btn {
  position: static !important;
}

.nav-sub a:focus,
.nav-sub a:focus-visible {
  outline: 3px solid #000;
  outline-offset: 1px;
  background-color: #ffeb99;
  color: #000 !important;
}

.nav-sub a:focus {
  outline: 2px solid #000 !important;
}

.nav-sub a {
  display: block;
  width: 100%;
}
