/* ═══════════════════════════════════════════════════════════════════════════
   ISAC — International Society for Applied Computing
   High-End Academic Society Design System & Global Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Self-hosted fonts (one local copy; Latin variable woff2) ─── */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-serif-4-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Sage Publishing palette, mapped onto ISAC */
  --navy-deep: #001554;
  --navy-primary: #001A69;
  --navy-surface: #1c358a;
  --navy-dark: #001A69;
  --navy-subtle: rgba(0, 26, 105, 0.06);
  --navy-border: rgba(0, 26, 105, 0.16);

  /* Sage tertiary teal occupies the former gold tokens so existing accents restyle */
  --gold: #08C9C4;
  --teal: #08C9C4;
  --sky: #EBF6FF;
  --sky-strong: #D9EEFF;
  --accent-blue: #2537C6;

  --bg-page: #ffffff;
  --bg-alt: #F7F7F7;
  --text-main: #001A69;
  --text-body: #333333;
  --text-muted: #555555;
  --border-subtle: #DDDDDD;
  --border-strong: #CCCCCC;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --transition-base: all 0.2s ease;
}

/* ─── Global Reset & Foundations ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-body);
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100%;
}

/* Overlay scroll lock (mobile drawer, lightbox, citation modal).
   Applied to <html> only — a body-level overflow value would turn <body>
   into a scroll container and detach position: sticky chrome (site header
   and its drawer) from the viewport, sending them to the document top. */
html.is-scroll-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  padding: 10px 18px;
  background: var(--navy-deep);
  color: #ffffff;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s ease;
  border-radius: var(--radius-xs);
}
.skip-link:focus {
  top: 15px;
}

/* ─── Typography Utility ─── */
h1, h2, h3, h4, h5, h6 {
  color: var(--navy-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

/* ─── Layout Container & Grid ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

.section {
  padding-top: 88px;
  padding-bottom: 88px;
}

.section-sky {
  background-color: var(--sky);
}

/* ─── Section Header & Micro-Typo ─── */
.section-header {
  margin-bottom: 40px;
}

.section-header.center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.section-header.center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy-primary);
  line-height: 1.3;
}

.section-subtitle {
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 38rem;
}

/* ─── Buttons & Badges ─── */
.btn-academic-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #ffffff;
  background-color: var(--navy-primary);
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  box-shadow: none;
  transition: var(--transition-base);
}
.btn-academic-primary:hover {
  background-color: var(--navy-deep);
  border-color: var(--navy-deep);
  color: #ffffff;
}

.btn-academic-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy-primary);
  background-color: #ffffff;
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-base);
}
.btn-academic-outline:hover {
  background-color: var(--sky);
  color: var(--navy-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SITE HEADER — Sage two-tier: navy brand bar + light navigation
   ═══════════════════════════════════════════════════════════════════════════ */
#site-chrome-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--bg-alt);
}

.header-upper {
  background: var(--navy-primary);
  color: #ffffff;
}

.header-upper-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #ffffff;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  /* White logo in the header bar; source SVG and favicon stay teal */
  filter: brightness(0) invert(1);
}

.header-upper-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-upper-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
}

.header-upper-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--sky-strong);
}

.header-upper-cta {
  background: var(--teal);
  color: var(--navy-primary);
}

.header-upper-cta:hover {
  background: #ffffff;
  color: var(--navy-primary);
}

.header-lower {
  background: #ffffff;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 60px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-item {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: var(--transition-base);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--navy-primary);
  background-color: #ffffff;
}

.nav-item.active {
  color: var(--navy-primary);
  font-weight: 600;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--text-body);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.mobile-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 14px;
}

.mobile-toggle-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: var(--transition-base);
  border-radius: 1px;
}

.mobile-toggle-label {
  /* the visible word is drawn by ::after so it can swap to "Close" when open;
     the span's own text stays in the DOM for a11y but is not painted */
  font-size: 0;
  font-weight: 600;
  color: #ffffff;
}

.mobile-toggle-label::after {
  content: "Menu";
  font-size: 0.8rem;
}

.mobile-toggle.active .mobile-toggle-label::after {
  content: "Close";
}

