.miph,
.miph * {
  box-sizing: border-box;
}

.miph {
  --miph-navy: #061c2d;
  --miph-ink: #173347;
  --miph-ivory: #fffaf0;
  --miph-paper: #f7ecd8;
  --miph-gold: #c98b27;
  --miph-line: #dcc69e;
  position: sticky;
  top: 0;
  z-index: 99990;
  width: 100%;
  color: var(--miph-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
}

body.admin-bar .miph {
  top: 32px;
}

body.admin-bar .miph-drawer {
  max-height: calc(100dvh - 124px);
}

body.mip-has-global-header #masthead,
body.mip-has-global-header .elementor-location-header,
body.mip-has-global-header header[data-elementor-type="header"],
body.mip-has-global-header .mip-dashboard-top-controls {
  display: none !important;
}

.miph [hidden] {
  display: none !important;
}

.miph a {
  color: inherit;
  text-decoration: none;
}

.miph-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 75px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #071b2c 0%, #09243a 55%, #071b2c 100%);
  border-bottom: 1px solid rgba(222, 182, 109, 0.28);
  box-shadow: 0 6px 26px rgba(2, 12, 21, 0.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.miph-identity,
.miph-top-links,
.miph-actions,
.miph-brand {
  display: flex;
  align-items: center;
}

.miph-identity {
  min-width: 0;
  gap: 12px;
}

.miph-brand {
  flex: 0 1 auto;
  gap: 13px;
  min-height: 44px;
  min-width: 0;
  color: var(--miph-navy);
}

.miph-brand svg {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  fill: var(--miph-gold);
}

.miph-brand span {
  display: grid;
  min-width: 0;
}

.miph-brand strong {
  color: var(--miph-ivory);
  font: 600 25px/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0.12em;
}

.miph-brand small {
  margin-top: 4px;
  color: #f0bf62;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.miph-teachers {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 3px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--miph-gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--miph-ivory), 0 0 0 1px rgba(6, 28, 45, 0.08);
  cursor: pointer;
  appearance: none;
}

.miph-teachers img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 50%;
}

.miph-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 9px;
}

.miph-bell {
  position: relative;
  display: inline-grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  color: #ebc882 !important;
  background: transparent;
  border: 1px solid rgba(222, 182, 109, 0.55);
  border-radius: 50%;
}

.miph-bell:hover {
  color: #fffaf2 !important;
  background: rgba(255, 250, 242, 0.06);
  border-color: #ebc882;
}

.miph-bell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.miph-bell > span,
.miph-drawer-notification-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  color: #071b2c;
  background: #efbd55;
  border: 2px solid #071b2c;
  border-radius: 999px;
  font-size: 10px !important;
  font-style: normal;
  font-weight: 850 !important;
  line-height: 1 !important;
}

.miph-bell > span {
  position: absolute;
  top: -5px;
  right: -5px;
}

.miph-top-links {
  margin-left: auto;
  gap: 18px;
}

.miph-top-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 0;
  color: rgba(255, 250, 242, 0.9);
  background: transparent;
  border: 0;
  border-radius: 50px;
  font: 500 14px/1.2 Lato, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.025em;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.miph-top-links button:hover {
  color: #ebc882;
  background: transparent;
}

.miph-quiet-link,
.miph-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.miph-quiet-link {
  color: var(--miph-ink);
}

.miph-quiet-link:hover {
  color: #9a681e;
}

.miph-login {
  color: var(--miph-ivory) !important;
  background: transparent;
  border: 1px solid rgba(222, 182, 109, 0.55);
}

