/* Institution references. Load after field.css.
   Only reference-specific components are affected; official logo colors are preserved. */

body.field-site .references-intro.page-intro {
  padding-top: 150px;
  padding-bottom: 58px;
}

body.field-site .references-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, .65fr);
  align-items: end;
  gap: 85px;
}

body.field-site .references-intro-grid > div { min-width: 0; }
body.field-site .references-intro-grid > div > .eyebrow { margin-bottom: 18px; }
body.field-site .references-intro-grid h1 {
  font-size: clamp(44px, 4.4vw, 60px);
  line-height: 1.12;
}
body.field-site .references-intro-grid .intro-copy { max-width: 620px; }

body.field-site .references-intro-note {
  max-width: 290px;
  padding: 3px 0 3px 24px;
  border-left: 1px solid var(--line);
}
body.field-site .references-intro-note .eyebrow {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .025em;
}
body.field-site .references-intro-note > p:not(.eyebrow) {
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* Equal-height institution cards, with separate logo and descriptive areas. */
body.field-site .references-section { padding-bottom: 20px; }
body.field-site .references-section .reference-grid:not(:empty) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 26px;
  padding: 0;
}
body.field-site .references-section .reference-card {
  display: grid;
  grid-template-rows: 210px minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: none;
  overflow: hidden;
  transition: border-color .2s ease;
}
body.field-site .references-section .reference-card:hover {
  border-color: var(--muted);
  box-shadow: none;
}
body.field-site .references-section .reference-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 30px;
  background: #fff;
  border-bottom: 1px solid rgba(30, 40, 35, .13);
}
body.field-site .references-section .reference-logo-box img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 136px;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
  filter: none;
  opacity: 1;
  transform: none;
}
body.field-site .references-section .reference-kgm .reference-logo-box img {
  width: 150px;
  height: 150px;
}
body.field-site .references-section .reference-dsi .reference-logo-box img {
  width: 280px;
  height: 126px;
}
body.field-site .references-section .reference-tcdd .reference-logo-box img {
  width: 174px;
  height: 154px;
}
body.field-site .references-section .reference-ilbank .reference-logo-box img {
  width: 310px;
  height: auto;
  aspect-ratio: 3.2 / 1;
  object-fit: cover;
}
body.field-site .references-section .reference-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 215px;
  padding: 27px 30px 25px;
  background: var(--bg);
}
body.field-site .references-section .reference-code {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1.5;
  color: var(--red);
}
body.field-site .references-section .reference-name {
  width: 100%;
  min-height: 2.6em;
  margin: 13px 0 0;
  font-family: var(--font);
  font-size: clamp(23px, 2.05vw, 29px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.025em;
  text-transform: none;
  color: var(--ink);
  overflow-wrap: break-word;
}
body.field-site .references-section .reference-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 12px 20px;
  margin-top: auto;
  padding-top: 26px;
  font-size: 11px;
  line-height: 1.6;
}
body.field-site .references-section .reference-sector { color: var(--muted); }
body.field-site .references-section .reference-website {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
}
body.field-site .references-section .reference-website:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* A quieter four-institution strip on the home page. */
body.field-site .home-references {
  padding-block: 65px;
  border-top: 1px solid var(--line);
}
body.field-site .home-references .field-section-head { margin-bottom: 30px; }
body.field-site .home-references .field-section-head h2 {
  font-size: clamp(29px, 2.75vw, 38px);
  line-height: 1.25;
}
body.field-site .home-references .reference-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  border: 1px solid var(--line);
}
body.field-site .home-references .reference-mark {
  display: grid;
  grid-template-rows: 150px minmax(76px, auto);
  min-width: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  text-align: center;
}
body.field-site .home-references .reference-mark:last-child { border-right: 0; }
body.field-site .home-references .reference-mark > img {
  align-self: center;
  justify-self: center;
  width: calc(100% - 48px);
  max-width: 175px;
  height: 106px;
  margin: 0;
  object-fit: contain;
  object-position: center;
  filter: none;
  opacity: 1;
  transform: none;
}
body.field-site .home-references .reference-mark.reference-kgm > img {
  width: 108px;
  max-width: calc(100% - 32px);
  height: 108px;
}
body.field-site .home-references .reference-mark.reference-dsi > img {
  width: calc(100% - 44px);
  max-width: 190px;
}
body.field-site .home-references .reference-mark.reference-tcdd > img {
  width: 124px;
  max-width: calc(100% - 32px);
  height: 110px;
}
/* The original ILBANK image has large centered top/bottom margins.
   This proportional viewport removes empty space without modifying the logo file. */
