.h5p-editorial-board {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  position: relative;
  min-height: 200px;
}

.eb-wrapper {
  padding: 20px 10px;
}

.eb-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 30px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #1a5276;
  display: inline-block;
  width: 100%;
}

.eb-chart-container {
  overflow: auto;
  padding: 20px 40px 55px 40px;
  max-height: calc(100vh - 140px);
  min-height: 200px;
  position: relative;
}

.eb-zoom-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 3px 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.eb-zoom-btn {
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 3px 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #666;
  transition: all .15s;
  font-family: inherit;
}

.eb-zoom-btn:hover {
  background: #e8e8e8;
  color: #333;
}

.eb-zoom-level {
  font-size: 12px;
  color: #999;
  min-width: 36px;
  text-align: center;
  font-weight: 500;
}

.eb-tree-wrapper {
  display: flex;
  justify-content: center;
  transform-origin: top center;
  transition: transform .2s ease;
  min-width: 600px;
}

.eb-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-style: italic;
  font-size: 16px;
}

/* ─── Tree Layout ─── */

.eb-tree {
  display: flex;
  justify-content: center;
}

.eb-tree ul {
  padding: 32px 0 0 0;
  margin: 0;
  display: flex;
  justify-content: center;
  list-style: none;
  position: relative;
}

.eb-tree > ul {
  padding-top: 0;
}

/* Vertical connector from parent down to this level */
.eb-tree ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 32px;
  background: #95a5a6;
  border-radius: 1px;
  transform: translateX(-50%);
}

.eb-tree > ul::before {
  display: none;
}

.eb-tree ul::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  background: #95a5a6;
  border-radius: 50%;
  z-index: 1;
}

.eb-tree > ul::after {
  display: none;
}

.eb-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 20px;
}

/* Push card down so the vertical connector line is visible */
.eb-tree ul ul li:not(:only-child) {
  padding-top: 20px;
}

/* Horizontal line connecting siblings */
.eb-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #95a5a6;
}

.eb-tree li:first-child::after {
  left: 50%;
}

.eb-tree li:last-child::after {
  right: 50%;
}

.eb-tree li:only-child::after {
  display: none;
}

/* Vertical connector from horizontal line down to card */
.eb-tree li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 20px;
  background: #95a5a6;
  border-radius: 0 0 2px 2px;
  transform: translateX(-50%);
}

.eb-tree li:only-child::before,
.eb-tree li:only-child::after {
  display: block;
}

.eb-tree li:only-child::after {
  width: 0;
  left: 50%;
  right: auto;
}

.eb-tree li:only-child::before {
  display: none;
}



/* ─── Cards ─── */

.eb-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 16px 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 130px;
  max-width: 200px;
  position: relative;
  z-index: 2;
  border-top: 4px solid #1a5276;
  user-select: none;
}

.eb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.eb-card:focus {
  outline: 2px solid #1a5276;
  outline-offset: 2px;
}

.eb-card-photo {
  margin-bottom: 10px;
}

.eb-card-photo img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8e8e8;
}

.eb-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
  margin-bottom: 3px;
}

.eb-card-position {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
  font-weight: 500;
}

.eb-card-dept {
  font-size: 11px;
  color: #999;
  font-style: italic;
  margin-top: 4px;
}

.eb-card-expertise {
  font-size: 10px;
  color: #1a5276;
  background: #e8f0fe;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ─── Journal / Structural Cards ─── */

.eb-card-journal {
  min-width: 110px;
  max-width: 160px;
  padding: 10px 14px 10px;
  border-top-width: 3px;
  border-top-style: double;
}



.eb-card-journal .eb-card-position {
  font-size: 11px;
  font-weight: 700;
  color: #1a5276;
  line-height: 1.3;
  word-break: break-word;
}

.eb-card-journal .eb-card-dept {
  font-size: 11px;
  color: #888;
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.eb-card-photo-journal {
  margin-bottom: 4px;
}

.eb-card-photo-journal img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid #ddd;
  background: #fff;
  padding: 3px;
}

/* ─── Modal / Profile Overlay ─── */

.eb-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.eb-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  max-width: 540px;
  width: 92%;
  max-height: 85vh;
}

.eb-modal-inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.35);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 85vh;
  position: relative;
  padding: 36px 32px 32px;
}

.eb-modal-header {
  text-align: center;
  margin-bottom: 16px;
}

.eb-modal-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1a5276;
  display: inline-block;
}

.eb-modal-name {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.eb-modal-position {
  text-align: center;
  font-size: 16px;
  color: #555;
  font-weight: 500;
  margin: 0 0 4px 0;
}

.eb-modal-dept {
  text-align: center;
  font-size: 14px;
  color: #999;
  font-style: italic;
  margin: 0 0 4px 0;
}

.eb-modal-expertise {
  text-align: center;
  font-size: 13px;
  color: #1a5276;
  font-weight: 500;
  margin: 0 0 16px 0;
}

.eb-modal-orcid {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin: 4px 0 12px;
}

.eb-modal-orcid a {
  color: #a6ce39;
  text-decoration: none;
  font-weight: 500;
}

.eb-modal-orcid a:hover {
  text-decoration: underline;
}

.eb-modal-bio {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-top: 8px;
}

.eb-modal-bio p {
  margin: 0 0 12px 0;
}

.eb-modal-bio p:last-child {
  margin-bottom: 0;
}

.eb-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #bbb;
  background: none;
  border: none;
  padding: 0 4px;
  transition: color 0.15s;
  z-index: 2;
}

.eb-modal-close:hover {
  color: #666;
}

.eb-modal-close:focus {
  outline: 2px solid #1a5276;
  outline-offset: 1px;
  border-radius: 2px;
}

/* ─── Resume Sections (Experience, Education, Publications) ─── */

.eb-modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a5276;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 24px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #e8e8e8;
}

.eb-modal-section-title:first-of-type {
  margin-top: 8px;
}

.eb-resume-list {
  margin-bottom: 4px;
}

.eb-resume-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.eb-resume-item:last-child {
  border-bottom: none;
}

.eb-resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.eb-resume-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.eb-resume-item-dates {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

.eb-resume-item-sub {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

.eb-resume-item-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-top: 6px;
}

.eb-resume-item-desc p {
  margin: 0 0 8px 0;
}

.eb-resume-item-desc p:last-child {
  margin-bottom: 0;
}

.eb-pub-item {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

.eb-pub-item a {
  color: #1a5276;
  text-decoration: none;
  word-break: break-all;
}

.eb-pub-item a:hover {
  text-decoration: underline;
}