.mobile-toggle.active .mobile-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-toggle.active .mobile-toggle-bars span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active .mobile-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 26, 105, 0.14);
  padding: 0;
  max-height: calc(100vh - 80px);
  /* dvh keeps the drawer inside the *visible* viewport on mobile browsers
     whose URL bar shrinks the viewport (overrides the vh fallback above) */
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 1005;
}

.mobile-drawer.active {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
}

.mobile-nav-item {
  font-size: 1.05rem;
  font-weight: 500;
  padding: 14px 8px;
  color: var(--navy-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--accent-blue);
  font-weight: 600;
}

.mobile-drawer-footer {
  padding: 20px 24px 28px;
  background: var(--bg-alt);
}

.mobile-cta {
  width: 100%;
  text-align: center;
  display: block;
}

.mobile-contact-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.header-spacer {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SAGE HOME HERO — teal field, navy panel, reverse title
   ═══════════════════════════════════════════════════════════════════════════ */
.sage-hero {
  background: var(--teal);
  color: var(--navy-primary);
}

.sage-hero-inner {
  background: var(--navy-primary);
  color: #ffffff;
  padding: 72px 48px 80px;
  position: relative;
  overflow: hidden;
}

.sage-hero-inner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: auto;
  aspect-ratio: 1 / 1;
  right: 0;
  transform: translateX(50%);
  background: var(--teal);
  border-radius: 50%;
  pointer-events: none;
}

.sage-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 58%;
}

.sage-hero-title {
  font-size: clamp(2.1rem, 4.4vw, 3.75rem);
  line-height: 1.08;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.sage-hero-title span {
  display: table;
  position: relative;
  color: #ffffff;
  z-index: 1;
  margin-top: 6px;
  padding: 0.08em 0.24em 0.12em 0.16em;
  background: var(--teal);
  border-radius: 4px;
}

.sage-hero-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #ffffff;
  max-width: 32rem;
  margin-bottom: 32px;
}

.sage-hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sage-hero-actions .btn-academic-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy-primary);
}

.sage-hero-actions .btn-academic-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy-primary);
}

.sage-hero-actions .btn-academic-outline {
  background: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.sage-hero-actions .btn-academic-outline:hover {
  background: #ffffff;
  color: var(--navy-primary);
}

/* News tabs + horizontal feature card */
.news-tabs {
  margin-top: 8px;
}

.news-tablist {
  display: flex;
  gap: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--border-subtle);
}

.news-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 8px;
  margin-right: 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.news-tab:hover {
  color: var(--navy-primary);
}

.news-tab[aria-selected="true"] {
  color: var(--navy-primary);
  font-weight: 600;
  border-bottom-color: var(--navy-primary);
}

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

.horiz-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  padding-top: 8px;
}

.horiz-card.is-flip {
  grid-template-columns: 1fr 1fr;
}

.horiz-card.is-flip .horiz-card-media {
  order: -1;
}

.horiz-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 12px;
}

.horiz-card-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 28px;
  max-width: 34em;
}

.horiz-card-media {
  min-width: 0;
}

.horiz-card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  background: var(--bg-alt);
  box-shadow: none;
}
.horiz-card-media--journal {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 24px;
  background: linear-gradient(160deg, #001554 0%, #001A69 100%);
}
.horiz-card-media--journal img {
  width: auto;
  height: 280px;
  max-width: 70%;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}
.horiz-card .btn-academic-primary {
  min-width: 12rem;
  max-width: 18rem;
  width: 50%;
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.quick-link-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  min-width: 0;
}

.quick-link-card a.stretched {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quick-link-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-alt);
  transition: transform 0.5s ease;
}

.quick-link-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.quick-link-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 6px;
}

.quick-link-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 8px;
}

.quick-link-card:hover .quick-link-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quick-link-card:hover img {
  transform: scale(1.02);
}

.quick-link-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SAGE SIGNATURE QUOTE BANNER (.banner-quote)
   ═══════════════════════════════════════════════════════════════════════════ */
.banner.banner-quote {
  background: var(--navy-primary);
  color: var(--sky-strong);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}

.banner.banner-quote::before {
  content: none;
}

.quote-banner-inner {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  padding: 0 20px 0 96px;
  text-align: left;
}

