html {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-x: clip;
  overflow-wrap: break-word;
}

main,
header,
footer,
section,
article,
aside,
nav {
  min-width: 0;
}

img,
video,
canvas {
  max-width: 100%;
  height: auto;
}

svg,
iframe,
table,
pre {
  max-width: 100%;
}

pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

.global-site-header {
  position: relative;
  z-index: 100;
  padding: 24px 0;
  color: #1b2645;
  font-family: "Inter", "DM Sans", sans-serif;
  line-height: 1.5;
}

.global-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 36px));
  margin-inline: auto;
  min-width: 0;
}

.global-nav-logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border-radius: 4px;
  transition: opacity .2s ease;
}

.global-nav-logo img {
  display: block;
  width: auto;
  height: 48px;
}

.global-nav-logo:hover {
  opacity: .7;
}

.global-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.global-country-picker {
  position: relative;
  flex-shrink: 0;
}

.global-country-picker > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  min-width: 54px;
  padding: 8px 10px;
  border: 1px solid #d7dde6;
  border-radius: 999px;
  color: #1b2645;
  background: rgba(255, 255, 255, .72);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.global-country-picker > summary::-webkit-details-marker {
  display: none;
}

.global-country-picker > summary::after {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.global-country-picker[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.global-country-picker > summary:focus-visible {
  outline: 4px solid rgba(246, 215, 107, .65);
  outline-offset: 4px;
}

.global-country-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 120;
  display: grid;
  width: max-content;
  min-width: 210px;
  padding: 8px;
  border: 1px solid #dfe5ed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 28, 48, .16);
}

.global-country-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #1b2645;
  background: transparent;
  font-size: .86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.global-country-option:hover,
.global-country-option:focus-visible,
.global-country-option[aria-checked="true"] {
  background: #f8f5ef;
}

.global-country-option[aria-checked="true"]::after {
  margin-left: auto;
  color: #497b60;
  content: "✓";
}

.global-nav-links a {
  color: inherit;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.global-nav-links > a:not(.global-nav-button) {
  position: relative;
}

.global-nav-links > a:not(.global-nav-button)::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #1b2645;
  content: "";
  opacity: 0;
  transform: scaleX(.55);
  transition: opacity .2s ease, transform .2s ease;
}

.global-nav-links > a:not(.global-nav-button):hover::after,
.global-nav-links > a:not(.global-nav-button):focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.global-resources-menu {
  position: relative;
}

.global-resources-menu summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.global-resources-menu summary::-webkit-details-marker {
  display: none;
}

.global-resources-menu summary::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.global-resources-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.global-resources-menu summary:focus-visible,
.global-nav-logo:focus-visible,
.global-nav-links > a:focus-visible {
  outline: 4px solid rgba(246, 215, 107, .65);
  outline-offset: 5px;
  border-radius: 4px;
}

.global-resources-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 110;
  display: grid;
  min-width: 290px;
  padding: 10px;
  border: 1px solid #dfe5ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 28, 48, .16);
}

.global-resources-dropdown::before {
  position: absolute;
  top: -7px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #dfe5ed;
  border-left: 1px solid #dfe5ed;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.global-resources-dropdown a {
  position: relative;
  padding: 11px 13px;
  border-radius: 10px;
  color: #1b2645;
  font-size: .86rem;
}

.global-resources-dropdown a:hover,
.global-resources-dropdown a:focus-visible {
  background: #f8f5ef;
}

/* Student entry point — kept visible on small screens so students can always
   log in or sign up. */
.global-nav-student {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 52px;
  padding: 12px 20px;
  border: 2px solid #1b2645;
  border-radius: 999px;
  color: #1b2645 !important;
  background: transparent;
  transition: background .2s ease;
}

.global-nav-student::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #86b49b;
  content: "";
}

.global-nav-student:hover,
.global-nav-student:focus-visible {
  background: #f8f5ef;
}

.global-nav-links > a.global-nav-student::after {
  display: none;
}

.global-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 23px;
  border: 2px solid #1b2645;
  border-radius: 999px;
  color: #1b2645 !important;
  background: #f6d76b;
  box-shadow: 0 10px 0 rgba(20, 28, 48, .12);
  font-weight: 800 !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.global-nav-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 0 rgba(20, 28, 48, .12);
}

.global-nav-button:active {
  transform: translateY(1px);
  box-shadow: 0 7px 0 rgba(20, 28, 48, .12);
}

@media (max-width: 850px) {
  .global-resources-menu,
  .global-nav-links > a:not(.global-nav-button):not(.global-nav-student) {
    display: none;
  }

  .global-nav-links {
    gap: 18px;
  }

  .global-nav-logo img {
    height: 42px;
  }

  .global-site-header {
    padding-bottom: 72px;
  }

  .global-country-picker {
    position: absolute;
    right: 18px;
    bottom: 14px;
  }

  .global-country-menu {
    right: 0;
    left: auto;
  }

  .global-resources-dropdown {
    right: -18px;
  }
}

@media (max-width: 540px) {
  .global-site-header {
    padding: 16px 0 68px;
  }

  .global-nav-shell {
    gap: 14px;
    width: min(100% - 24px, 1160px);
  }

  .global-nav-links {
    gap: 8px;
  }

  .global-nav-logo img {
    height: 34px;
  }

  .global-country-picker {
    right: 12px;
    bottom: 12px;
  }

  .global-nav-button {
    min-height: 44px;
    padding: 10px 16px;
    font-size: .88rem !important;
    white-space: nowrap;
  }

  /* "Log in / Sign up" is a long label for a small pill, and on this breakpoint it sits
     next to "Get the Map" with nothing else to give way. Drop the status dot and tighten
     the pill so the label stays on one line. */
  .global-nav-student {
    min-height: 44px;
    padding: 10px 13px;
    font-size: .78rem;
    white-space: nowrap;
  }

  .global-nav-student::before {
    display: none;
  }

  .global-nav-student {
    font-size: 0;
  }

  .global-nav-student::after {
    font-size: .78rem;
    content: "Student";
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea {
    min-height: 44px;
    max-width: 100%;
    font-size: 16px !important;
  }

  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  summary {
    min-height: 44px;
  }

  dialog {
    max-width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .highlight {
    white-space: normal !important;
  }
}

@media (max-width: 380px) {
  .global-nav-shell {
    gap: 8px;
  }

  .global-nav-logo img {
    height: 31px;
  }

  .global-nav-button,
  .global-nav-student {
    padding-inline: 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .global-nav-logo:hover,
  .global-nav-button:hover,
  .footer-social-link:hover {
    opacity: 1;
    transform: none;
  }
}

.footer-social-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-social-link {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  opacity: .82;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  background: rgba(134, 180, 155, .16);
  opacity: 1;
  transform: translateY(-2px);
}

.footer-social-link:focus-visible {
  outline: 3px solid rgba(246, 215, 107, .72);
  outline-offset: 3px;
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
