:root {
  --bg: #f7f3eb;
  --surface: #ffffff;
  --text: #1f1f1b;
  --muted: #4f4f4b;
  --border: #d9d3c8;
  --accent: #2f4b70;
  --accent-soft: #dbe4ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}

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

.brand img {
  height: 48px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand .name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.brand .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  padding: 4px 8px;
  border-radius: 4px;
}

.nav-links a:hover,
.nav-links a:focus {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-links a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.page-title {
  font-size: 28px;
  margin: 0 0 12px;
}

.legacy-marker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lede {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 720px;
}

.section {
  margin: 32px 0;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 22px;
}

.list-inline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

main ul {
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.list-inline li {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.list-inline li > a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.list-inline li > a span:first-child {
  font-weight: 500;
}

.list-inline .label {
  color: var(--muted);
  font-size: 14px;
}

.archive-year {
  margin: 32px 0 24px;
}

.archive-year h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.archive-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-note {
  color: var(--muted);
  font-size: 13px;
}

#prg-initiatives-list li {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.table-wrap {
  overflow-x: auto;
}

table.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

table.simple-table th,
table.simple-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

table.simple-table th {
  font-family: "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-weight: 600;
}

table.simple-table tr:hover td {
  background: var(--accent-soft);
}

.input-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 15px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.footer {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.footer-row {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  flex: 1 1 auto;
}

.footer-address {
  flex: 0 0 auto;
}

.footer-email {
  flex: 0 0 auto;
  white-space: nowrap;
}

footer a {
  color: var(--muted);
}

small.muted {
  color: var(--muted);
}

/* Reusable figure/image utilities */
.figure-top-gap {
  margin: 18px 0 0;
}

.figure-centered {
  margin: 12px auto 16px;
  text-align: center;
}

.figure-logo {
  margin: 20px 0;
  text-align: center;
}

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

.img-rounded {
  border-radius: 6px;
}

.img-centered {
  margin: 0 auto;
}

.img-max-360 {
  max-width: 360px;
}

.img-logo-sm {
  max-width: 200px;
  display: inline-block;
}

/* COVIDEA member table */
.member-table {
  width: 100%;
  border-collapse: collapse;
  line-height: 1.25;
}

.member-table td {
  padding: 4px 8px;
  vertical-align: top;
}

.member-table col:first-child {
  width: 25%;
}

.member-table col:last-child {
  width: 75%;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

.profile-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  align-items: start;
  align-self: start;
  gap: 10px;
}

.profile-card h3 {
  margin: 0;
  font-size: 18px;
}

.profile-photo {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.people-table {
  width: 100%;
  border-collapse: collapse;
}

.people-table tr + tr td {
  border-top: 1px solid var(--border);
}

.people-table td {
  padding: 10px 4px;
  vertical-align: top;
}

.people-table.three-cols td {
  width: 33.333%;
}

.people-table.four-cols td {
  width: 25%;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
}

.person-name {
  margin: 0;
  font-weight: 600;
}

.person-role {
  margin: 2px 0 0;
  color: var(--muted);
}

@media (max-width: 700px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-inline li {
    flex-direction: column;
    gap: 6px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ── Cube index ── */
.cube-index {
  max-width: 960px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.cube-index__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.cube-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cube-index__item {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.cube-index__name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.cube-index__name:hover {
  text-decoration: underline;
  color: var(--accent, #0066cc);
}

.cube-index__sides {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cube-index__sides li a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.cube-index__sides li a:hover {
  color: var(--accent, #0066cc);
  text-decoration: underline;
}

/* ── Social links ── */
.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.social-links li a:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.social-links li a img {
  display: block;
  flex-shrink: 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Featured external reference cards ── */
.feat-refs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 1.75rem;
}

.feat-ref-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.feat-ref-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  text-decoration: none;
}

.feat-ref-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 8px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.feat-ref-favicon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  flex-shrink: 0;
}

.feat-ref-domain {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feat-ref-body {
  padding: 10px 12px;
  flex: 1;
}

.feat-ref-org {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.feat-ref-cred {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.4;
}

.feat-ref-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.feat-ref-footer {
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  text-align: right;
}

.feat-refs-label {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 700px) {
  .feat-refs {
    grid-template-columns: 1fr;
  }
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 16px 0 24px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
}

.video-pair {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.video-pair-item {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 680px) {
  .video-pair {
    flex-direction: column;
  }
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 1.5rem 0;
}

.pub-type {
  font-size: 0.85em;
  color: var(--muted);
  font-weight: normal;
}

.video-caption {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* GRC figures styling */
.figures-row{display:flex;flex-direction:column;align-items:center;gap:20px;margin:24px 0 32px}
.figure-graphic{flex:0 0 auto;width:auto;margin:0 auto;text-align:center}
.figure-graphic img.img-fluid{width:100%;height:auto;border:1px solid #e6e6e6;padding:6px;background:#fff}
.figure-graphic figcaption{display:none}
.language-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
}

.language-links li a {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--accent);
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.language-links li a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  text-decoration: none;
}

.event-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.event-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 113px;
  border-radius: 4px;
  border: none;
}

/* Events page */
.events-year-list {
  display: flex;
  flex-direction: column;
}

.event-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.event-card:last-child {
  border-bottom: none;
}

.event-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.event-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.event-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.event-thumb-link {
  flex-shrink: 0;
  display: block;
}

.event-thumb-link .event-thumb {
  display: block;
  object-fit: cover;
  transition: opacity 0.15s;
}

.event-thumb-link:hover .event-thumb {
  opacity: 0.8;
}

.events-section-divider {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.events-section-title {
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}

.events-section-divider .lede {
  margin: 0 0 1rem;
}

@media (max-width: 600px) {
  .event-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-thumb-link {
    width: 100%;
  }

  .event-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* People grids: collapse 3- and 4-col tables to 2 columns on mobile */
  .people-table.three-cols,
  .people-table.four-cols {
    display: block;
  }

  .people-table.three-cols tbody,
  .people-table.four-cols tbody {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .people-table.three-cols tr,
  .people-table.four-cols tr {
    display: contents;
  }

  .people-table.three-cols td,
  .people-table.four-cols td {
    width: auto;
    border-top: 1px solid var(--border);
  }

  .person img {
    width: 52px;
    height: 52px;
  }
}