.quote-banner-mark {
  font-family: var(--font-sans);
  font-size: 5rem;
  line-height: 1;
  color: var(--sky-strong);
  opacity: 0.85;
  position: absolute;
  left: 12px;
  top: -12px;
  user-select: none;
}

.quote-banner-statement {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-style: normal;
  line-height: 1.55;
  color: #ffffff;
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: 0;
}
.quote-banner-statement:last-child {
  margin-bottom: 0;
}
.banner-quote-author {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--sky-strong);
  font-weight: 600;
  display: block;
  margin-top: 12px;
}
.banner-quote-author::before {
  content: "– ";
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMITTEES — featured chair + flat people grid
   ═══════════════════════════════════════════════════════════════════════════ */
.dossier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
  width: 100%;
}

.people-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}
.people-row img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-alt);
}
.people-kicker {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 6px;
}
.people-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.people-link {
  color: inherit;
  text-decoration: none;
}
.people-link:hover,
.people-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.people-affil {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}
.people-bio {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-body);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACADEMIC ENDORSEMENTS & PARTNERS LOGO STRIP (GREYSCALE HOVER)
   ═══════════════════════════════════════════════════════════════════════════ */
.partners-section {
  padding: 48px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.partners-heading {
  text-align: center;
  margin-bottom: 28px;
}

.partners-heading-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.partners-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
}

.partner-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  max-width: 190px;
  filter: grayscale(100%) opacity(0.65) contrast(90%);
  transition: var(--transition-base);
}

.partner-logo-item:hover {
  filter: grayscale(0%) opacity(1) contrast(100%);
  transform: translateY(-1px);
}

.partner-logo-item img {
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MEMBERSHIP TYPE TILES
   ═══════════════════════════════════════════════════════════════════════════ */
.grade-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grade-tile {
  --color-theme: var(--navy-primary);
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  min-height: 0;
  color: #ffffff;
  cursor: pointer;
  outline: none;
}

.grade-tile:focus-visible {
  outline: 2px solid var(--navy-primary);
  outline-offset: 3px;
}

.grade-tile-bg {
  position: absolute;
  inset: 0;
}

.grade-tile-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%;
}

.grade-tile-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, transparent 45%, rgba(0, 0, 0, 0.22) 100%);
}

.grade-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-theme);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
  pointer-events: none;
}

.grade-tile-number {
  position: relative;
  z-index: 2;
  padding: 28px 24px 0;
  font-size: 5.25rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.grade-tile-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px 24px 28px;
}

.grade-tile-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin: 0;
}

.grade-tile-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(12px);
  transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.35s ease;
}

.grade-tile-detail p {
  margin: 12px 0 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #ffffff;
}

.grade-tile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  pointer-events: none;
}

.grade-tile-link::after {
  content: "→";
  font-size: 1.05em;
}

.grade-tile-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.grade-tile.is-open::before {
  opacity: 0.94;
}

.grade-tile.is-open .grade-tile-detail {
  max-height: 260px;
  opacity: 1;
  transform: none;
}

