/* Shared program heroes and compact enquiries. */
main .program-hero {
  padding: 145px 6.2% 44px;
  background: var(--forest);
  color: var(--cream);
}
.program-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: 1440px;
  margin: 0 auto;
}
.program-hero-copy { min-width: 0; }
.program-hero-copy .back-link { margin-bottom: 26px; }
.program-hero-copy .eyebrow { display: block; color: var(--sage); line-height: 1.6; }
main .program-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(42px, 5.5vw, 80px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 18px 0;
  overflow-wrap: break-word;
}
.program-hero h1 em { color: var(--amber); font-weight: 400; }
main .program-hero-copy p { font-size: 16px; line-height: 1.7; max-width: 440px; color: #fcfbf7b3; margin: 0; }
.program-hero-link { display: inline-flex; gap: 24px; align-items: center; margin-top: 25px; padding: 8px 0; border-bottom: 1px solid #fcfbf75c; font-size: 13px; color: var(--cream); }
.program-hero-link:hover { color: var(--amber); border-color: var(--amber); }
.program-hero-image { position: relative; margin: 0; border-radius: 3px 48px 3px 3px; overflow: hidden; }
.program-hero-image img { display: block; width: 100%; height: clamp(270px, 27vw, 390px); object-fit: cover; }
.program-hero-image figcaption { position: absolute; inset: auto 0 0; padding: 45px 24px 20px; background: linear-gradient(transparent, #082c2ddd); display: flex; justify-content: space-between; gap: 15px; color: #fff; font-size: 18px; font-family: 'DM Serif Display', serif; }
.program-hero-image figcaption span { font-family: 'Manrope', sans-serif; font-size: 11px; align-self: center; letter-spacing: 0.08em; text-transform: uppercase; }
.program-hero .quick-facts-banner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; max-width: 1440px; margin: 32px auto 0; padding-top: 22px; }
.program-hero .fact strong { font-size: 14px; line-height: 1.6; }
.program-hero .fact span { font-size: 10px; }
.program-contact { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 6.2%; background: var(--cream); border-top: 1px solid var(--line); }
.program-contact p { margin: 0; font-size: 15px; color: var(--muted); }
.program-contact a { display: inline-flex; gap: 24px; align-items: center; padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--forest); border-bottom: 1px solid var(--forest); }
.program-contact a:hover { color: var(--ink); }
.program-contact a:focus-visible, .program-hero-link:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
@media (max-width: 760px) {
  main .program-hero { padding: 120px 6% 30px; }
  .program-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  main .program-hero h1 { font-size: clamp(40px, 9vw, 64px); }
  .program-hero-image img { height: 240px; }
  .program-hero .quick-facts-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
  .program-contact { padding: 22px 6%; flex-wrap: wrap; gap: 8px 24px; }
}

/* Student guides: source attribution, readable tables and mobile section navigation. */
.test-content-area { background: var(--ivory); }
.test-main-content { min-width: 0; }
.test-main-content .content-section { scroll-margin-top: 110px; }
.test-main-content .guide-source { font-size: 15.5px; line-height: 1.7; color: var(--muted); margin-top: 15px; }
.guide-source a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.guide-source a:hover { color: var(--ink); }
.guide-list { padding-left: 22px; margin: 20px 0; }
.guide-list li { margin-bottom: 12px; line-height: 1.8; font-size: 16px; }
.guide-note { margin: 22px 0; padding: 20px 24px; background: var(--cream); border-left: 3px solid var(--amber); border-radius: 4px; }
.guide-note > strong { font-size: 15px; color: var(--forest); }
.test-main-content .guide-note p { font-size: 14px; margin: 10px 0 0; }
.guide-table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; }
.guide-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.7; }
.guide-table caption { text-align: left; padding: 16px 18px; font-weight: 600; color: var(--forest); background: var(--cream); }
.guide-table th, .guide-table td { padding: 13px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.guide-table thead { background: #15515308; }
.guide-table tbody th { font-weight: 600; }
.test-main-content .link-box { gap: 15px; overflow-wrap: anywhere; }
.test-main-content .faq-list details { padding: 18px 0; border-bottom: 1px solid var(--line); }
.test-main-content .faq-list summary { cursor: pointer; font-size: 16px; line-height: 1.6; }
.test-main-content .faq-list p { margin: 14px 0 0; }
.test-content-area a:focus-visible, .test-content-area summary:focus-visible, .guide-table-wrap:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
@media (max-width: 900px) {
  .test-content-area .test-toc { display: block; }
  .test-content-area .toc-sticky { position: static; padding: 0; }
  .test-content-area #toc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .test-content-area #toc-nav a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 50px; font-size: 12px; }
  .test-content-area .test-layout { gap: 30px; }
  .guide-table th, .guide-table td { padding: 11px 12px; font-size: 12px; }
  .test-main-content .page-nav { gap: 20px; }
}
.test-choice-guide { margin: 26px 0 32px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); }
.test-choice-guide h3 { font: 400 28px/1.3 'DM Serif Display', Georgia, serif; color: var(--forest); margin: 0 0 16px; }
.test-choice-guide p { font-size: 14px; line-height: 1.8; margin: 10px 0; }
.test-choice-guide .guide-source { font-size: 15.5px; color: var(--muted); }

/* Direct navigation between every test guide. */
.test-page-navigation { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.test-page-navigation .eyebrow { display: block; margin-bottom: 16px; color: var(--muted); }
.test-page-links { display: flex; flex-wrap: wrap; gap: 10px; }
.test-page-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 50px; font-size: 14px; font-weight: 600; color: var(--forest); background: var(--cream); }
.test-page-links a:hover { border-color: var(--forest); background: var(--sand); }
.test-page-links a[aria-current="page"] { color: var(--cream); background: var(--forest); border-color: var(--forest); }
@media (max-width: 540px) {
  .test-page-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-page-links a { padding: 10px 12px; font-size: 13px; }
}

/* Institution photographs retain clear location and source credits. */
.program-hero-image.institution-photo img { object-position: center 65%; }
.institution-caption { display: block !important; line-height: 1.5; }
.institution-caption small { display: block; margin-top: 6px; font-size: 10px; opacity: .8; }
.institution-caption a { text-decoration: underline; text-underline-offset: 2px; }
.program-image .program-photo-credit { font: 400 10px/1.5 'Manrope', Arial, sans-serif; color: var(--muted); margin: 10px 0 0; }
.program-photo-credit a { text-decoration: underline; }
.program-hero-image .institution-caption {
  position: static;
  display: block;
  padding: 12px 16px;
  background: #0d403c;
  font: 400 13px/1.5 'Manrope', Arial, sans-serif;
}
.program-hero-image .institution-caption small {
  font: 400 10px/1.5 'Manrope', Arial, sans-serif;
}
.program-section .program-image-with-credit { display: flex; flex-direction: column; }
.program-section .program-image-with-credit img { min-height: 0; height: 0; flex: 1; }
.program-section .program-image-with-credit .program-photo-credit { flex-shrink: 0; padding: 9px 12px; margin: 0; background: var(--cream); }

/* Official resource buttons match the guide paragraph size. */
.test-main-content #official-resources .link-box { font-size: 16px; line-height: 1.7; }
.program-hero-image .program-hero-caption-right { justify-content: flex-end; }

/* Stack the overview heading above its longer introduction on phones. */
@media (max-width: 760px) {
  #tests > .section-heading {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px !important;
  }
  #tests > .section-heading h2 { margin: 0; }
  #tests > .section-heading p { margin: 0 !important; }
}
