@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #18353a;
  --ink-soft: #405a5e;
  --muted: #53696b;
  --faint: #617677;
  --brand: #0b6579;
  --brand-deep: #063d4b;
  --brand-pale: #e8f0ed;
  --gold: #d9a342;
  --paper: #fffdf7;
  --paper-deep: #f2eee3;
  --ground: #f7f5ee;
  --line: #d8d2c3;
  --line-strong: #b8b09e;
  --sans: "Source Sans 3", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --focus: 0 0 0 3px rgba(11, 101, 121, .27);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  scrollbar-color: #a4b8b5 var(--ground);
  -webkit-text-size-adjust: 100%;
}

::selection {
  color: var(--brand-deep);
  background: #f3dda8;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Publication header */

.site-header {
  color: #fff;
  background: var(--brand-deep);
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  width: 100%;
  max-width: 1180px;
  min-height: 76px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 17px;
}

.logo {
  display: block;
  width: auto;
  height: 43px;
  flex: none;
}

.header-text { min-width: 0; }

.brand-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .015em;
}

.brand-title span {
  padding: 0 5px;
  color: #f1c86f;
}

.publication-note {
  margin: 0 0 0 auto;
  color: #e4eeee;
  font-size: 13px;
  letter-spacing: .025em;
}

/* Lookup page */

.page {
  width: 100%;
  max-width: 1180px;
  flex: 1;
  margin: 0 auto;
  padding: 56px 32px 78px;
}

.intro {
  max-width: 760px;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 11px;
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.03;
  text-wrap: balance;
}