.grade-tile.is-open .grade-tile-link {
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .grade-tile:hover::before,
  .grade-tile:focus-within::before {
    opacity: 0.94;
  }
  .grade-tile:hover .grade-tile-detail,
  .grade-tile:focus-within .grade-tile-detail {
    max-height: 260px;
    opacity: 1;
    transform: none;
  }
  .grade-tile:hover .grade-tile-link,
  .grade-tile:focus-within .grade-tile-link {
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grade-tile::before,
  .grade-tile-detail {
    transition: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   DOTTED GLOBE PHOTO ATLAS (events)
   ════════════════════════════════════════════════════════════════════════════ */

.globe-section {
  padding-top: 8px;
  padding-bottom: 72px;
  background: var(--bg-page);
}

.globe-stage {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  touch-action: pan-y;
  cursor: grab;
}

.globe-stage.is-grabbing {
  cursor: grabbing;
}

.globe-stage:focus-visible {
  outline: 2px solid var(--navy-primary);
  outline-offset: 4px;
}

.globe-canvas {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.globe-live .globe-canvas {
  display: block;
}

/* Pins layer: without JS it degrades to a plain photo grid */
.globe-pins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}

.globe-live .globe-pins {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.globe-live .globe-pin {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.globe-live .globe-pin:not(.globe-pin-on) {
  visibility: hidden;
}

.globe-pin-anchor {
  display: none;
}

.globe-live .globe-pin-anchor {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--navy-border);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.globe-pin:hover .globe-pin-anchor,
.globe-pin-open .globe-pin-anchor {
  transform: translate(-50%, -50%) scale(1.35);
}

.globe-pin-label {
  display: none;
}

.globe-live .globe-pin-label {
  display: block;
  position: absolute;
  left: 12px;
  bottom: 12px;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 5px 8px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.globe-pin:hover .globe-pin-label,
.globe-pin-open .globe-pin-label,
.globe-pin:focus-within .globe-pin-label {
  opacity: 1;
  transform: translateY(0);
}

.globe-pin-cards {
  --card-w: 88px;
  --pitch: 64px;
}

.globe-live .globe-pin-cards {
  position: absolute;
  bottom: 14px;
  left: 10px;
  transform: scale(var(--pin-scale, 1));
  transform-origin: bottom left;
}

.globe-live .globe-card {
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--card-w);
  aspect-ratio: 3 / 2;
  padding: 3px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 26, 105, 0.14);
  cursor: pointer;
  appearance: none;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s ease;
}

.globe-live .globe-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.18s ease;
}

.globe-live .globe-card:hover img,
.globe-live .globe-card:focus-visible img {
  opacity: 0.85;
}

.globe-live .globe-card:focus-visible {
  outline: 2px solid var(--navy-primary);
  outline-offset: 2px;
}

.globe-card { --i: 0; }
.globe-card:nth-child(2) { --i: 1; }
.globe-card:nth-child(3) { --i: 2; }
.globe-card:nth-child(4) { --i: 3; }
.globe-card:nth-child(5) { --i: 4; }

/* stacked resting state: a small deck next to the anchor dot */
.globe-live .globe-card {
  transform: translate(calc(var(--i) * 3px), calc(var(--i) * -3px));
  z-index: calc(5 - var(--i));
}

.globe-live .globe-card:nth-child(n+4) {
  opacity: 0;
  pointer-events: none;
}

/* fan-out on hover / tap / keyboard focus */
.globe-live .globe-pin:hover .globe-card,
.globe-live .globe-pin-open .globe-card,
.globe-live .globe-pin:focus-within .globe-card {
  transform: translateY(calc(var(--i) * var(--pitch) * -1));
  opacity: 1;
  pointer-events: auto;
}

/* no-JS fallback grid keeps the cards as plain thumbnails */
.globe-card {
  padding: 3px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  appearance: none;
}

.globe-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .globe-pin-cards {
    --card-w: 76px;
    --pitch: 56px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.academic-lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}
.academic-lightbox-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 21, 43, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 10000;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════════════════════════════════════ */
.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
  margin: 0;
}

.faq-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  overflow: hidden;
}

.faq-item:hover {
  border-color: var(--border-subtle);
}

.faq-item.open {
  border-color: var(--border-subtle);
  box-shadow: none;
}

.faq-item-header {
  width: 100%;
  padding: 32px 16px 32px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--navy-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  cursor: pointer;
}

.faq-item.open .faq-item-header {
  padding-bottom: 14px;
}

.faq-chevron {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--navy-primary);
}

.faq-item-body {
  display: none;
  padding: 4px 3.5rem 36px 0;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-muted);
  max-width: none;
}

.faq-item.open .faq-item-body {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HEADER (INNER HERO)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-header-banner {
  background: var(--teal);
  color: #ffffff;
  padding: 0;
}

.page-header-inner {
  text-align: left;
  background: var(--navy-primary);
  color: #ffffff;
  padding: 56px 48px 64px;
  position: relative;
  overflow: hidden;
}
.page-header-inner::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -110px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--teal);
  border-radius: 50%;
  pointer-events: none;
}

.page-header-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.page-header-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #ffffff;
  max-width: 46rem;
  position: relative;
  z-index: 1;
}
.page-header-inner .btn-academic-primary {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  background: var(--teal);
  color: var(--navy-primary);
  border-color: var(--teal);
}
.page-header-inner .btn-academic-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy-primary);
}

.purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.purpose-card {
  background: var(--sky);
  overflow: hidden;
}

.purpose-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.purpose-card-media {
  position: relative;
  height: 228px;
  overflow: hidden;
  background: var(--navy-primary);
}

.purpose-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: scale 0.5s ease;
}

.purpose-card-media--symposium img {
  object-position: center 22%;
  transform: scale(1.22);
  transform-origin: center 20%;
}

.purpose-card-media--fellowship img {
  object-position: center 46%;
}

.purpose-card-media--journal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 32px;
  background: linear-gradient(160deg, #001554 0%, #001A69 100%);
}

.purpose-card-media--journal img {
  width: auto;
  height: 100%;
  max-width: 72%;
  object-fit: contain;
  object-position: center;
}

.purpose-card:hover .purpose-card-media img {
  scale: 1.02;
}

.purpose-card-kicker {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  background: var(--teal);
  color: var(--navy-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 12px;
}

.purpose-card-body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.purpose-card-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy-primary);
  line-height: 1.3;
  margin-bottom: 10px;
}

.purpose-card-body p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-body);
}

@media (hover: hover) and (pointer: fine) {
  .purpose-card:hover h3 {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}
.purpose-card:focus-within h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}

.domain-card {
  cursor: pointer;
  outline: none;
}

.domain-card:focus-visible {
  outline: 2px solid var(--navy-primary);
  outline-offset: 3px;
}

.domain-card-face {
  position: relative;
  overflow: hidden;
  height: 220px;
  color: #ffffff;
}

.domain-card-face::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -56px;
  bottom: -72px;
  background: rgba(8, 201, 196, 0.28);
  border-radius: 46% 54% 48% 52%;
  pointer-events: none;
}

