.mad-site-header {
  display: block;
  position: relative;
  z-index: 30;
  flex: none;
  width: 100%;
  color: #f0f5ff;
  background: #0b152a;
  border-bottom: 1px solid #29426b;
  font: 400 15px/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: start;
}
.mad-site-header *, .mad-page-links * { box-sizing: border-box; }
.mad-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 13px 0 15px;
  width: min(1200px, calc(100% - 40px));
}
.mad-brand { flex: none; }
.mad-brand-title { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.mad-site-header a { text-decoration: none; color: inherit; }
.mad-brand-title > a:first-child {
  font-size: 1.32rem;
  line-height: 1.2;
  font-weight: 790;
}
.mad-youtube {
  display: grid;
  place-items: center;
  border-radius: 6px;
  width: 23px;
  height: 16px;
  background: #ff0033;
}
.mad-youtube span {
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-right: none;
  border-left: 7px solid #fff;
}
.mad-author { display: grid; margin-top: 5px; color: #adc0da; font-size: .83rem; }
.mad-main-navigation,
.mad-page-links {
  display: block;
  color: #cad7eb;
}
.mad-site-header ul { margin: 0; padding: 0; list-style: none; }
.mad-primary-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 3px;
}
.mad-primary-links > li > a {
  display: block;
  border-radius: 8px;
  padding: 7px 6px;
  font-size: .9rem;
  white-space: nowrap;
}
.mad-site-header a:hover,
.mad-site-header summary:hover { color: #fff; background-color: #1b3558; }
.mad-site-header .mad-brand-title a:first-child:hover { background: transparent; }
.mad-site-header .mad-youtube:hover { background: #d9002b; }
.mad-site-header a:focus-visible,
.mad-site-header summary:focus-visible,
.mad-site-header button:focus-visible,
.mad-page-links a:focus-visible { outline: 2px solid #a9d9ff; outline-offset: 2px; }
.mad-primary-links a[aria-current],
.mad-current-section > a,
.mad-dropdown[open] > summary { background: #234263; color: #fff; }
.mad-primary-links a[aria-disabled="true"] { opacity: .55; }
.mad-lock { font-size: .8em; }
.mad-menu-group { position: relative; display: flex; align-items: center; }
.mad-menu-group > a { border-radius: 8px 0 0 8px; }
.mad-site-header summary { cursor: pointer; list-style: none; }
.mad-site-header summary::-webkit-details-marker { display: none; }
.mad-dropdown > summary {
  display: grid;
  place-items: center;
  min-width: 25px;
  min-height: 34px;
  border-radius: 0 8px 8px 0;
}
.mad-dropdown > summary span,
.mad-lab-group > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-2px);
}
.mad-dropdown[open] > summary span,
.mad-lab-group[open] > summary::after { transform: rotate(225deg) translate(-1px,-1px); }
.mad-menu-panel {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 5px);
  width: 18.75rem;
  max-height: 68vh;
  overflow-y: auto;
  padding: 7px;
  background: #132a49;
  border: 1px solid #53769e;
  border-radius: 10px;
  box-shadow: 0 14px 26px #030a1980;
}
.mad-menu-group > a[href$="/cafeteria.html"] + .mad-dropdown .mad-menu-panel {
  inset-inline-start: auto;
  inset-inline-end: 0;
}
.mad-menu-panel a,
.mad-lab-group summary {
  display: block;
  padding: 8px 9px;
  border-radius: 6px;
  white-space: normal;
  font-size: .9rem;
}
.mad-lab-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 670;
}
.mad-lab-group > ul { margin: 0 4px 6px 10px; padding-left: 6px; border-left: 1px solid #53769e; }
.mad-mobile-menu { display: none; }
.mad-page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 16px;
  margin: 12px auto;
  width: min(1160px, calc(100% - 32px));
  font: 650 .9rem/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
}
.mad-page-links a { color: #bce0ff; text-decoration: underline; text-underline-offset: .18em; }

@media (max-width: 950px) {
  .mad-header-inner { flex-wrap: wrap; gap: 10px; width: calc(100% - 28px); }
  .mad-mobile-menu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 6px 10px;
    color: #e1edff;
    background: #182e50;
    border: 1px solid #517097;
    border-radius: 8px;
    font: 670 .88rem/1.3 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
  }
  .mad-main-navigation { display: none; flex: 0 0 100%; }
  .mad-mobile-menu[aria-expanded="true"] + .mad-main-navigation { display: block; }
  .mad-primary-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .mad-primary-links > li > a { padding: 9px; white-space: normal; }
  .mad-menu-group { display: block; }
  .mad-primary-links > .mad-menu-group > a { padding-right: 48px; }
  .mad-dropdown > summary {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 44px;
    min-height: 42px;
  }
  .mad-menu-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin: 2px 0 4px;
    box-shadow: none;
  }
}
@media (max-width: 365px) {
  .mad-brand-title > a:first-child { font-size: 1.16rem; }
  .mad-author { font-size: .75rem; }
}
.exam-in-progress > .mad-site-header,
body.exam-mode:has(#examScreen:not([hidden])) > .mad-site-header,
body[data-ficha-mode="exam"]:has(#viewExamClock:not([hidden])) > .mad-site-header {
  display: none;
}
body.full-workspace:has(> .mad-site-header) { display: flex; flex-direction: column; }
body.full-workspace:has(> .mad-site-header) > .wrap { height: auto; }
@media print {
  .mad-site-header, .mad-page-links { display: none !important; }
}