body.field-site .home-references .reference-mark.reference-ilbank > img {
  width: calc(100% - 40px);
  max-width: 205px;
  height: auto;
  aspect-ratio: 3.2 / 1;
  object-fit: cover;
}
body.field-site .home-references .reference-mark > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-wrap: break-word;
  transition: color .18s ease, background-color .18s ease;
}
body.field-site .home-references .reference-mark:hover > span {
  background: var(--surface);
  color: var(--ink);
}
body.field-site .home-references .reference-mark:focus-visible {
  outline-offset: -3px;
  position: relative;
  z-index: 1;
}

@media (max-width: 1000px) {
  body.field-site .references-intro-grid { gap: 45px; grid-template-columns: minmax(0, 1.35fr) minmax(210px, .65fr); }
  body.field-site .references-section .reference-card { grid-template-rows: 195px minmax(0, 1fr); }
  body.field-site .references-section .reference-body { padding: 25px; }
  body.field-site .references-section .reference-name { font-size: 25px; }
}

@media (max-width: 800px) {
  body.field-site .references-intro.page-intro { padding-top: 130px; padding-bottom: 45px; }
  body.field-site .references-intro-grid { display: block; }
  body.field-site .references-intro-grid h1 { font-size: 48px; }
  body.field-site .references-intro-note {
    max-width: 580px;
    padding: 23px 0 0;
    margin-top: 30px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  body.field-site .references-intro-note > p:not(.eyebrow) { margin-top: 8px; }
  body.field-site .references-section .reference-grid:not(:empty) { gap: 22px; }
  body.field-site .references-section .reference-body { min-height: 225px; padding: 24px; }
  body.field-site .references-section .reference-name { font-size: 23px; }
  body.field-site .references-section .reference-meta { gap: 10px 18px; }
  body.field-site .home-references { padding-block: 55px; }
  body.field-site .home-references .reference-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.field-site .home-references .reference-mark:nth-child(2n) { border-right: 0; }
  body.field-site .home-references .reference-mark:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 600px) {
  body.field-site .references-intro.page-intro { padding-top: 113px; padding-bottom: 35px; }
  body.field-site .references-intro-grid h1 { font-size: 39px; }
  body.field-site .references-intro-grid > div > .eyebrow { margin-bottom: 16px; }
  body.field-site .references-intro-note { margin-top: 26px; padding-top: 20px; }
  body.field-site .references-intro-note > p:not(.eyebrow) { font-size: 12px; }
  body.field-site .references-section { padding-bottom: 8px; }
  body.field-site .references-section .reference-grid:not(:empty) { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 22px; }
  body.field-site .references-section .reference-card { grid-template-rows: 188px minmax(0, 1fr); }
  body.field-site .references-section .reference-logo-box { padding: 26px; }
  body.field-site .references-section .reference-body { min-height: 203px; padding: 23px 22px; }
  body.field-site .references-section .reference-code { font-size: 10px; }
  body.field-site .references-section .reference-name { font-size: 23px; min-height: 2.6em; margin-top: 12px; }
  body.field-site .references-section .reference-meta { padding-top: 23px; font-size: 11px; }
  body.field-site .references-section .reference-website { font-size: 11px; }
  body.field-site .home-references { padding-block: 45px; }
  body.field-site .home-references .field-section-head { margin-bottom: 25px; }
  body.field-site .home-references .field-section-head h2 { font-size: 29px; }
  body.field-site .home-references .reference-mark { grid-template-rows: 126px minmax(84px, auto); }
  body.field-site .home-references .reference-mark > img { width: calc(100% - 32px); height: 91px; }
  body.field-site .home-references .reference-mark.reference-kgm > img { width: 98px; height: 98px; }
  body.field-site .home-references .reference-mark.reference-tcdd > img { width: 116px; height: 104px; }
  body.field-site .home-references .reference-mark:is(.reference-dsi, .reference-ilbank) > img { width: calc(100% - 28px); }
  body.field-site .home-references .reference-mark > span { padding: 14px 12px; font-size: 11px; line-height: 1.55; }
}

@media (prefers-reduced-motion: reduce) {
  body.field-site .references-section .reference-card,
  body.field-site .references-section .reference-website,
  body.field-site .home-references .reference-mark > span { transition: none; }
}