.lede {
  max-width: 66ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

/* Search */

.search {
  position: relative;
  max-width: 760px;
  margin-top: 30px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.search input {
  width: 100%;
  min-height: 58px;
  padding: 14px 54px 14px 48px;
  appearance: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(24, 53, 58, .05);
  caret-color: var(--brand);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.search input::placeholder {
  color: #5c7071;
  opacity: 1;
}

.search input:hover { border-color: var(--brand); }

.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.search input::-webkit-search-cancel-button { appearance: none; }

.search-icon {
  position: absolute;
  top: 41px;
  left: 16px;
  width: 19px;
  height: 19px;
  color: var(--brand);
  pointer-events: none;
}

.clear-search {
  position: absolute;
  top: 37px;
  right: 9px;
  width: 34px;
  height: 34px;
  padding: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}

.clear-search:hover { color: var(--brand-deep); background: var(--brand-pale); }
.clear-search:focus-visible { outline: none; box-shadow: var(--focus); }
.clear-search svg { display: block; width: 16px; height: 16px; }

/* Index and loading states */

.result-count {
  margin: 21px 0 30px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.status {
  min-height: 64px;
  margin-bottom: 25px;
  padding: 17px 19px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.spinner {
  width: 17px;
  height: 17px;
  flex: none;
  border: 2px solid #c8d7d4;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.notice, .empty {
  max-width: 760px;
  padding: 22px 23px;
  color: var(--ink-soft);
  background: #fffaf0;
  border: 1px solid #d9c79f;
  border-radius: 4px;
}

.notice { margin: 18px 0; }
.empty p { margin-bottom: 0; }
.empty-title { color: var(--ink); font-weight: 600; }
.empty-text { margin-top: 5px; line-height: 1.55; }

.btn-ghost {
  min-height: 42px;
  margin-top: 16px;
  padding: 8px 14px;
  color: var(--brand-deep);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.btn-ghost:hover { background: var(--brand-pale); border-color: var(--brand); }
.btn-ghost:focus-visible { outline: none; box-shadow: var(--focus); }

.index-heading {
  margin: 0 0 13px;
  padding-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.index-heading h2 {
  margin: 0;
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.index-heading span {
  color: var(--muted);
  font-size: 13px;
}

.institution-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.institution-item {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.institution-item:last-child { border-bottom: 0; }

.school-card {
  width: 100%;
  min-height: 76px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.school-card:hover { background: #f0f2e9; }
.school-card:active { background: #e6eee9; }
.school-card:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--brand);
  outline-offset: -3px;
}

.school-name {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.005em;
}

.school-title-group {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.school-title { min-width: 0; }

.school-location {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
}

.school-location svg {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--brand);
}

.school-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.institution-icon {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  flex: none;
  color: var(--brand);
}

.school-foot {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.school-facts {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.count-pill {
  min-height: 29px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--brand-deep);
  background: transparent;
  border: 1px solid #c8d6d1;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.count-pill {
  border-color: #d6c28f;
  font-variant-numeric: tabular-nums;
}

.card-arrow {
  width: 17px;
  height: 17px;
  flex: none;
  color: #6c8585;
  transition: color .15s ease, transform .15s ease;
}

.school-card:hover .card-arrow {
  color: var(--brand);
  transform: translateX(2px);
}

/* Participant register */

.back {
  min-height: 40px;
  margin: 0 0 15px -8px;
  padding: 7px 10px 7px 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-deep);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease;
}

.back:hover { background: var(--brand-pale); }
.back:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.back svg { width: 17px; height: 17px; }

.result-head {
  padding: 25px 27px 21px;
  background: #edf1e9;
  border-top: 1px solid var(--brand);
  border-bottom: 1px solid var(--line-strong);
}

.result-head h2 {
  max-width: 820px;
  margin: 0;
  color: var(--brand-deep);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.7vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.result-head h2:focus { outline: none; }

.result-meta {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.table {
  margin-top: 20px;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.table-head, .entry {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, 34%);
  align-items: baseline;
  gap: 16px;
  padding: 13px 20px;
}

.table-head {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #40595c;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.table-head span:last-child { text-align: right; }

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  min-height: 53px;
  border-bottom: 1px solid #e8e3d8;
}

.entry:last-child { border-bottom: 0; }
.entry:nth-child(even) { background: #faf8f1; }

.entry-index {
  color: var(--faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.entry-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.entry-name {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.certificate-button {
  min-height: 30px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-deep);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.certificate-button:hover { background: var(--brand-pale); border-color: var(--brand); }
.certificate-button:focus-visible { outline: none; box-shadow: var(--focus); }

.certificate-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.entry-role {
  color: var(--ink-soft);
  font-size: 14px;
  text-align: right;
  overflow-wrap: anywhere;
}

.entry-role.is-empty { color: var(--faint); }

.result-note {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Foundation credit */

.site-footer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 32px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  color: var(--muted);
  border-top: 1px solid var(--line-strong);
  font-size: 13px;
}

.site-footer p { margin: 0; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.foundation-logo {
  display: block;
  width: auto;
  height: 42px;
  object-fit: contain;
}

.footer-brand-text {
  display: grid;
  gap: 1px;
}

.footer-brand-title {
  color: var(--ink);
  font-weight: 600;
}

.footer-brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.footer-note { color: var(--muted); }

@media (min-width: 960px) {
  .institution-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .institution-item:nth-child(odd) { border-right: 1px solid var(--line); }
  .school-card { min-height: 82px; }
}

@media (max-width: 700px) {
  .header-inner {
    min-height: 66px;
    padding: 11px 18px;
    gap: 12px;
  }

  .logo { height: 37px; }
  .brand-title { font-size: 14px; }
  .publication-note { display: none; }

  .page { padding: 37px 18px 52px; }
  h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .lede { font-size: 15.5px; }
  .search { margin-top: 24px; }
  .search input { min-height: 54px; font-size: 15px; }
  .search-icon { top: 39px; }
  .clear-search { top: 35px; }
  .result-count { margin: 18px 0 25px; }
  .index-heading h2 { font-size: 23px; }
  .index-heading span { max-width: 130px; text-align: right; }

  .school-card {
    min-height: 82px;
    padding: 12px 11px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .school-name { gap: 8px; font-size: 15px; }
  .institution-icon { width: 17px; height: 17px; }
  .school-foot { gap: 6px; }
  .school-facts { flex-wrap: wrap; gap: 5px; }
  .count-pill { min-height: 26px; padding: 3px 6px; font-size: 11px; }
  .school-location { font-size: 11.5px; }
  .school-location svg { width: 12px; height: 12px; }
  .card-arrow { width: 15px; height: 15px; }

  .result-head { padding: 20px 17px 18px; }
  .result-head h2 { font-size: 1.8rem; }
  .table { margin-top: 15px; }
  .table-head { display: none; }
  .entry {
    min-height: 0;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 3px 10px;
    padding: 12px 14px;
  }

  .entry-role {
    grid-column: 2;
    text-align: left;
    font-size: 13px;
  }

  .site-footer { padding: 17px 18px 25px; }
  .foundation-logo { height: 38px; }
}

@media (max-width: 390px) {
  .school-card { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .school-foot { padding-left: 25px; justify-content: space-between; }
  .school-facts { justify-content: flex-start; }
  .index-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .index-heading span { max-width: none; text-align: left; }
}

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

@media print {
  body { background: #fff; }
  .site-header { color: var(--ink); background: #fff; border-bottom: 2px solid var(--brand); }
  .brand-title, .brand-title span { color: var(--ink); }
  .publication-note { color: var(--muted); }
  .search, .result-count, .index-heading, .back, .site-footer, .result-note, .intro { display: none !important; }
  .page { max-width: none; padding: 12px 0; }
  .result-head { background: #fff; }
  .table { margin-top: 12px; }
  .entry { break-inside: avoid; }
}