.miph-menu {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  color: #ebc882;
  background: transparent;
  border: 1px solid rgba(222, 182, 109, 0.55);
  border-radius: 3px;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.miph-menu:hover {
  color: #fffaf2;
  background: rgba(255, 250, 242, 0.06);
  border-color: #ebc882;
}

.miph-admin-access {
  display: inline-flex;
  min-height: 44px;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  color: #f7d486 !important;
  background: rgba(201, 139, 39, 0.1);
  border: 1px solid rgba(222, 182, 109, 0.62);
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.miph-admin-access:hover,
.miph-admin-access:focus-visible {
  color: #071b2c !important;
  background: #e9b957;
  border-color: #f2cb78;
}

.miph-menu span {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 3px;
  transition: transform 180ms ease, opacity 180ms ease, top 180ms ease;
}

.miph-menu span:nth-child(1) { top: 15px; }
.miph-menu span:nth-child(2) { top: 22px; }
.miph-menu span:nth-child(3) { top: 29px; }

.miph-menu[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.miph-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.miph-menu[aria-expanded="true"] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.miph-drawer {
  position: absolute;
  z-index: 2;
  top: calc(100% + 8px);
  right: clamp(12px, 3vw, 42px);
  width: min(245px, calc(100vw - 24px));
  max-height: calc(100dvh - 92px);
  padding: 13px;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--miph-ink);
  background: var(--miph-ivory);
  border: 1px solid #d9be88;
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(28, 24, 18, 0.2);
  opacity: 0;
  transform: translateY(-6px) scale(0.99);
  transform-origin: top right;
  transition: opacity 160ms ease, transform 160ms ease;
  scrollbar-width: thin;
  scrollbar-color: var(--miph-line) transparent;
}

.miph-drawer.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.miph-drawer-inner {
  display: grid;
  gap: 12px;
}

.miph .miph-drawer .miph-drawer-section > h2 {
  margin: 0;
  padding: 5px 8px 9px;
  color: #a66c18;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  line-height: 1.25 !important;
  text-transform: uppercase !important;
  white-space: nowrap;
}

.miph-drawer-section nav {
  display: grid;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.miph .miph-drawer .miph-drawer-section nav > a,
.miph .miph-drawer .miph-drawer-section nav > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  color: var(--miph-ink);
  background: transparent;
  border: 0;
  border-top: 1px solid #eadcc2;
  border-radius: 0;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 720 !important;
  line-height: 1.25 !important;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: color 140ms ease, background-color 140ms ease;
}

.miph-drawer-section nav a:first-child {
  border-top: 1px solid #eadcc2;
}

/* Reproduce the dashboard menu's curved action separators. */
.miph-drawer-section nav a.is-dashboard-action {
  border-radius: 28px 28px 0 0;
}

.miph-drawer-section nav a:hover,
.miph-drawer-section nav a[aria-current="page"],
.miph-drawer-section nav button:hover {
  color: #8b5c18;
  background: var(--miph-paper);
}

.miph-drawer-section nav a b,
.miph-drawer-section nav button b {
  display: none;
}

.miph .miph-drawer .miph-drawer-notification-count {
  margin-left: auto;
  border-color: var(--miph-ivory);
}

.miph-drawer-section nav a.is-accent {
  color: #8b5c18;
}

.miph-drawer-section nav a.is-admin-action {
  color: #7a4d0f;
  background: linear-gradient(135deg, #f8e4b6, #fff7e5);
  border-color: #ddb86e;
}

.miph-drawer-section nav a.is-admin-action + a.is-admin-action {
  border-top-color: #d6aa57;
}

html.miph-modal-open {
  overflow: hidden;
}

.miph-info-modal {
  position: fixed;
  z-index: 1000001;
  inset: 0;
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: center;
  color: #243440;
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  opacity: 0;
  transition: opacity 180ms ease;
}

.miph-info-modal[hidden] {
  display: none !important;
}

.miph-info-modal.is-open {
  opacity: 1;
}

.miph-info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 21, 0.74);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.miph-info-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  background: #fffaf2;
  border: 1px solid rgba(201, 149, 62, 0.5);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(2, 12, 21, 0.38);
  transform: translateY(12px) scale(0.985);
  transition: transform 180ms ease;
}

.miph-info-modal.is-open .miph-info-panel {
  transform: translateY(0) scale(1);
}

.miph-info-close {
  position: absolute;
  z-index: 20;
  top: 12px;
  right: 12px;
  display: grid;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  color: #81643a;
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(201, 149, 62, 0.42);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.miph-info-close:hover {
  color: #071b2c;
  background: #fff4df;
  border-color: #c9953e;
}

/* Keep every informational popup close control circular and clearly visible. */
.miph-info-close {
  box-sizing: border-box !important;
  flex: 0 0 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-width: 2px !important;
  border-color: #d4a347 !important;
  color: #09263a !important;
  font-size: 0 !important;
  appearance: none !important;
}

.miph-info-close::before {
  content: "\00d7";
  display: block;
  color: currentColor;
  font: 400 30px/1 Arial, sans-serif;
  transform: translateY(-1px);
}

.miph-info-content {
  max-height: calc(100dvh - 48px);
  padding: 54px 64px;
  overflow: auto;
  overscroll-behavior: contain;
}

.miph-info-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: #a97828;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.miph-info-content h2 {
  margin: 0;
  padding-right: 42px;
  color: #071b2c;
  font: 400 clamp(34px, 5vw, 45px)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
}

.miph-info-divider {
  width: 72px;
  height: 2px;
  margin: 26px 0;
  background: #c9953e;
}

.miph-info-content p {
  margin: 0 0 18px;
  color: #243440;
  font-size: 16px;
  line-height: 1.72;
}

.miph-info-content blockquote {
  display: grid;
  margin: 26px 0;
  padding: 22px 24px;
  gap: 8px;
  color: #fffaf2;
  background: linear-gradient(135deg, #0c3048, #071b2c);
  border-left: 3px solid #c9953e;
  font: italic 400 20px/1.45 Georgia, "Times New Roman", serif;
}

.miph-info-content blockquote cite {
  color: #e5bd72;
  font: 700 11px/1.4 Lato, sans-serif;
  letter-spacing: 0.08em;
}

.miph-info-signature {
  color: #9b6c25 !important;
  font: italic 400 18px/1.5 Georgia, "Times New Roman", serif !important;
}

.miph-info-modal.is-notifications .miph-info-panel {
  width: min(780px, 100%);
  border-color: rgba(201, 149, 62, 0.7);
  border-radius: 28px;
}

.miph-info-modal.is-notifications .miph-info-content {
  display: flex;
  min-height: min(620px, calc(100dvh - 48px));
  padding: 52px 54px 34px;
  flex-direction: column;
}

.miph-info-modal.is-notifications .miph-info-content h2 {
  font-size: clamp(36px, 5vw, 52px);
}

.miph-notification-intro {
  margin: 10px 0 20px !important;
  color: #8a7b68 !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

.miph-notification-loading {
  margin: 0 0 12px !important;
  color: #94631b !important;
  font-size: 13px !important;
}

.miph-notification-error-status {
  margin: 0 0 12px !important;
  padding: 10px 12px;
  color: #7f2d25 !important;
  background: #fff1ed;
  border: 1px solid #e4b6ae;
  border-radius: 10px;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.miph-notification-list {
  display: grid;
  max-height: min(410px, calc(100dvh - 235px));
  gap: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #dcc69e transparent;
}

.miph-notification-item {
  display: grid;
  padding: 16px 18px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  background: #fffdf8;
  border: 1px solid #e5d3b1;
  border-radius: 15px;
}

.miph-notification-item.is-unread {
  background: #fff5df;
  border-color: #d3a04a;
  box-shadow: inset 3px 0 0 #c98b27;
}

.miph-notification-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #a86d17;
  background: #f7e3bd;
  border-radius: 50%;
  font-size: 15px;
}

.miph-notification-item small {
  display: block;
  margin-bottom: 3px;
  color: #9a7b4d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.miph-notification-item h3 {
  margin: 0 0 5px;
  color: #112d41;
  font: 700 17px/1.25 Lato, "Helvetica Neue", Arial, sans-serif;
}

.miph-notification-item p {
  margin: 0 !important;
  color: #53616a !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.miph-notification-item footer {
  display: flex;
  margin-top: 11px;
  align-items: center;
  gap: 15px;
}

.miph-notification-item footer button,
.miph-notification-item footer a,
.miph-notification-item footer > span {
  display: inline-flex;
  min-height: 36px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  color: #123248;
  background: transparent;
  border: 1px solid #d3a04a;
  border-radius: 999px;
  font: 750 12px/1 Lato, "Helvetica Neue", Arial, sans-serif;
}

.miph-notification-item footer button {
  cursor: pointer;
  appearance: none;
}

.miph-notification-item footer button:hover,
.miph-notification-item footer a:hover {
  color: #fffaf2;
  background: #123248;
  border-color: #123248;
}

.miph-notification-item footer > span {
  color: #807566;
  border-color: #e6dac5;
}

.miph-notification-empty,
.miph-notification-error {
  display: grid;
  min-height: 260px;
  padding: 30px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.miph-notification-empty > span {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  place-items: center;
  color: #c98b27;
  border: 1px solid #c98b27;
  border-radius: 50%;
  font-size: 22px;
}

.miph-notification-empty strong,
.miph-notification-error strong {
  color: #33271f;
  font: 400 27px/1.2 Georgia, "Times New Roman", serif;
}

.miph-notification-empty p,
.miph-notification-error p {
  margin: 9px 0 0 !important;
  color: #8a7b68 !important;
  font-size: 14px !important;
}

.miph-notification-error {
  min-height: 180px;
  color: #8b2f27;
  background: #fff1ed;
  border: 1px solid #e4b6ae;
  border-radius: 15px;
}

.miph-notification-note {
  margin: auto 0 0 !important;
  padding-top: 18px;
  color: #96826a !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.miph-program-list {
  display: grid;
  margin: 20px 0 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.miph-program-list article {
  min-height: 124px;
  padding: 18px 19px;
  background: rgba(201, 149, 62, 0.07);
  border: 1px solid rgba(201, 149, 62, 0.2);
  border-radius: 5px;
}

.miph-program-list h3,
.miph-teacher-list h3 {
  margin: 0 0 7px;
  color: #173347;
  font: 700 16px/1.3 Lato, sans-serif;
}

.miph-program-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.miph-info-modal.is-teachers .miph-info-panel {
  width: min(1240px, 100%);
  color: #fffaf2;
  background: radial-gradient(circle at 50% -4%, rgba(215, 164, 69, 0.12), transparent 36%), linear-gradient(145deg, #142d3a, #031b2c 78%);
  border-color: rgba(237, 201, 121, 0.42);
  border-radius: 8px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.58);
}

.miph-info-modal.is-teachers .miph-info-content {
  padding: 48px 52px 54px;
  text-align: center;
}

.miph-info-modal.is-teachers .miph-info-close {
  color: #f2cf87;
  background: rgba(4, 23, 37, 0.72);
  border-color: rgba(237, 201, 121, 0.42);
}

.miph-info-modal.is-teachers .miph-info-eyebrow {
  color: #edc979;
}

.miph-info-modal.is-teachers h2 {
  padding-right: 0;
  color: #fffaf2;
}

.miph-teacher-list {
  display: grid;
  margin-top: 34px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 54px);
}

.miph-teacher-list article {
  position: relative;
  min-width: 0;
  padding: 8px 0 0;
  text-align: center;
}

.miph-teacher-list article:not(:last-child)::after {
  position: absolute;
  top: 100px;
  right: calc(clamp(24px, 4vw, 54px) / -2 - 7px);
  color: #d7a84d;
  content: "›";
  font: 400 42px/1 Georgia, "Times New Roman", serif;
}

.miph-teacher-portrait {
  display: block;
  width: min(210px, calc(100% - 20px));
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 24px;
  padding: 5px;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 250, 242, 0.08);
  border: 3px solid #efc15d;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(237, 193, 93, 0.13), 0 0 0 10px rgba(237, 193, 93, 0.56), 0 12px 26px rgba(0, 0, 0, 0.28);
}

.miph-teacher-list h3 {
  margin: 0 0 10px;
  color: #fffaf2;
  font: 700 clamp(21px, 2vw, 26px)/1.08 Georgia, "Times New Roman", serif;
}

.miph-teacher-list h3 span {
  display: block;
  margin-bottom: 3px;
  color: #b9b8b2;
  font-size: 17px;
  font-weight: 400;
}

.miph-teacher-list small {
  display: block;
  min-height: 34px;
  margin-bottom: 18px;
  color: #edc979;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.miph-teacher-list [data-miph-teacher-more] {
  display: inline-flex;
  min-width: 178px;
  min-height: 48px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fffaf2;
  background: rgba(255, 250, 242, 0.035);
  border: 1px solid rgba(237, 193, 93, 0.55);
  border-radius: 999px;
  font: 800 12px/1 Lato, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.miph-teacher-list [data-miph-teacher-more] b {
  color: #edc979;
  font-size: 22px;
  font-weight: 400;
  transition: transform 160ms ease;
}

.miph-teacher-list [data-miph-teacher-more][aria-expanded="true"] b {
  transform: rotate(90deg);
}

.miph-teacher-bio {
  margin-top: 18px;
  padding: 18px;
  text-align: left;
  background: rgba(255, 250, 242, 0.055);
  border: 1px solid rgba(237, 201, 121, 0.22);
  border-radius: 12px;
}

.miph-teacher-bio[hidden] {
  display: none;
}

.miph-teacher-bio p {
  color: #d4dee3;
  font-size: 13px;
  line-height: 1.58;
}

.miph-teacher-bio blockquote {
  margin: 12px 0 0;
  padding: 12px 0 0;
  color: #f4ddb0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(237, 201, 121, 0.22);
  font-size: 14px;
}

.miph-social-dock {
  position: fixed;
  z-index: 1;
  top: 50%;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  opacity: 1;
  transform: translateY(-50%);
  transition: opacity 140ms ease;
}

.miph.has-open-panel .miph-social-dock {
  opacity: 0;
  pointer-events: none;
}

.miph-social-dock a {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #f1c565;
  background: var(--miph-navy);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(6, 28, 45, 0.2);
  transition: color 150ms ease, transform 150ms ease, background-color 150ms ease;
}

.miph-social-dock a:hover {
  color: #fff6e4;
  background: #10374f;
  transform: translateX(-3px);
}

.miph-social-dock svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.miph-social-dock span {
  position: absolute;
  top: 50%;
  right: 58px;
  padding: 7px 10px;
  color: var(--miph-ivory);
  background: var(--miph-navy);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(6, 28, 45, 0.14);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(5px, -50%);
  transition: opacity 140ms ease, transform 140ms ease;
}

.miph-social-dock a:hover span,
.miph-social-dock a:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}

.miph a:focus-visible,
.miph button:focus-visible {
  outline: 2px solid var(--miph-navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(201, 139, 39, 0.55);
}

.miph-social-dock a:focus-visible {
  outline-color: #fff;
}

@media (max-width: 900px) {
  .miph-quiet-link {
    display: none;
  }

  .miph-top-links button {
    padding-inline: 10px;
    font-size: 11px;
  }

  .miph-teacher-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .miph-teacher-list article::after {
    display: none;
  }
}

@media (max-width: 760px) {
  body.mip-has-global-header {
    padding-top: 75px !important;
  }

  .miph {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
  }

  .miph-bar {
    flex-wrap: nowrap;
  }

  .miph-drawer {
    max-height: calc(100dvh - 92px - env(safe-area-inset-bottom, 0px));
  }

  body.admin-bar .miph-drawer {
    max-height: calc(100dvh - 138px - env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 782px) {
  body.admin-bar #wpadminbar {
    position: fixed;
  }

  body.admin-bar .miph {
    top: 46px;
  }

  body.admin-bar .miph-drawer {
    max-height: calc(100dvh - 138px);
  }
}

@media (max-width: 600px) {
  body.mip-has-global-header {
    padding-top: 64px !important;
  }

  .miph-bar {
    gap: 10px;
    min-height: 64px;
    padding: 7px 12px;
  }

  .miph-admin-access {
    min-width: 44px;
    padding-inline: 9px;
    font-size: 9px !important;
    letter-spacing: 0.04em;
  }

  .miph-identity {
    gap: 8px;
  }

  .miph-brand {
    gap: 6px;
  }

  .miph-brand svg {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .miph-brand strong {
    font-size: 22px;
  }

  .miph-brand small {
    display: none;
  }

  .miph-teachers {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .miph-actions {
    gap: 6px;
  }

  .miph-login {
    min-height: 44px;
    padding: 0 11px;
    font-size: 12px;
  }

  .miph-menu {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .miph-bell {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .miph-menu span {
    left: 13px;
  }

  .miph-info-modal {
    padding: 12px;
  }

  .miph-info-panel,
  .miph-info-content {
    max-height: calc(100dvh - 24px);
  }

  .miph-info-content {
    padding: 46px 22px 30px;
  }

  .miph-info-content h2 {
    padding-right: 32px;
    font-size: 33px;
  }

  .miph-info-modal.is-notifications .miph-info-panel {
    border-radius: 20px;
  }

  .miph-info-modal.is-notifications .miph-info-content {
    min-height: calc(100dvh - 24px);
    padding: 46px 20px 24px;
  }

  .miph-info-modal.is-notifications .miph-info-content h2 {
    font-size: 34px;
  }

  .miph-notification-list {
    max-height: calc(100dvh - 220px);
  }

  .miph-notification-item {
    padding: 14px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
  }

  .miph-notification-symbol {
    width: 28px;
    height: 28px;
  }

  .miph-program-list,
  .miph-teacher-list {
    grid-template-columns: 1fr;
  }

  .miph-info-modal.is-teachers .miph-info-content {
    padding: 46px 22px 34px;
  }

  .miph-info-modal.is-teachers .miph-info-panel {
    border-radius: 20px;
  }

  .miph-drawer {
    top: calc(100% + 6px);
    right: 12px;
    max-height: calc(100dvh - 82px - env(safe-area-inset-bottom, 0px));
  }

  body.admin-bar .miph-drawer {
    max-height: calc(100dvh - 128px - env(safe-area-inset-bottom, 0px));
  }

  .miph-social-dock {
    top: auto;
    right: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    transform: translateX(50%);
  }

  .miph-social-dock a {
    width: 46px;
    height: 46px;
  }

  .miph-social-dock a:hover {
    transform: translateY(-2px);
  }

  .miph-social-dock span {
    display: none;
  }
}

@media (max-width: 360px) {
  .miph-bar {
    padding-inline: 8px;
  }

  .miph-brand svg {
    display: none;
  }

  .miph-teachers {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .miph *,
  .miph *::before,
  .miph *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep the WordPress account controls inside the toolbar, above the MIP header. */
@media (min-width: 783px) {
  /* The page already reserves 32px for the toolbar. */
  body.admin-bar .miph { top:0; }
  body.mip-has-global-header #wpadminbar #wp-toolbar { display:flex; }
  body.mip-has-global-header #wpadminbar #wp-admin-bar-root-default {
    display:flex; flex:1 1 auto; min-width:0; float:none;
  }
  body.mip-has-global-header #wpadminbar #wp-admin-bar-root-default > li {
    float:none; min-width:0; flex:0 1 auto;
  }
  body.mip-has-global-header #wpadminbar #wp-admin-bar-root-default > li > .ab-item {
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  body.mip-has-global-header #wpadminbar #wp-admin-bar-top-secondary {
    flex:0 0 auto; float:none; margin-left:auto;
  }
}