.domain-card-face--engineering {
  background: linear-gradient(160deg, #001554 0%, #001A69 58%, #1c358a 100%);
}
.domain-card-face--life {
  background: linear-gradient(160deg, #007E72 0%, #0a5c70 48%, #001A69 100%);
}
.domain-card-face--physical {
  background: linear-gradient(160deg, #2537C6 0%, #001A69 100%);
}
.domain-card-face--society {
  background: linear-gradient(160deg, #001A69 0%, #007E72 100%);
}

.domain-card-intro,
.domain-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 24px 22px;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.domain-card-body {
  transform: translateY(100%);
  opacity: 0;
}

.domain-card-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.domain-card-title {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  margin: 0;
}

.domain-card-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #ffffff;
}

.domain-card:hover .domain-card-intro,
.domain-card:focus-within .domain-card-intro,
.domain-card.is-open .domain-card-intro {
  transform: translateY(-120%);
  opacity: 0;
}

.domain-card:hover .domain-card-body,
.domain-card:focus-within .domain-card-body,
.domain-card.is-open .domain-card-body {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .domain-card-intro,
  .domain-card-body {
    transition: none;
  }
}

.ethics-split,
.split-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 40px 72px;
  align-items: start;
}

.ethics-intro .section-subtitle,
.split-band .section-subtitle {
  max-width: none;
}

.split-band .action-row {
  margin-top: 24px;
}

.ethics-list,
.rule-list {
  margin: 0;
}

.ethics-item,
.rule-item {
  padding: 24px 0;
  border-top: 1px solid var(--navy-border);
}

.ethics-item:first-child,
.rule-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.ethics-item:last-child,
.rule-item:last-child {
  padding-bottom: 0;
}

.ethics-item dt,
.rule-item dt {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.ethics-item dd,
.rule-item dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
}

@media (max-width: 800px) {
  .ethics-split,
  .split-band {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.cta-band {
  text-align: center;
  background: #ffffff;
}
.cta-band h2 {
  margin-bottom: 12px;
}
.cta-band p {
  max-width: 40rem;
  margin: 0 auto 24px;
  color: var(--text-body);
}
.cta-band .action-row {
  justify-content: center;
}

main p a,
main li a,
main dd a,
.faq-item-body a {
  color: var(--navy-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 1024px) {
  .domain-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .purpose-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .domain-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: #ffffff;
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.5;
  padding-top: 56px;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 64px;
  margin-bottom: 48px;
}

.footer-col-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy-primary);
  margin-bottom: 20px;
  line-height: 2rem;
  position: relative;
  padding-bottom: 0;
}

.footer-col-title::after {
  content: none;
}

.footer-link-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-link-list a {
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.5;
}
.footer-link-list a:hover {
  color: var(--text-body);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0 40px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: #767676;
}

.footer-meta-notes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-sep {
  color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE MEDIA QUERIES (MOBILE BREAKPOINTS)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sage-hero-copy {
    max-width: 72%;
  }
  .horiz-card,
  .horiz-card.is-flip {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .horiz-card.is-flip .horiz-card-media {
    order: 0;
  }
  .horiz-card-media--journal img {
    height: 240px;
  }
  .quick-link-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .page-header-inner {
    padding: 40px 28px;
  }
  
  
  
  .dossier-grid {
    gap: 40px 32px;
  }
  .people-row {
    grid-template-columns: 96px 1fr;
    gap: 16px;
  }
  
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .page-header-inner::after {
    width: 220px;
    height: 220px;
    right: -80px;
  }
}

@media (max-width: 900px) {
  .grade-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .grade-board::-webkit-scrollbar {
    display: none;
  }
  .grade-tile {
    flex: 0 0 min(72vw, 300px);
    width: min(72vw, 300px);
    scroll-snap-align: start;
  }
  .grade-tile.is-open .grade-tile-number {
    font-size: 3.4rem;
    padding-top: 16px;
  }
  .grade-tile.is-open .grade-tile-detail {
    max-height: 240px;
  }
  .grade-tile-detail p {
    font-size: 0.88rem;
    line-height: 1.5;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .nav-menu {
    display: none;
  }
  .header-upper-actions {
    display: none;
  }
  .brand-logo {
    height: 32px;
  }
  .mobile-toggle {
    display: flex;
    flex-shrink: 0;
  }
  .header-spacer {
    height: 68px;
  }
  .sage-hero-inner {
    padding: 36px 24px 44px;
  }
  .sage-hero-copy {
    max-width: 100%;
  }
  .sage-hero-inner::after {
    display: none;
  }
  .sage-hero-title {
    font-size: 2rem;
  }
  .sage-hero-lead {
    font-size: 1.05rem;
  }
  .quick-link-grid {
    grid-template-columns: 1fr;
  }
  .quote-banner-inner {
    padding: 36px 8px 0 0;
    text-align: left;
  }
  .quote-banner-mark {
    position: static;
    font-size: 3.5rem;
    display: block;
    margin-bottom: -8px;
  }
  
  .page-header-inner {
    padding: 32px 20px;
  }
  .page-header-inner::after {
    display: none;
  }
  .page-header-title {
    font-size: 1.75rem;
  }
  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  
  
  
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .dossier-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .people-row {
    grid-template-columns: 96px 1fr;
    gap: 16px;
  }
  .people-name {
    font-size: 1.08rem;
  }
  .grade-board {
    scroll-padding-inline: 20px;
  }
  .grade-tile-number {
    font-size: 4.25rem;
    padding: 22px 20px 0;
  }
  .grade-tile-content {
    padding: 20px 20px 24px;
  }
  
  
  
  
  
  
  .faq-item-header {
    padding: 26px 8px 26px 0;
    font-size: 1.05rem;
    gap: 20px;
  }
  .faq-item.open .faq-item-header {
    padding-bottom: 12px;
  }
  .faq-item-body {
    padding: 4px 0 28px 0;
    font-size: 1rem;
  }
  .faq-controls-bar {
    margin-bottom: 8px;
    padding-bottom: 18px;
  }
  .conf-table th,
  .conf-table td {
    padding: 18px 20px;
  }
  .conf-pagination-bar {
    padding: 20px 0 4px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .news-tab {
    margin-right: 1rem;
    padding: 10px 4px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  .dossier-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Desktop links overflow the bar below this width; the drawer takes over. */
@media (max-width: 1100px) {
  .nav-menu {
    display: none;
  }
  .header-upper-actions {
    display: none;
  }
  .mobile-toggle {
    display: flex;
    flex-shrink: 0;
  }
  .header-lower .nav-container {
    display: none;
  }
  .header-lower {
    border-bottom: 0;
  }
}

/* ── Back To Top Floating Action ── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  background: var(--navy-primary);
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 0;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  box-shadow: none;
}
.back-to-top span {
  display: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--navy-primary);
  border-color: var(--gold);
  color: #ffffff;
  transform: translateY(-2px);
}

.filter-counter-badge {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

/* ── FAQ Controls Bar ── */
.faq-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.btn-text-action {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-primary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: var(--transition-base);
}
.btn-text-action:hover {
  background: var(--navy-subtle);
  color: var(--navy-deep);
}

/* ── Citation Generator & BibTeX Modal ── */
.citation-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10002;
  align-items: center;
  justify-content: center;
}
.citation-modal.active {
  display: flex;
}
.citation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 21, 43, 0.88);
  backdrop-filter: blur(6px);
}
.citation-dialog {
  position: relative;
  z-index: 10003;
  width: 92%;
  max-width: 660px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  padding: 32px;
}
.citation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.citation-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-deep);
}
.citation-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}
.citation-close:hover {
  color: var(--navy-deep);
}
.citation-formatted {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 14px 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 16px;
}
.bibtex-code-block {
  background: var(--navy-dark);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  padding: 16px;
  border-radius: var(--radius-xs);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 18px;
}
.citation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.btn-copy-citation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-primary);
  color: #ffffff;
  border: 1px solid var(--navy-primary);
  padding: 9px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-base);
}
.btn-copy-citation:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}
.copy-feedback {
  font-size: 0.78rem;
  color: #107c41;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 4px;
}

