.image-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eaf4fb, #f8fbfe);
  color: #6f8ca6;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 52px 24px;
  text-align: center;
  color: #7890a6;
  font-size: 14px;
  font-weight: 800;
  background: #f6f9fc;
  border: 1px dashed #d4e1ec;
  border-radius: 18px;
}

.article-status {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #edf7fc;
  color: #4d728d;
  font-size: 11px;
  font-weight: 850;
}

.media-frame {
  position: relative;
  display: inline-grid;
  overflow: hidden;
}

.media-frame > .image-fallback,
.media-frame > img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}

.school-identity > .media-frame,
.school-identity > .image-fallback {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
}

.school-card-head > .media-frame,
.school-card-head > .image-fallback {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border: 1px solid #e5eaf0;
  border-radius: 17px;
}

.news-card .cover > .media-frame,
.news-card .cover > .image-fallback {
  width: 100%;
  height: 100%;
}

.news-card .cover > .article-cover-surface {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(85, 206, 255, .48), transparent 28%),
    linear-gradient(135deg, #164c7b 0%, #0b3159 56%, #071d35 100%);
}

.article-cover-surface::before,
.article-cover-surface::after {
  position: absolute;
  z-index: -1;
  content: "";
  border: 1px solid rgba(165, 226, 255, .22);
  transform: rotate(-24deg);
}

.article-cover-surface::before {
  width: 220px;
  height: 220px;
  top: -104px;
  right: -60px;
  border-radius: 38px;
}

.article-cover-surface::after {
  width: 150px;
  height: 150px;
  right: 58px;
  bottom: -104px;
  border-radius: 28px;
}