/* ── Lightbox Next/Prev Navigation ── */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 30, 63, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  transition: var(--transition-base);
  z-index: 10001;
}
.lightbox-nav-btn:hover {
  background: var(--navy-primary);
  border-color: var(--gold);
}
.lightbox-prev {
  left: -56px;
}
.lightbox-next {
  right: -56px;
}
@media (max-width: 768px) {
  .lightbox-prev {
    left: 12px;
    top: auto;
    bottom: 12px;
    transform: none;
  }
  .lightbox-next {
    right: 12px;
    top: auto;
    bottom: 12px;
    transform: none;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    font-size: 0.68rem;
  }
}

/* ── Conferences Paginated Table ── */
.conf-table-container {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}
.conf-table {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.98rem;
  text-align: left;
}
.conf-table th {
  background: var(--navy-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 20px 28px;
  letter-spacing: 0;
  font-size: 0.92rem;
  text-transform: none;
  border-bottom: 0;
  white-space: nowrap;
  vertical-align: middle;
  box-sizing: border-box;
}
.conf-table td {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: middle;
  box-sizing: border-box;
}
.conf-table tbody tr {
  cursor: pointer;
  transition: background var(--transition-base);
}
.conf-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}
.conf-table tbody tr:hover td {
  background: var(--sky);
}
.conf-table tbody tr:hover .conf-title-link {
  color: var(--navy-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.conf-table tbody tr:focus-visible {
  outline: 2px solid var(--navy-primary);
  outline-offset: -2px;
}
.conf-table tbody tr:last-child td {
  border-bottom: 0;
}
.conf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  width: 108px;
  box-sizing: border-box;
  background: var(--navy-subtle);
  color: var(--navy-primary);
  border: 1px solid var(--navy-border);
  text-align: center;
}
.conf-title-cell {
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.6;
  word-break: normal;
}
.conf-title-link {
  color: var(--navy-deep);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-base), text-decoration var(--transition-base);
}
.conf-title-link:hover {
  color: var(--navy-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.conf-date-cell {
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
}
.conf-loc-cell {
  color: var(--text-muted);
  white-space: nowrap;
  vertical-align: middle;
}
/* ── Conference Pagination Bar ── */
.conf-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px 8px 8px;
}
.conf-pagination-status {
  font-size: 0.84rem;
  color: var(--text-muted);
}
.conf-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.conf-page-btn {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: var(--transition-base);
}
.conf-page-btn:hover:not(:disabled) {
  background: var(--navy-primary);
  color: #ffffff;
  border-color: var(--navy-primary);
}
.conf-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.conf-page-numbers {
  display: flex;
  gap: 6px;
}
.conf-page-num {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
}
.conf-page-num:hover {
  background: var(--navy-subtle);
  border-color: var(--navy-primary);
  color: var(--navy-primary);
}
.conf-page-num.active {
  background: var(--navy-primary);
  border-color: var(--navy-primary);
  color: #ffffff;
  font-weight: 700;
}

/* Narrow viewports: the 4-column conference table stops fitting long before
   768px, and the fixed 168/180/230px colgroup widths plus table-layout: fixed
   would squeeze the title column to a few characters per line. Below this
   width the row is restacked as a card: badge + title on top, Dates and
   Location as labelled rows.

   Keep this block AFTER the base .conf-table rules above: an earlier media
   block loses to them on the cascade (same specificity, source order), which
   silently leaves min-width: 860px and table-layout: fixed in force. */
@media (max-width: 900px) {
  .conf-table-container {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow-x: visible;
  }
  .conf-table,
  .conf-table tbody,
  .conf-table tr,
  .conf-table td {
    display: block;
    width: auto;
  }
  .conf-table {
    min-width: 0;
    table-layout: auto;
    font-size: 0.95rem;
  }
  .conf-table colgroup,
  .conf-table thead {
    display: none;
  }
  .conf-table tbody tr {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 18px 20px 16px;
    margin-bottom: 14px;
  }
  .conf-table tbody tr:last-child {
    margin-bottom: 0;
  }
  /* Zebra striping and the last-row border assume table cells, not cards */
  .conf-table tbody tr:nth-child(even) td {
    background: transparent;
  }
  .conf-table tbody tr:hover td {
    background: transparent;
  }
  .conf-table tbody tr:last-child td {
    border-bottom: 0;
  }
  .conf-table td {
    padding: 0;
    border-bottom: 0;
    color: var(--text-body);
  }
  .conf-table td.conf-title-cell {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }
  /* Dates / Location keep their cell classes, so the label comes from a
     pseudo-element instead of extra markup */
  .conf-table td.conf-date-cell,
  .conf-table td.conf-loc-cell {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid var(--border-subtle);
    font-weight: 500;
    white-space: normal;
  }
  .conf-table td.conf-date-cell::before,
  .conf-table td.conf-loc-cell::before {
    content: "Dates";
    flex: 0 0 84px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .conf-table td.conf-loc-cell::before {
    content: "Location";
  }
  .conf-table td:first-child {
    margin-bottom: 8px;
  }
  .conf-badge {
    width: auto;
    padding: 5px 12px;
  }
  .conf-pagination-bar {
    padding: 24px 0 4px;
  }
}

/* ── Comparison Matrix Table ── */
.matrix-scroll {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}
.matrix-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.matrix-table th {
  background: var(--navy-deep);
  color: #ffffff;
  padding: 14px 18px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gold);
}
.matrix-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.matrix-table tr:nth-child(even) td {
  background: #fbfcfe;
}
.check-yes {
  color: #166534;
  font-weight: 800;
  font-size: 1.1rem;
}
.check-no {
  color: #94a3b8;
  font-size: 1.1rem;
}

.conf-sort {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.nav-item:focus-visible,
.mobile-nav-item:focus-visible,
.btn-academic-primary:focus-visible,
.btn-academic-outline:focus-visible,
.faq-item-header:focus-visible,
.globe-card:focus-visible,
.conf-sort:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

/* ── Print Stylesheet (For Academic Evaluation, Visas & Dossiers) ── */
@media print {
  .site-header,
.site-footer,
.back-to-top,
.mobile-drawer,
.faq-controls-bar,
.academic-lightbox-modal,
.citation-modal{
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }
  .page-header-banner {
    background: none !important;
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
    padding: 20px 0 !important;
  }
  .page-header-inner {
    background: none !important;
    color: #000000 !important;
    padding: 0 !important;
  }
  .page-header-inner::after {
    display: none !important;
  }
  .page-header-title {
    color: #000000 !important;
  }
  .page-header-desc {
    color: #333333 !important;
  }
  .section {
    padding: 24px 0 !important;
  }
  .grade-tile{
    border: 1px solid #999999 !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    margin-bottom: 16px !important;
  }
}