.article-cover-surface > span,
.article-cover-surface > small {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

.article-cover-surface > span {
  align-self: flex-start;
  padding: 5px 8px;
  border: 1px solid rgba(129, 221, 255, .56);
  border-radius: 999px;
  color: #bdeeff;
  background: rgba(2, 19, 40, .18);
}

.article-cover-surface > strong {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  max-width: 94%;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-cover-surface > small {
  color: rgba(191, 232, 255, .74);
}

.media-frame > img {
  position: relative;
  z-index: 1;
  object-fit: inherit;
  background: #fff;
}

.identity-button {
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.school-card[data-open-school],
.news-card[data-open-article] {
  cursor: pointer;
}

.detail-modal {
  align-items: center;
  overflow: hidden;
  backdrop-filter: none;
}

.detail-modal > .detail-modal-close {
  position: fixed;
  z-index: 120;
  top: 38px;
  right: max(30px, calc((100vw - 1040px) / 2 + 28px));
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe7f0;
  background: #fff;
  color: #52657a;
  box-shadow: 0 10px 30px rgba(8, 42, 73, .18);
}

.detail-modal > .detail-modal-close:hover,
.detail-modal > .detail-modal-close:focus-visible {
  border-color: #00aeef;
  color: #008bc2;
  outline: none;
}

.detail-card {
  width: min(1040px, 100%);
  max-height: calc(100dvh - 48px);
  margin: 0 auto;
  padding: 22px clamp(22px, 4vw, 38px) 30px;
  display: block;
  overflow-y: auto;
  scrollbar-gutter: stable;
  text-align: left;
}

.detail-overview {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 52px 18px 18px;
  border: 1px solid #dce9f3;
  border-radius: 24px;
  background: linear-gradient(135deg, #f7fbfe 0%, #eef7fc 100%);
}

.detail-overview.article-detail-overview {
  grid-template-columns: minmax(0, 1fr) auto;
}

.detail-logo {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dce6ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(25, 71, 107, .08);
}

.detail-logo[hidden] {
  display: none;
}

.detail-logo img {
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
}

.detail-logo .image-fallback {
  color: #8ca0b5;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
}

.detail-heading {
  min-width: 0;
}

.detail-heading > h2 {
  margin: 5px 0 4px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.25;
}

.detail-meta {
  margin: 0;
  color: #6f8094;
  font-size: 14px;
}

.detail-summary {
  max-width: 680px;
  margin: 10px 0 0;
  color: #526579;
  font-size: 13px;
  line-height: 1.65;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-facts span {
  min-width: 98px;
  padding: 7px 10px;
  border: 1px solid #d9e7f1;
  border-radius: 12px;
  background: rgba(255,255,255,.82);
}

.detail-facts small,
.detail-facts strong {
  display: block;
}

.detail-facts small {
  color: #8a99aa;
  font-size: 10px;
  font-weight: 800;
}

.detail-facts strong {
  margin-top: 2px;
  color: #0b3b6a;
  font-size: 13px;
}

.detail-body {
  min-height: 0;
  margin-top: 18px;
  overflow-y: auto;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.detail-body.school-detail-mode {
  overflow: visible;
}

.detail-section-browser {
  padding: 16px;
  border: 1px solid #dce8f2;
  border-radius: 22px;
  background: #f7fafc;
}

.detail-section-browser-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.detail-section-browser-heading h3 {
  margin: 0;
  color: #123e64;
  font-size: 20px;
}

.detail-section-browser-heading p {
  margin: 0;
  color: #7b8da1;
  font-size: 12px;
}

.detail-section-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.detail-section-nav {
  position: sticky;
  top: 0;
  max-height: calc(100dvh - 150px);
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.detail-section-tab {
  min-height: 42px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #385a76;
  cursor: pointer;
  text-align: left;
}

.detail-section-tab:hover {
  border-color: #d6e7f1;
  background: #fff;
}

.detail-section-tab > span {
  color: #00a4e4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.detail-section-tab > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-section-tab > i {
  color: #8a9aac;
  font-size: 18px;
  font-style: normal;
}

.detail-section-tab.active {
  border-color: #aee5f8;
  color: #075081;
  background: #eaf8fe;
  box-shadow: 0 8px 18px rgba(0, 139, 194, .08);
}

.detail-section-stage {
  min-width: 0;
  overflow: visible;
  border: 1px solid #dce7f0;
  border-radius: 17px;
  background: #fff;
}

.detail-section-panel {
  min-height: 100%;
  padding: 20px 22px 24px;
}

.detail-section-panel[hidden] {
  display: none;
}

.detail-section-panel > h3 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5edf4;
  color: #0b3b6a;
  font-size: 20px;
}

.detail-section-panel-content > div > h3:first-child,
.detail-section-panel-content > div > p:first-child {
  margin-top: 0;
}

.data-panel .school-data-visuals {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.data-panel .school-data-heading {
  display: none;
}

.data-panel .data-table-scroll {
  max-height: none;
}

.program-lead {
  margin: 0 0 16px;
  color: #0b3b6a;
  font-size: 15px;
  font-weight: 900;
}

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

.program-card {
  position: relative;
  padding: 18px;
  border: 1px solid #dbe8f2;
  border-radius: 16px;
  background: linear-gradient(145deg, #f7fbfe, #fff);
}

.program-card > span {
  color: #00a4e4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.program-card h4 {
  margin: 7px 0 9px;
  color: #123e64;
  font-size: 16px;
}

.program-card p {
  margin: 0;
  color: #5d7185;
  font-size: 13px;
  line-height: 1.75;
}

.program-notes {
  margin-top: 16px;
  padding: 17px 18px;
  border-left: 3px solid #00aeef;
  border-radius: 0 14px 14px 0;
  background: #f2f8fc;
}

.program-notes h3 {
  margin: 0 0 8px;
  color: #123e64;
  font-size: 15px;
}

.program-notes p {
  margin: 8px 0;
  color: #61758a;
  font-size: 13px;
  line-height: 1.7;
}

.detail-body h2 {
  margin: 40px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e3ebf2;
  color: #0b3b6a;
  font-size: 24px;
}

.detail-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 18px;
}

.detail-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.detail-body th,
.detail-body td {
  padding: 10px;
  border: 1px solid #dbe5ee;
}

.detail-loading {
  padding: 48px 20px;
  text-align: center;
  color: #7690a6;
  background: #f4f8fb;
  border-radius: 18px;
}

.detail-consult,
.detail-cta button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #00aeef;
  font-weight: 900;
  cursor: pointer;
}

.detail-page-link {
  width: max-content;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1px solid #bde9fa;
  border-radius: 13px;
  background: #ecfaff;
  color: #008bc2;
  font-size: 13px;
  font-weight: 900;
}

.detail-page-link[hidden] {
  display: none;
}

.school-detail-section {
  margin-top: 22px;
  padding: 24px clamp(18px, 3vw, 30px);
  border: 1px solid #e0e9f1;
  border-radius: 20px;
  background: #fff;
}

.school-detail-section > h2 {
  margin-top: 0;
}

.school-detail-section p {
  margin: 14px 0;
}

.alumni-section .alumni-intro {
  margin: 0 0 18px;
  color: #60748a;
  font-size: 14px;
  font-weight: 800;
}

.alumni-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.alumni-card {
  min-width: 0;
  min-height: 116px;
  padding: 14px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid #dce8f2;
  border-radius: 18px;
  background: linear-gradient(145deg, #f8fbfe, #fff);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.alumni-card:hover,
.alumni-card:focus-visible {
  border-color: #9bdff8;
  box-shadow: 0 12px 28px rgba(14, 74, 113, .1);
  outline: none;
  transform: translateY(-2px);
}

.alumni-avatar {
  width: 84px;
  height: 84px;
  display: block;
  overflow: hidden;
  border: 1px solid #dce6ef;
  border-radius: 16px;
  background: #edf4f9;
}

.detail-body .alumni-avatar img {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}

.alumni-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alumni-copy strong {
  color: #123e64;
  font-size: 16px;
  line-height: 1.35;
}

.alumni-copy small {
  overflow: hidden;
  color: #7b8ca0;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alumni-copy > span {
  color: #53687d;
  font-size: 12px;
  line-height: 1.55;
}

.detail-page-link:hover {
  border-color: #00aeef;
  background: #00aeef;
  color: #fff;
}

.detail-cta {
  margin-top: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 20px;
  background: #eef8fd;
}

.detail-cta p {
  margin: 0;
  color: #35536a;
  font-weight: 800;
}

@media (max-width: 680px) {
  /* The modal retained 20px desktop padding while the article card asked for
     100dvh, so both ends of the reading surface were hidden by its parent. */
  .detail-modal {
    align-items: stretch;
    padding: 0;
    overflow: hidden;
  }

  .detail-modal > .detail-modal-close {
    top: calc(14px + env(safe-area-inset-top));
    right: calc(14px + env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }

  .detail-card {
    width: 100%;
    height: 100dvh;
    margin: 0;
    max-height: 100dvh;
    min-height: 0;
    padding: calc(72px + env(safe-area-inset-top)) 14px calc(22px + env(safe-area-inset-bottom));
    border-radius: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .detail-overview {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
  }

  .detail-overview.article-detail-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .detail-heading > h2 {
    margin-top: 2px;
    font-size: 22px;
  }

  .detail-page-link {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .detail-summary {
    margin-top: 6px;
    font-size: 12px;
  }

  .detail-facts {
    display: none;
  }

  .detail-body {
    overflow: visible;
    font-size: 15px;
  }

  .detail-section-browser {
    padding: 12px;
    border-radius: 18px;
  }

  .detail-section-browser-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .detail-section-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-section-nav {
    position: sticky;
    top: -1px;
    z-index: 5;
    max-height: none;
    padding: 0 0 5px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .detail-section-tab {
    min-width: max-content;
    grid-template-columns: 22px auto;
    padding: 0 12px;
  }

  .detail-section-tab > i {
    display: none;
  }

  .detail-section-panel {
    padding: 16px;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .alumni-grid {
    grid-template-columns: 1fr;
  }

  .alumni-card {
    min-height: 98px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 13px;
  }

  .alumni-avatar {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }

  .detail-cta {
    align-items: stretch;
    flex-direction: column;
  }
}
