:root {
  color-scheme: dark;
  --paper: #070c13;
  --surface: #101827;
  --ink: #edf5ff;
  --muted: #a8b8cf;
  --line: rgba(111, 151, 196, 0.28);
  --teal: #00539b;
  --teal-dark: #012169;
  --gold: #b58a00;
  --blue: #012169;
  --plum: #3f7dcc;
  --cofaculty-line: #8b5cf6;
  --research-collaborator-line: #ff2fd6;
  --close-colleague-line: #b7ff18;
  --name-accent: var(--gold);
  --sky: #112746;
  --scrollbar-thumb: rgba(0, 83, 155, 0.54);
  --scrollbar-track: rgba(9, 26, 48, 0.66);
  --top-panel-height: clamp(520px, 66vh, 760px);
  --lower-panel-height: min(720px, calc(100vh - 170px));
  --map-grid-background:
    radial-gradient(circle at 20% 18%, rgba(0, 83, 155, 0.22), transparent 34%),
    radial-gradient(circle at 78% 70%, rgba(181, 138, 0, 0.16), transparent 30%),
    linear-gradient(rgba(96, 165, 250, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.045) 1px, transparent 1px),
    #070c13;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34), 0 0 44px rgba(0, 83, 155, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 83, 155, 0.3), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(181, 138, 0, 0.12), transparent 26%),
    linear-gradient(rgba(96, 165, 250, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, #070c13, #0b1422 48%, #07101b);
  background-attachment: fixed;
  background-size: auto, auto, 38px 38px, 38px 38px, auto;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  position: relative;
}

body::before {
  animation: background-gold-particles 24s linear infinite;
  background:
    radial-gradient(circle, rgba(255, 202, 38, 0.96) 0 1.35px, rgba(255, 202, 38, 0.36) 1.85px, transparent 3.3px),
    radial-gradient(circle, rgba(214, 163, 0, 0.9) 0 1.15px, rgba(214, 163, 0, 0.3) 1.75px, transparent 3.2px),
    radial-gradient(circle, rgba(255, 218, 89, 0.74) 0 1px, transparent 2.7px),
    radial-gradient(circle, rgba(181, 138, 0, 0.7) 0 0.9px, transparent 2.4px);
  background-position:
    0 0,
    42px 86px,
    120px 30px,
    78px 160px;
  background-size:
    165px 165px,
    235px 235px,
    315px 315px,
    390px 390px;
  content: "";
  filter: drop-shadow(0 0 6px rgba(255, 202, 38, 0.56));
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

html,
body {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

@keyframes background-gold-particles {
  0% {
    background-position:
      0 0,
      42px 86px,
      120px 30px,
      78px 160px;
  }

  50% {
    background-position:
      80px 130px,
      -34px 168px,
      190px -44px,
      18px 270px;
  }

  100% {
    background-position:
      165px 165px,
      -193px 321px,
      435px -170px,
      -312px 550px;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 48px) 24px;
  position: relative;
  z-index: 1;
}

.atlas-tabs {
  align-items: flex-end;
  display: flex;
  gap: 3px;
  justify-content: flex-start;
  margin: -6px clamp(18px, 4vw, 48px) 18px;
  min-height: 44px;
  position: relative;
  z-index: 2;
}

.atlas-tabs::after {
  background: linear-gradient(90deg, rgba(88, 166, 255, 0.5), rgba(181, 138, 0, 0.22), transparent);
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.atlas-tab {
  background:
    linear-gradient(180deg, rgba(12, 31, 58, 0.9), rgba(7, 17, 32, 0.9));
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
  color: #cfe0f6;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  min-width: 124px;
  padding: 13px 20px 12px;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.atlas-tab:hover {
  background: linear-gradient(180deg, rgba(15, 45, 83, 0.94), rgba(8, 24, 48, 0.94));
  color: #ffffff;
}

.atlas-tab.active {
  background:
    linear-gradient(180deg, rgba(2, 33, 105, 0.92), rgba(7, 16, 29, 0.98)),
    radial-gradient(circle at 24% 0%, rgba(181, 138, 0, 0.28), transparent 48%);
  border-color: rgba(181, 138, 0, 0.55);
  color: #fff3c4;
  padding-bottom: 14px;
  z-index: 3;
}

.atlas-tab-panel {
  position: relative;
  z-index: 1;
}

.database-status-banner {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 202, 38, 0.2), rgba(7, 54, 164, 0.16)),
    rgba(5, 13, 27, 0.94);
  border: 1px solid rgba(255, 202, 38, 0.42);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 238, 176, 0.06) inset, 0 12px 34px rgba(0, 0, 0, 0.22);
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 18px clamp(18px, 4vw, 48px) 0;
  padding: 13px 15px;
  position: relative;
  z-index: 2;
}

.database-status-banner[hidden] {
  display: none;
}

.database-status-icon {
  align-items: center;
  background: rgba(255, 202, 38, 0.12);
  border: 1px solid rgba(255, 202, 38, 0.45);
  border-radius: 999px;
  color: #ffdf78;
  display: flex;
  font-size: 1.05rem;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.database-status-title {
  color: #fff4c8;
  font-size: 0.88rem;
  font-weight: 950;
  margin: 0;
}

.database-status-copy {
  color: #c8d8ef;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  margin: 3px 0 0;
}

.database-status-action {
  background: rgba(7, 54, 164, 0.84);
  border: 1px solid rgba(134, 190, 255, 0.36);
  border-radius: 7px;
  color: #f7fbff;
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 42px;
  padding: 9px 13px;
  white-space: nowrap;
}

.topbar-actions {
  align-items: stretch;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.account-card {
  background:
    linear-gradient(135deg, rgba(7, 22, 44, 0.92), rgba(2, 13, 29, 0.78)),
    radial-gradient(circle at 16% 18%, rgba(181, 138, 0, 0.18), transparent 32%);
  border: 1px solid rgba(88, 166, 255, 0.26);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(1, 13, 32, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-width: min(650px, 52vw);
  padding: 12px;
}

.login-form {
  align-items: end;
  display: flex;
  gap: 10px;
}

.account-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(170px, 1.3fr) minmax(132px, 0.9fr);
  min-width: 0;
}

.account-field {
  color: #a8b8cf;
  display: grid;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.account-field input {
  background: rgba(3, 13, 30, 0.86);
  border-color: rgba(111, 151, 196, 0.38);
  min-height: 42px;
  min-width: 0;
}

.account-buttons {
  align-items: end;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.account-buttons .ghost-button {
  align-items: center;
  border-radius: 7px;
  box-sizing: border-box;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 11px 14px;
}

.login-form.is-logged-in {
  align-items: end;
  justify-content: space-between;
}

.login-form.is-logged-in .account-fields {
  grid-template-columns: minmax(220px, 1fr);
}

.login-form.is-logged-in .account-field:nth-child(2),
.login-form.is-logged-in #loginPassword {
  display: none;
}

.login-form.is-auth-unconfigured {
  opacity: 0.78;
}

.login-form.is-moderator .login-status {
  color: #f1d26a;
}

.login-status {
  color: #b9cbe4;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: right;
}

.moderator-mode-link {
  color: #f1d26a;
  font-weight: 900;
  text-decoration: none;
}

.moderator-mode-link:hover {
  color: #ffe7a1;
  text-decoration: underline;
}

.account-footer {
  align-items: center;
  border-top: 1px solid rgba(111, 151, 196, 0.18);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 8px;
}

.account-footer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-text-button {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #9ecbff;
  font-size: 0.76rem;
  min-height: auto;
  padding: 2px 0;
}

.account-text-button:hover {
  background: transparent;
  color: #f1d483;
  transform: none;
}

.account-report-button {
  color: #ff8d8d;
}

.account-report-button:hover {
  color: #ffc2bd;
}

.account-link {
  text-decoration: none;
}

.account-return-button {
  align-items: center;
  border-radius: 7px;
  box-sizing: border-box;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 11px 14px;
}

.account-page-shell {
  display: grid;
  min-height: calc(100vh - 120px);
  padding: 26px clamp(18px, 4vw, 48px) 48px;
  place-items: start center;
  position: relative;
  z-index: 1;
}

.account-management-panel {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  width: min(1180px, 100%);
}

.account-page-heading {
  background:
    linear-gradient(135deg, rgba(8, 29, 58, 0.76), rgba(2, 13, 29, 0.5)),
    radial-gradient(circle at 12% 20%, rgba(181, 138, 0, 0.18), transparent 34%);
  border: 1px solid rgba(88, 166, 255, 0.24);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.account-page-heading h2 {
  color: #ffffff;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  margin-top: 4px;
}

.account-notice {
  background:
    linear-gradient(135deg, rgba(4, 18, 39, 0.92), rgba(2, 13, 29, 0.78));
  border: 1px solid rgba(111, 151, 196, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #dbeaff;
  font-weight: 800;
  line-height: 1.45;
  padding: 13px 14px;
}

.account-notice[data-tone="success"] {
  border-color: rgba(181, 138, 0, 0.5);
  color: #f1d483;
}

.account-notice[data-tone="warning"] {
  border-color: rgba(255, 210, 114, 0.42);
  color: #ffd982;
}

.account-session-summary {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(5, 24, 52, 0.9), rgba(2, 13, 29, 0.76));
  border: 1px solid rgba(88, 166, 255, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  padding: 12px 14px;
}

.account-email-stack {
  align-content: space-between;
  display: grid;
  gap: 16px;
  height: 100%;
}

.account-credentials-grid {
  align-items: end;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
}

.account-email-stack .account-session-summary {
  min-height: 76px;
}

.account-session-summary strong {
  color: #ffffff;
  display: block;
  font-size: 1rem;
}

.account-session-summary small {
  color: #a8b8cf;
  display: block;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 3px;
}

.account-management-grid {
  display: grid;
  align-items: start;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.moderator-dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.moderator-dashboard-card {
  background:
    linear-gradient(180deg, rgba(16, 28, 46, 0.94), rgba(9, 16, 28, 0.94)),
    radial-gradient(circle at 14% 8%, rgba(181, 138, 0, 0.1), transparent 34%);
  border: 1px solid rgba(90, 132, 184, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 13px;
  padding: 16px;
}

.moderator-dashboard-card .publications-heading {
  border-bottom: 1px solid rgba(111, 151, 196, 0.18);
  padding-bottom: 10px;
}

.moderator-dashboard-card .moderation-request-list,
.moderator-dashboard-card .moderation-event-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.moderator-status-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.account-settings-card {
  background:
    linear-gradient(180deg, rgba(16, 28, 46, 0.94), rgba(9, 16, 28, 0.94)),
    radial-gradient(circle at 14% 8%, rgba(181, 138, 0, 0.1), transparent 34%);
  border: 1px solid rgba(90, 132, 184, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 13px;
  padding: 16px;
}

.account-settings-card h3 {
  color: #ffffff;
  font-size: 1.08rem;
}

.account-settings-card label {
  min-height: 74px;
}

.account-settings-card input {
  min-height: 44px;
}

.account-settings-card button,
.account-return-button {
  min-height: 44px;
}

.account-settings-card > button {
  align-self: end;
  justify-self: start;
  min-width: 190px;
}

.account-reset-card {
  margin-top: 0;
}

.account-recovery-grid {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

.account-forgot-password-card {
  align-content: start;
}

.account-card-title-row {
  border-bottom: 1px solid rgba(111, 151, 196, 0.18);
  padding-bottom: 12px;
}

.account-reset-step {
  background: rgba(2, 13, 29, 0.32);
  border: 1px solid rgba(111, 151, 196, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.account-reset-step label,
.account-reset-step button {
  grid-column: 2;
}

.account-step-marker {
  align-items: center;
  background: rgba(181, 138, 0, 0.14);
  border: 1px solid rgba(181, 138, 0, 0.45);
  border-radius: 999px;
  color: #f1d483;
  display: inline-flex;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.account-reset-step > div {
  align-self: start;
}

.account-reset-step button {
  justify-self: start;
  min-width: 190px;
}

.account-recovery-grid .account-reset-card[hidden] {
  display: none;
}

@media (min-width: 1040px) {
  .account-session-summary small {
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  .account-credentials-grid {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .account-email-stack {
    height: auto;
  }
}

.topbar::after {
  background:
    linear-gradient(90deg, transparent, rgba(181, 138, 0, 0.78), transparent),
    linear-gradient(90deg, rgba(1, 33, 105, 0.96), rgba(0, 83, 155, 0.88));
  bottom: 8px;
  content: "";
  height: 4px;
  left: clamp(18px, 4vw, 48px);
  position: absolute;
  right: clamp(18px, 4vw, 48px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: #f5f9ff;
  font-size: clamp(1.8rem, 4vw, 3.7rem);
  letter-spacing: 0;
  line-height: 0.96;
  text-shadow: 0 0 26px rgba(0, 83, 155, 0.32);
}

h2 {
  font-size: 1.08rem;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.eyebrow {
  color: #77b7ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.add-doctor-panel .section-heading .eyebrow {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.file-protocol-warning {
  background:
    linear-gradient(135deg, rgba(116, 20, 20, 0.92), rgba(32, 6, 12, 0.94)),
    radial-gradient(circle at 12% 50%, rgba(241, 210, 106, 0.18), transparent 38%);
  border: 1px solid rgba(255, 141, 141, 0.48);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #ffe7e7;
  font-weight: 900;
  line-height: 1.35;
  margin: 0 clamp(18px, 4vw, 48px) 16px;
  padding: 12px 14px;
  position: relative;
  z-index: 2;
}

.app-shell {
  --top-panel-height: 980px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(250px, 0.62fr) minmax(360px, 1.38fr) 340px;
  padding: 0 clamp(18px, 4vw, 48px) 42px;
  position: relative;
  z-index: 1;
}

.workspace {
  align-items: start;
  display: contents;
}

.panel,
.profile-panel,
.tree-panel {
  background:
    linear-gradient(180deg, rgba(16, 28, 46, 0.94), rgba(9, 16, 28, 0.94));
  border: 1px solid rgba(90, 132, 184, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.search-panel,
.profile-panel,
.tree-panel,
.forms-column .panel,
.connection-panel,
.mentorship-comment-panel {
  padding: 18px;
}

.search-panel {
  grid-column: 1;
  grid-row: 2;
  height: var(--lower-panel-height);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: none;
  min-height: 260px;
}

.app-shell.has-mentorship-comment .search-panel,
.app-shell.has-mentorship-comment .profile-panel {
  height: var(--right-lower-stack-height, var(--lower-panel-height));
}

.search-panel label,
form label {
  color: var(--muted);
  display: grid;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 7px;
}

.doctor-search-controls {
  display: grid;
  gap: 8px;
}

.doctor-search-controls[hidden],
.profile-list-tabs[hidden] {
  display: none;
}

.profile-list-tabs {
  align-items: end;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 104px));
  justify-content: start;
  margin: 0 -18px 14px;
  min-width: 0;
  padding: 0;
  position: relative;
}

.profile-list-tabs::after {
  background: linear-gradient(90deg, rgba(88, 166, 255, 0.5), rgba(181, 138, 0, 0.3), rgba(88, 166, 255, 0.12));
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.profile-list-tab {
  align-items: center;
  background: linear-gradient(180deg, rgba(12, 31, 58, 0.88), rgba(5, 14, 28, 0.94));
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  box-shadow: 0 -7px 18px rgba(0, 0, 0, 0.16);
  color: #b9c9de;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  height: 46px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  min-width: 0;
  padding: 8px 7px 7px;
  position: relative;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
  z-index: 1;
}

.profile-list-tab:hover {
  background: linear-gradient(180deg, rgba(15, 45, 83, 0.94), rgba(8, 24, 48, 0.96));
  border-color: rgba(88, 166, 255, 0.52);
  color: #ffffff;
}

.profile-list-tab.active {
  background:
    linear-gradient(180deg, rgba(2, 33, 105, 0.92), rgba(7, 16, 29, 0.98)),
    radial-gradient(circle at 28% 0%, rgba(181, 138, 0, 0.3), transparent 50%);
  border-color: rgba(181, 138, 0, 0.62);
  box-shadow: 0 -8px 22px rgba(0, 83, 155, 0.2);
  color: #fff3c4;
  z-index: 3;
}

input,
select,
textarea {
  background: rgba(4, 10, 20, 0.72);
  border: 1px solid rgba(111, 151, 196, 0.34);
  border-radius: 7px;
  color: var(--ink);
  min-width: 0;
  outline: none;
  padding: 11px 12px;
  width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--teal);
  flex: 0 0 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  width: 16px;
}

input::placeholder,
textarea::placeholder {
  color: #778aa5;
}

textarea {
  resize: vertical;
}

select[multiple] {
  min-height: 190px;
}

select[multiple] option {
  padding: 7px 8px;
}

.checkbox-field {
  background: rgba(4, 10, 20, 0.28);
  border: 1px solid rgba(111, 151, 196, 0.34);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 12px;
}

.checkbox-field legend {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0 4px;
}

.checkbox-field label {
  align-items: center;
  color: #dbe8f8;
  display: flex;
  font-size: 0.86rem;
  font-weight: 600;
  gap: 8px;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-checkbox-field {
  gap: 8px;
}

.past-roles-builder {
  background: rgba(4, 10, 20, 0.28);
  border: 1px solid rgba(111, 151, 196, 0.34);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  position: relative;
}

.past-roles-heading {
  align-items: center;
  display: inline-flex;
  max-width: max-content;
  padding: 0 4px;
}

.past-roles-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.past-roles-heading [data-add-past-role] {
  align-items: center;
  background: rgba(4, 10, 20, 0.72);
  border: 1px solid rgba(111, 151, 196, 0.42);
  border-radius: 6px;
  color: #dbe8f8;
  display: inline-flex;
  font-size: 1rem;
  height: 26px;
  justify-content: center;
  line-height: 1;
  min-width: 28px;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 0;
  transform: translateY(-50%);
}

.past-roles-heading [data-add-past-role]:hover {
  background: rgba(0, 83, 155, 0.28);
  border-color: rgba(119, 183, 255, 0.58);
  color: #ffffff;
}

.past-roles-list {
  display: grid;
  gap: 12px;
}

.past-role-entry {
  background: rgba(2, 8, 18, 0.24);
  border: 1px solid rgba(111, 151, 196, 0.2);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.past-role-entry-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.past-role-entry-header span {
  color: #77b7ff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.past-role-remove {
  font-size: 0.75rem;
  min-height: 34px;
  padding: 6px 10px;
}

.past-role-legacy-note {
  background: rgba(4, 10, 20, 0.36);
  border-left: 3px solid var(--gold);
  border-radius: 0 7px 7px 0;
  color: #c9d8ea;
  line-height: 1.45;
  padding: 9px 10px;
}

.past-role-legacy-note strong {
  color: #77b7ff;
  display: block;
  font-size: 0.72rem;
  margin-bottom: 3px;
  text-transform: uppercase;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(0, 83, 155, 0.28), 0 0 18px rgba(0, 83, 155, 0.26);
}

.doctor-list {
  align-content: start;
  display: grid;
  gap: 9px;
  margin-top: 14px;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.doctor-list::-webkit-scrollbar {
  width: 8px;
}

.doctor-list::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

.doctor-list::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

.suggested-connections-heading {
  background: rgba(4, 10, 20, 0.42);
  border: 1px solid rgba(181, 138, 0, 0.34);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  margin-right: 8px;
  padding: 10px 11px;
}

.suggested-connections-heading .eyebrow {
  color: var(--gold);
  margin-bottom: 0;
}

.doctor-card {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px 1fr;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.doctor-card:hover,
.doctor-card.active {
  background: rgba(0, 83, 155, 0.24);
  border-color: rgba(88, 166, 255, 0.46);
}

.doctor-card strong {
  display: block;
  font-size: 0.94rem;
}

.doctor-card small {
  color: #a8b8cf;
  display: block;
  line-height: 1.35;
  margin-top: 2px;
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 50%;
  color: white;
  display: flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.profile-panel {
  grid-column: 2;
  grid-row: 2;
  height: var(--lower-panel-height);
  max-height: none;
  min-height: 220px;
  overflow-y: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.profile-panel::-webkit-scrollbar {
  width: 8px;
}

.profile-panel::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

.profile-panel::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

.connection-panel::-webkit-scrollbar {
  width: 8px;
}

.connection-panel::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

.connection-panel::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

.profile-header {
  align-items: center;
  display: flex;
  gap: 15px;
}

.profile-heading-copy {
  min-width: 0;
  flex: 1;
}

.profile-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.profile-title-row h2 {
  min-width: 0;
}

.profile-title-row #reportProfileButton {
  flex: 0 0 auto;
  padding: 8px 10px;
}

.pending-profile-pill {
  flex: 0 0 auto;
}

.profile-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 16px;
}

.profile-edit-button {
  margin-left: auto;
}

.claim-locked-edit-button {
  border: 1px solid rgba(181, 138, 0, 0.52);
}

.danger-button {
  background: #8f1f1f;
  border: 1px solid #761818;
  color: #ffffff;
}

.danger-button:hover {
  background: #6f1717;
}

.profile-header .avatar {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  height: 58px;
  width: 58px;
}

.profile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.fact {
  border-left: 3px solid var(--gold);
  background: rgba(4, 10, 20, 0.36);
  border-radius: 0 7px 7px 0;
  min-height: 56px;
  padding-left: 10px;
  padding-top: 7px;
}

.fact span {
  color: var(--muted);
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.bio {
  color: #c9d8ea;
  line-height: 1.6;
}

.profile-note {
  background: rgba(4, 10, 20, 0.36);
  border: 1px solid rgba(111, 151, 196, 0.28);
  border-radius: 8px;
  color: #c9d8ea;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 11px 12px;
}

.profile-note strong {
  color: #77b7ff;
  display: block;
  font-size: 0.75rem;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.mentor-impact-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
}

.mentor-impact-list {
  display: grid;
  gap: 10px;
}

.mentor-impact-comment {
  background:
    linear-gradient(135deg, rgba(0, 83, 155, 0.18), rgba(181, 138, 0, 0.08));
  border: 1px solid rgba(111, 151, 196, 0.28);
  border-radius: 8px;
  color: #dbeaff;
  line-height: 1.52;
  padding: 12px;
}

.mentor-impact-comment p {
  margin: 0;
}

.mentor-impact-comment small {
  color: #9fb4cf;
  display: block;
  font-weight: 800;
}

.mentor-impact-meta {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 9px;
}

.comment-delete-button {
  min-height: 32px;
  padding: 7px 10px;
}

.moderation-inbox-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 11px;
  margin-top: 18px;
  padding-top: 16px;
}

.moderator-pill {
  background: rgba(181, 138, 0, 0.14);
  border: 1px solid rgba(181, 138, 0, 0.46);
  border-radius: 999px;
  color: #f1d26a;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}

.moderation-request-list {
  display: grid;
  gap: 10px;
}

.moderation-request {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(0, 83, 155, 0.18), rgba(181, 138, 0, 0.08));
  border: 1px solid rgba(111, 151, 196, 0.28);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.moderation-request strong,
.moderation-request small,
.moderation-request em {
  display: block;
}

.moderation-request strong {
  color: #dbeaff;
}

.moderation-request small {
  color: #9fb4cf;
  font-weight: 800;
  margin-top: 4px;
}

.moderation-request em {
  color: #8fb8e8;
  font-size: 0.78rem;
  margin-top: 4px;
}

.moderation-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.moderation-request-actions button,
.moderation-request-actions .secondary-button {
  align-items: center;
  border-radius: 7px;
  box-sizing: border-box;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  padding: 10px 12px;
}

.moderation-request-actions .moderator-action-link {
  text-decoration: none;
}

.health-check-item {
  border-left: 3px solid rgba(255, 202, 38, 0.68);
}

.health-check-critical {
  border-left-color: rgba(255, 141, 141, 0.9);
}

.health-check-warning {
  border-left-color: rgba(255, 202, 38, 0.86);
}

.health-check-notice {
  border-left-color: rgba(117, 201, 255, 0.75);
}

.past-role-list {
  margin: 0;
  padding-left: 18px;
}

.past-role-list li + li {
  margin-top: 5px;
}

.get-in-touch-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
}

.contact-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-item {
  align-items: center;
  background: rgba(4, 10, 20, 0.42);
  border: 1px solid rgba(111, 151, 196, 0.28);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 64px;
  padding: 10px;
}

.contact-icon {
  align-items: center;
  background: rgba(181, 138, 0, 0.16);
  border: 1px solid rgba(181, 138, 0, 0.44);
  border-radius: 50%;
  color: #ffca26;
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.contact-icon svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 19px;
}

.contact-icon svg path,
.contact-icon svg rect,
.contact-icon svg circle {
  vector-effect: non-scaling-stroke;
}

.contact-item strong {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.contact-item span,
.contact-item a {
  color: #dbeaff;
  font-size: 0.9rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-item a:hover {
  color: #ffca26;
}

.publications-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
}

.publications-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.publications-heading .eyebrow {
  margin-bottom: 0;
}

.publication-doi-form {
  background: rgba(4, 10, 20, 0.38);
  border: 1px solid rgba(111, 151, 196, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.publication-doi-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-doi-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.publication-doi-row input {
  min-width: 0;
}

.publication-editor-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0;
  min-height: 1rem;
}

.publications-list {
  display: grid;
  gap: 8px;
  max-height: clamp(320px, 48vh, 680px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.publications-list::-webkit-scrollbar {
  width: 8px;
}

.publications-list::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

.publications-list::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

.publication-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.publication-item {
  background: rgba(4, 10, 20, 0.5);
  border: 1px solid rgba(111, 151, 196, 0.32);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 4px;
  justify-content: space-between;
  padding: 10px;
  text-decoration: none;
}

.publication-item:hover {
  border-color: rgba(88, 166, 255, 0.5);
  box-shadow: 0 8px 22px rgba(0, 83, 155, 0.16);
}

.publication-link {
  color: var(--ink);
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
  text-decoration: none;
}

.publication-link:hover strong {
  color: #d5e9ff;
}

.publication-item strong {
  color: #9dccff;
  font-size: 0.88rem;
  line-height: 1.28;
}

.publication-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.publication-remove-button {
  align-self: start;
  background: rgba(255, 98, 98, 0.1);
  border: 1px solid rgba(255, 143, 143, 0.38);
  border-radius: 999px;
  color: #ffb8b8;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 9px;
}

.publication-remove-button:hover {
  background: rgba(255, 98, 98, 0.18);
  border-color: rgba(255, 184, 184, 0.6);
}

.site-guide-panel {
  align-self: stretch;
}

.site-guide-copy,
.site-guide-contact {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.site-guide-download {
  align-items: center;
  background: rgba(0, 83, 155, 0.2);
  border: 1px solid rgba(104, 176, 255, 0.38);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 11px;
  margin: 13px 0;
  padding: 11px 12px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.site-guide-download:hover,
.site-guide-download:focus-visible {
  background: rgba(0, 83, 155, 0.32);
  border-color: rgba(157, 204, 255, 0.68);
  transform: translateY(-1px);
}

.site-guide-download-icon {
  align-items: center;
  background: rgba(242, 201, 76, 0.12);
  border: 1px solid rgba(242, 201, 76, 0.5);
  border-radius: 6px;
  color: #f8d96b;
  display: inline-flex;
  flex: 0 0 39px;
  font-size: 0.65rem;
  font-weight: 900;
  height: 39px;
  justify-content: center;
  letter-spacing: 0.04em;
}

.site-guide-download strong,
.site-guide-download small {
  display: block;
}

.site-guide-download strong {
  color: #dcecff;
  font-size: 0.84rem;
}

.site-guide-download small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

.site-guide-contact a {
  color: #9dccff;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.moderator-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.moderation-subheading {
  color: #9dccff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.moderation-request-list,
.moderation-event-list {
  display: grid;
  gap: 9px;
}

.moderation-request p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.42;
  margin: 7px 0 0;
}

.moderation-event {
  background: rgba(4, 10, 20, 0.42);
  border: 1px solid rgba(111, 151, 196, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.moderation-event strong {
  color: #dbeaff;
  font-size: 0.84rem;
}

.moderation-event span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.comment-report-button,
.comment-delete-button {
  padding: 7px 9px;
}

.lineage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

button {
  background: linear-gradient(180deg, #0067b8, #004d91);
  border: 0;
  border-radius: 7px;
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 11px 14px;
}

button:hover {
  background: var(--teal-dark);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.58;
}

.secondary-button {
  background: rgba(9, 26, 48, 0.88);
  border: 1px solid rgba(88, 166, 255, 0.38);
  color: #dbeaff;
}

.secondary-button:hover {
  background: rgba(0, 83, 155, 0.36);
}

.ghost-button {
  background: rgba(9, 26, 48, 0.78);
  border: 1px solid rgba(88, 166, 255, 0.32);
  color: #dbeaff;
}

.ghost-button:hover {
  background: rgba(0, 83, 155, 0.32);
}

.tree-panel {
  background:
    radial-gradient(ellipse at 75% 58%, rgba(181, 138, 0, 0.18), transparent 62%),
    radial-gradient(ellipse at 18% 24%, rgba(0, 83, 155, 0.18), transparent 52%),
    linear-gradient(rgba(96, 165, 250, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.045) 1px, transparent 1px),
    #070c13;
  background-position: 0 0;
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  display: flex;
  flex-direction: column;
  grid-column: 1 / 3;
  grid-row: 1;
  align-self: stretch;
  height: var(--top-panel-height);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.tree-panel::before {
  display: none;
}

.tree-control-row {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  left: 18px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 4;
}

.tree-control-row .map-zoom-controls,
.tree-control-row .tree-map-actions {
  pointer-events: auto;
}

.tree-control-row .map-zoom-controls {
  background: rgba(4, 10, 20, 0.68);
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(1, 18, 48, 0.28);
  padding: 7px;
}

.tree-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tree-control-row #toggleAllRelationships,
.tree-control-row #showGeographyLineage {
  box-shadow: 0 12px 28px rgba(1, 18, 48, 0.28);
}

.tree-header {
  align-items: center;
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.48), rgba(4, 10, 20, 0.28));
  border-bottom: 1px solid rgba(111, 151, 196, 0.28);
  display: grid;
  flex: 0 0 auto;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.65fr) minmax(300px, 1.35fr);
  min-height: 76px;
  padding: 14px 24px 16px;
  position: relative;
  z-index: 2;
}

.map-zoom-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-zoom-controls .icon-button {
  min-width: 38px;
  padding: 8px 10px;
}

#zoomLevelLabel {
  color: #dbeaff;
  font-size: 0.85rem;
  font-weight: 900;
  min-width: 46px;
  text-align: center;
}

.tree-title-block .eyebrow {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.tree-header h2 {
  font-size: clamp(1.18rem, 1.8vw, 1.78rem);
}

#treeTitle[hidden],
#treeMeta[hidden] {
  display: none;
}

#treeMeta {
  color: #a8b8cf;
  font-size: 0.9rem;
  max-width: 360px;
  text-align: right;
}

.relationship-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  justify-self: end;
  padding: 0;
  position: relative;
  z-index: 2;
}

.relationship-legend[hidden] {
  display: none;
}

.relationship-legend span {
  align-items: center;
  color: #edf5ff;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 800;
  gap: 9px;
}

.lineage-map-field {
  background: transparent;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.legend-line {
  border-radius: 999px;
  display: inline-block;
  height: 5px;
  width: 46px;
}

.legend-line.mentor-line {
  background: linear-gradient(90deg, #a87400 0%, #d9a900 42%, #fff2bd 58%, #ffffff 74%, #ffffff 100%);
}

.legend-line.peer-line {
  background: #008c95;
}

.legend-line.cofaculty-line {
  background: var(--cofaculty-line);
}

.legend-line.research-collaborator-line {
  background: var(--research-collaborator-line);
}

.legend-line.close-colleague-line {
  background: var(--close-colleague-line);
}

.lineage-tree {
  background: transparent;
  cursor: grab;
  flex: 1 1 auto;
  isolation: isolate;
  min-height: 0;
  overflow: auto;
  padding: 0;
  position: relative;
  scrollbar-width: none;
  user-select: none;
}

.lineage-tree::-webkit-scrollbar {
  display: none;
}

.lineage-tree.is-panning {
  cursor: grabbing;
}

.map-tab-panel {
  padding: 0 clamp(18px, 4vw, 48px) 42px;
}

.map-tab-shell {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.geography-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(var(--top-panel-height) + var(--lower-panel-height) + 18px);
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.geography-header {
  align-items: center;
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.7), rgba(4, 10, 20, 0.34));
  border-bottom: 1px solid rgba(111, 151, 196, 0.28);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 24px 16px;
}

.geography-header h2 {
  font-size: clamp(1.18rem, 1.8vw, 1.78rem);
}

.geography-header-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  max-width: min(760px, 62vw);
}

.geography-search-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(190px, 1fr) auto auto;
}

.geography-search-modes {
  align-items: center;
  background: rgba(4, 10, 20, 0.52);
  border: 1px solid rgba(88, 166, 255, 0.26);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  margin: 0;
  min-height: 42px;
  padding: 7px 10px;
}

.geography-search-modes legend {
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.geography-search-modes label {
  align-items: center;
  color: #dbeaff;
  display: flex;
  font-size: 0.74rem;
  font-weight: 850;
  gap: 5px;
  white-space: nowrap;
}

.geography-search-field {
  color: #a8b8cf;
  display: grid;
  font-size: 0.68rem;
  font-weight: 900;
  gap: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.geography-search-field input {
  min-height: 42px;
  min-width: 0;
}

.geography-search-form .secondary-button,
.geography-search-form .ghost-button {
  min-height: 42px;
  white-space: nowrap;
}

.geography-header p:last-child {
  color: #b9cbe4;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.35;
  margin: 0;
  text-align: right;
}

.geography-map-viewport {
  background:
    radial-gradient(circle at 24% 35%, rgba(0, 83, 155, 0.36), transparent 32%),
    radial-gradient(circle at 76% 42%, rgba(181, 138, 0, 0.18), transparent 36%),
    #071426;
  background-size: auto, auto, auto;
  cursor: grab;
  height: auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.real-geography-map {
  overflow: hidden;
}

.real-geography-map .leaflet-pane,
.real-geography-map .leaflet-tile,
.real-geography-map .leaflet-marker-icon,
.real-geography-map .leaflet-marker-shadow,
.real-geography-map .leaflet-tile-container,
.real-geography-map .leaflet-pane > svg,
.real-geography-map .leaflet-pane > canvas,
.real-geography-map .leaflet-zoom-box,
.real-geography-map .leaflet-image-layer,
.real-geography-map .leaflet-layer {
  left: 0;
  position: absolute;
  top: 0;
}

.real-geography-map .leaflet-container,
.real-geography-map.leaflet-container {
  background: #071426;
  color: #edf5ff;
  font: inherit;
  overflow: hidden;
  touch-action: none;
}

.real-geography-map .leaflet-tile,
.real-geography-map .leaflet-marker-icon,
.real-geography-map .leaflet-marker-shadow {
  user-select: none;
}

.real-geography-map.leaflet-container img.leaflet-tile {
  height: 256px;
  width: 256px;
  border: 0;
  outline: 0;
  mix-blend-mode: normal;
}

.real-geography-map .leaflet-tile-loaded {
  visibility: inherit;
}

.real-geography-map .leaflet-zoom-animated {
  transform-origin: 0 0;
}

.real-geography-map .leaflet-pane {
  z-index: 400;
}

.real-geography-map .leaflet-tile-pane {
  z-index: 200;
}

.real-geography-map .leaflet-overlay-pane {
  z-index: 400;
}

.real-geography-map .leaflet-shadow-pane {
  z-index: 500;
}

.real-geography-map .leaflet-marker-pane {
  z-index: 650;
}

.real-geography-map .leaflet-tooltip-pane {
  z-index: 700;
}

.real-geography-map .leaflet-popup-pane {
  z-index: 750;
}

.real-geography-map .leaflet-interactive {
  cursor: pointer;
}

.real-geography-map .leaflet-control {
  position: relative;
  z-index: 800;
}

.real-geography-map .leaflet-top,
.real-geography-map .leaflet-bottom {
  pointer-events: none;
  position: absolute;
  z-index: 1000;
}

.real-geography-map .leaflet-top {
  top: 0;
}

.real-geography-map .leaflet-bottom {
  bottom: 0;
}

.real-geography-map .leaflet-left {
  left: 0;
}

.real-geography-map .leaflet-right {
  right: 0;
}

.real-geography-map .leaflet-top .leaflet-control {
  margin-top: 10px;
}

.real-geography-map .leaflet-left .leaflet-control {
  margin-left: 10px;
}

.real-geography-map .leaflet-right .leaflet-control {
  margin-right: 10px;
}

.real-geography-map .leaflet-bottom .leaflet-control {
  margin-bottom: 10px;
}

.real-geography-map .leaflet-control {
  clear: both;
  pointer-events: auto;
}

.real-geography-map .leaflet-control-zoom-in,
.real-geography-map .leaflet-control-zoom-out {
  display: block;
  height: 28px;
  line-height: 28px;
  text-align: center;
  text-decoration: none;
  width: 28px;
}

.real-geography-map .leaflet-tile-pane {
  filter: none;
  opacity: 1;
}

.real-geography-map .geography-night-base {
  filter: sepia(1) saturate(2.5) hue-rotate(176deg) brightness(0.62) contrast(1.35);
  width: 257px !important;
  height: 257px !important;
}

.real-geography-map .geography-night-labels {
  filter: brightness(1.85) contrast(1.15);
}

.real-geography-map .leaflet-marker-pane,
.real-geography-map .leaflet-marker-icon,
.real-geography-map .city-light-marker {
  visibility: visible !important;
}

.real-geography-map .leaflet-control-zoom {
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(1, 18, 48, 0.28);
  overflow: hidden;
}

.real-geography-map .leaflet-control-zoom a {
  background: rgba(4, 10, 20, 0.88);
  border-color: rgba(88, 166, 255, 0.22);
  color: #fff3c4;
  font-weight: 900;
}

.real-geography-map .leaflet-control-attribution {
  background: rgba(4, 10, 20, 0.72);
  color: #b9cbe4;
  font-size: 0.68rem;
}

.real-geography-map .leaflet-control-attribution a {
  color: #d2e6ff;
}

.geography-tile-unavailable {
  align-items: flex-end;
  background: transparent;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 12px;
  pointer-events: none;
  position: absolute;
  z-index: 1200;
}

.geography-tile-unavailable[hidden] {
  display: none;
}

.geography-tile-unavailable-card {
  backdrop-filter: blur(16px);
  background: rgba(4, 13, 27, 0.9);
  border: 1px solid rgba(217, 169, 0, 0.42);
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36), 0 0 28px rgba(217, 169, 0, 0.16);
  display: grid;
  gap: 10px;
  max-width: 420px;
  padding: 18px;
  text-align: left;
}

.geography-tile-unavailable-card h3 {
  color: #dbeaff;
  font-family: "Libre Baskerville", Georgia, serif;
  margin: 0;
}

.geography-tile-unavailable-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
  margin: 0;
}

.geography-tile-unavailable-card .secondary-button {
  justify-self: start;
  pointer-events: auto;
}

.city-light-marker {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  outline: none;
}

.city-light-marker .city-light-core {
  background: radial-gradient(circle, #ffffff 0 10%, #fff0ad 15%, #ffd45d 26%, rgba(255, 205, 83, 0.7) 40%, transparent 72%);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(255, 224, 122, 0.96), 0 0 52px rgba(214, 164, 0, 0.64);
  display: block;
  height: var(--city-light-size, 100%);
  transition: transform 160ms ease, box-shadow 160ms ease;
  width: var(--city-light-size, 100%);
}

.city-light-marker.active .city-light-core,
.city-light-marker:focus-visible .city-light-core,
.city-light-marker:hover .city-light-core {
  box-shadow: 0 0 24px rgba(255, 244, 193, 1), 0 0 78px rgba(255, 203, 77, 0.84);
  transform: scale(1.18);
}

.city-light-tooltip {
  background: rgba(4, 13, 27, 0.97);
  border: 1px solid rgba(255, 220, 126, 0.68);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  color: #f5f9ff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  max-width: 300px;
  padding: 10px 12px;
  pointer-events: none;
  white-space: normal;
}

.city-light-tooltip strong {
  color: #ffe38a;
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.geography-location-popup .leaflet-popup-content-wrapper,
.geography-location-popup .leaflet-popup-tip {
  background: #0b192c;
  color: #edf5ff;
}

.geography-location-choices {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.geography-location-choices button {
  background: #102b4a;
  border: 1px solid #365779;
  border-radius: 6px;
  color: #edf5ff;
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.geography-location-choices button:hover,
.geography-location-choices button:focus-visible {
  background: #19446f;
  border-color: #d9bd78;
}

.city-light-tooltip.leaflet-tooltip-top::before {
  border-top-color: rgba(255, 220, 126, 0.68);
}

@media (prefers-contrast: more) {
  .real-geography-map .leaflet-tile-pane {
    filter: none;
    opacity: 1;
  }

  .real-geography-map .geography-night-base {
    filter: sepia(1) saturate(2.5) hue-rotate(176deg) brightness(0.85) contrast(1.25);
  }

  .real-geography-map .geography-night-labels {
    filter: brightness(2.1) contrast(1.2);
  }

  .city-light-marker .city-light-core {
    box-shadow: 0 0 22px rgba(255, 240, 177, 1), 0 0 58px rgba(255, 198, 0, 0.8);
  }

  .city-light-tooltip {
    border-color: #ffe38a;
    color: #ffffff;
  }
}

.geography-sidebar {
  align-self: stretch;
  height: calc(var(--top-panel-height) + var(--lower-panel-height) + 18px);
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.geography-sidebar h2 {
  color: #fff3c4;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.geography-sidebar .bio {
  margin-top: 10px;
}

.geography-institution-list {
  color: #b9cbe4;
  font-size: 0.84rem;
  font-style: italic;
  font-weight: 750;
  line-height: 1.45;
  margin: 0 0 18px;
}

.geography-doctor-list {
  display: grid;
  gap: 10px;
}

.location-needs-list {
  border-top: 1px solid rgba(111, 151, 196, 0.24);
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
}

.location-needs-list p:not(.eyebrow) {
  color: #b9cbe4;
  font-size: 0.82rem;
  line-height: 1.42;
  margin: 0;
}

.location-needed-card {
  background: rgba(4, 10, 20, 0.58);
  border: 1px solid rgba(255, 213, 98, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
}

.location-needed-card strong {
  color: #fff3c4;
  font-size: 0.84rem;
}

.location-needed-card small {
  color: #a8b8cf;
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 750;
  line-height: 1.35;
}

.geography-doctor-card {
  align-items: center;
  background: rgba(4, 10, 20, 0.72);
  border: 1px solid rgba(88, 166, 255, 0.28);
  border-radius: 8px;
  color: #edf5ff;
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 12px;
  text-align: left;
}

.geography-doctor-card:hover {
  background: rgba(0, 83, 155, 0.22);
  border-color: rgba(255, 213, 98, 0.5);
}

.geography-doctor-card strong {
  color: #ffffff;
  font-size: 0.96rem;
}

.geography-doctor-card small {
  color: #b9cbe4;
  font-size: 0.8rem;
  font-weight: 750;
}

.tree-level {
  align-items: stretch;
  display: flex;
  gap: 24px;
  justify-content: center;
  min-width: max-content;
  padding: 28px 0;
  pointer-events: none;
  position: relative;
}

.tree-level + .tree-level::before {
  content: none;
}

.tree-node {
  align-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 32%),
    #00539b;
  border: 0;
  border-radius: 50%;
  box-shadow:
    0 0 10px rgba(0, 83, 155, 0.44),
    0 0 26px rgba(0, 83, 155, 0.62),
    0 0 46px rgba(181, 138, 0, 0.18),
    0 14px 30px rgba(1, 33, 105, 0.28);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 176px;
  justify-content: center;
  line-height: 1.15;
  overflow: hidden;
  padding: 18px;
  pointer-events: auto;
  position: relative;
  text-align: center;
  text-shadow: 0 1px 5px rgba(1, 18, 48, 0.78);
  width: 176px;
  z-index: 3;
}

.connector-layer {
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.connector-layer line,
.connector-layer path {
  fill: none;
  opacity: 0.72;
  stroke: #1b7d93;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.connector-layer .relationship-edit-line {
  cursor: pointer;
  pointer-events: stroke;
}

.connector-layer .relationship-hit-line {
  cursor: pointer;
  opacity: 0;
  pointer-events: stroke;
  stroke: #ffffff;
  stroke-width: 16;
}

.connector-layer .relationship-edit-line:hover,
.connector-layer .relationship-edit-line:focus-visible,
.connector-layer .relationship-edit-line.selected-relationship-line {
  filter: drop-shadow(0 0 5px rgba(181, 138, 0, 0.75));
  opacity: 1;
  stroke-width: 3.5;
}

.connector-layer .mentor-line {
  stroke: var(--gold);
}

.connector-layer .peer-line {
  stroke: #00a5b1;
}

.connector-layer .cofaculty-line {
  stroke: var(--cofaculty-line);
}

.connector-layer .research-collaborator-line {
  stroke: var(--research-collaborator-line);
}

.connector-layer .close-colleague-line {
  stroke: var(--close-colleague-line);
}

.tree-node.selected {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24), transparent 34%),
    var(--gold);
  box-shadow:
    0 0 14px rgba(181, 138, 0, 0.48),
    0 0 34px rgba(181, 138, 0, 0.76),
    0 0 64px rgba(181, 138, 0, 0.3),
    0 16px 34px rgba(1, 33, 105, 0.28);
}

.tree-node strong,
.tree-node span {
  display: block;
}

.tree-node strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.tree-node:hover strong,
.tree-node.selected strong {
  color: #ffffff;
}

.tree-node span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 750;
  margin-top: 4px;
}

.tree-node small {
  color: rgba(255, 255, 255, 0.92);
  display: block;
  font-weight: 800;
  font-size: 0.68rem;
  margin-top: 8px;
}

.relationship-map {
  margin: 0 auto;
  position: relative;
  transform-origin: top left;
}

.relationship-map-stage {
  background: transparent;
  margin: 0 auto;
  min-height: 100%;
  min-width: 100%;
  position: relative;
}

.relationship-connector-layer {
  inset: 0;
  z-index: 1;
}

.person-circle {
  align-items: center;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.26), transparent 34%),
    #00539b;
  border: 0;
  border-radius: 50%;
  box-shadow:
    0 0 9px rgba(0, 83, 155, 0.76),
    0 0 24px rgba(0, 83, 155, 0.48),
    0 0 48px rgba(0, 83, 155, 0.18);
  color: #ffffff;
  display: flex;
  font-size: 0.68rem;
  font-weight: 900;
  height: 82px;
  justify-content: center;
  line-height: 1.12;
  hyphens: none;
  overflow-wrap: break-word;
  padding: 8px;
  position: absolute;
  text-align: center;
  text-shadow:
    0 1px 4px rgba(1, 18, 48, 0.9),
    0 0 12px rgba(0, 0, 0, 0.65);
  transform: translate(-50%, -50%);
  transition:
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
  width: 82px;
  word-break: normal;
  z-index: 4;
}

.person-circle:hover {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.2), transparent 34%),
    var(--blue);
  box-shadow:
    0 0 13px rgba(0, 83, 155, 0.88),
    0 0 34px rgba(0, 83, 155, 0.66),
    0 0 64px rgba(0, 83, 155, 0.3);
  color: #ffffff;
  filter: brightness(1.1);
}

.person-circle:focus-visible {
  outline: 3px solid rgba(255, 202, 38, 0.95);
  outline-offset: 5px;
}

.person-circle-attending {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.2), transparent 34%),
    #012169;
  box-shadow:
    0 0 9px rgba(1, 33, 105, 0.84),
    0 0 26px rgba(1, 33, 105, 0.6),
    0 0 52px rgba(0, 83, 155, 0.22);
}

.person-circle-attending:hover {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 34%),
    #001a57;
  box-shadow:
    0 0 14px rgba(1, 33, 105, 0.9),
    0 0 38px rgba(1, 33, 105, 0.76),
    0 0 68px rgba(0, 83, 155, 0.32);
}

.person-circle-memoriam {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.14), transparent 32%),
    #101318;
  box-shadow:
    0 0 9px rgba(0, 0, 0, 0.82),
    0 0 28px rgba(16, 19, 24, 0.74),
    0 0 52px rgba(255, 255, 255, 0.08);
}

.person-circle-memoriam:hover {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.16), transparent 34%),
    #050608;
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.92),
    0 0 38px rgba(16, 19, 24, 0.84),
    0 0 68px rgba(255, 255, 255, 0.1);
}

.person-circle.person-circle-focused,
.person-circle.person-circle-focused:hover {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.24), transparent 34%),
    var(--gold);
  box-shadow:
    0 0 14px rgba(181, 138, 0, 0.72),
    0 0 36px rgba(181, 138, 0, 0.72),
    0 0 72px rgba(181, 138, 0, 0.34);
  color: #ffffff;
  height: 94px;
  width: 94px;
}

::view-transition-old(focused-person-node),
::view-transition-new(focused-person-node) {
  animation-duration: 520ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  mix-blend-mode: normal;
}

::view-transition-old(focused-person-node) {
  animation-name: lineage-node-zoom-out;
}

::view-transition-new(focused-person-node) {
  animation-name: lineage-node-zoom-in;
}

@keyframes lineage-node-zoom-out {
  from {
    filter: drop-shadow(0 0 22px rgba(0, 83, 155, 0.62));
    opacity: 1;
    transform: scale(1);
  }

  to {
    filter: drop-shadow(0 0 38px rgba(181, 138, 0, 0.28));
    opacity: 0.22;
    transform: scale(1.22);
  }
}

@keyframes lineage-node-zoom-in {
  from {
    filter: drop-shadow(0 0 40px rgba(0, 83, 155, 0.7));
    opacity: 0.35;
    transform: scale(0.72);
  }

  to {
    filter: drop-shadow(0 0 18px rgba(0, 83, 155, 0.48));
    opacity: 1;
    transform: scale(1);
  }
}

.forms-column {
  display: grid;
  gap: 18px;
  grid-column: 3;
  grid-row: 1;
  align-content: start;
  min-width: 0;
}

.add-doctor-panel {
  height: var(--top-panel-height);
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.howto-tab-panel {
  margin: 0 clamp(18px, 4vw, 48px) 42px;
}

.howto-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.howto-pdf {
  background: #070c13;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  height: 78vh;
  min-height: 520px;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  padding: 18px;
}

.howto-page {
  display: block;
  height: auto;
  margin: 0 auto 18px;
  max-width: none;
  width: 100%;
}

.howto-header .account-link { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; }

.howto-contact {
  color: var(--muted);
  margin-top: 16px;
}

.howto-contact a { color: #8bbaff; }

.connection-stack {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.connection-panel {
  height: var(--lower-panel-height);
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.connection-stack .connection-panel,
.connection-stack .mentorship-comment-panel {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
}

.app-shell.has-mentorship-comment .connection-panel {
  height: auto;
  overflow-y: visible;
}

.mentorship-comment-panel {
  display: grid;
  gap: 14px;
  align-self: start;
}

.mentorship-comment-panel[hidden] {
  display: none;
}

.mentorship-comment-panel textarea {
  min-height: 126px;
  resize: vertical;
}

.comment-recipient-options {
  background: rgba(4, 10, 20, 0.92);
  border: 1px solid rgba(111, 151, 196, 0.34);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin-top: 2px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.comment-recipient-options button {
  background: transparent;
  border: 1px solid transparent;
  color: #dbeaff;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 8px 9px;
  text-align: left;
}

.comment-recipient-options button:hover,
.comment-recipient-options button:focus {
  background: rgba(0, 83, 155, 0.24);
  border-color: rgba(88, 166, 255, 0.38);
}

.comment-recipient-options em {
  color: #9fb4cf;
  font-size: 0.78rem;
  font-weight: 700;
}

.connection-decor {
  background:
    radial-gradient(ellipse at 13% 72%, rgba(217, 169, 0, 0.18), transparent 34%),
    radial-gradient(ellipse at 82% 24%, rgba(119, 183, 255, 0.14), transparent 31%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, rgba(0, 83, 155, 0.18), rgba(181, 138, 0, 0.12));
  border: 1px solid rgba(90, 132, 184, 0.24);
  border-radius: 8px;
  display: block;
  isolation: isolate;
  min-height: 52px;
  overflow: hidden;
  position: relative;
}

.connection-decor::after {
  content: "";
  position: absolute;
}

.connection-decor::before {
  border: 1px solid rgba(217, 169, 0, 0.3);
  border-radius: 52% 45% 58% 42%;
  bottom: -18px;
  box-shadow:
    inset 0 0 0 10px rgba(217, 169, 0, 0.025),
    0 0 18px rgba(181, 138, 0, 0.13);
  content: "";
  height: 58px;
  left: 116px;
  position: absolute;
  transform: rotate(5deg);
  width: 150px;
  z-index: 1;
}

.connection-decor::after {
  background:
    linear-gradient(100deg, transparent 8%, rgba(119, 183, 255, 0.1) 47%, transparent 74%),
    radial-gradient(ellipse at 55% 60%, rgba(181, 138, 0, 0.08), transparent 40%);
  inset: 0;
  opacity: 0.82;
  z-index: 0;
}

.connection-decor span {
  background: transparent;
  border: 1px solid rgba(217, 169, 0, 0.42);
  border-radius: 48% 53% 44% 57%;
  box-shadow: 0 0 14px rgba(181, 138, 0, 0.14);
  height: 33px;
  left: 24px;
  position: absolute;
  top: 9px;
  transform: rotate(-8deg);
  width: 92px;
  z-index: 2;
}

.connection-decor span:nth-child(2) {
  border-color: rgba(119, 183, 255, 0.34);
  border-radius: 55% 44% 51% 46%;
  height: 22px;
  left: 49px;
  top: 18px;
  transform: rotate(-14deg);
  width: 58px;
}

.connection-decor span:nth-child(3) {
  border-color: rgba(217, 169, 0, 0.32);
  border-radius: 43% 56% 48% 59%;
  height: 46px;
  left: auto;
  right: 22px;
  top: -5px;
  transform: rotate(9deg);
  width: 130px;
}

.section-heading {
  margin-bottom: 15px;
}

form {
  display: grid;
  gap: 13px;
}

.edit-profile-form {
  display: grid;
  gap: 14px;
}

.year-range-inputs {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.year-range-inputs span {
  color: var(--muted);
  font-weight: 800;
}

.duplicate-prompt {
  background: rgba(4, 10, 20, 0.58);
  border: 1px solid rgba(88, 166, 255, 0.34);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  margin-top: 16px;
  padding: 14px;
}

.duplicate-prompt p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 8px;
}

.duplicate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}

.relationship-edit-dialog {
  align-items: center;
  background: rgba(1, 18, 48, 0.58);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 20;
}

.relationship-edit-dialog[hidden] {
  display: none;
}

.signup-dialog {
  background: #0c192b;
  color: #dbeaff;
  border: 1px solid #365778;
  border-radius: 8px;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 24px;
  box-sizing: border-box;
}
.signup-dialog::backdrop { background: rgba(0, 7, 18, .78); }
.signup-form { display: flex; flex-direction: column; gap: 12px; }
.signup-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.signup-heading h2 { margin: 0; font-size: 1.4rem; }
.signup-names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.signup-form label { display: grid; gap: 6px; min-width: 0; }
.signup-form input { width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; }
.signup-password { position: relative; }
.signup-password input { padding-right: 52px; }
.signup-password .password-eye { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; padding: 8px; display: grid; place-items: center; }
.password-eye svg { width: 20px; height: 20px; }
.password-eye[aria-pressed="true"] { color: #e9c85e; }
.signup-error { color: #ffaaaa; margin: 0; }
@media (max-width: 420px) { .signup-names { grid-template-columns: 1fr; } }

.relationship-edit-card {
  background:
    linear-gradient(180deg, rgba(16, 28, 46, 0.98), rgba(9, 16, 28, 0.98));
  border: 2px solid rgba(88, 166, 255, 0.5);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(1, 18, 48, 0.42);
  max-height: min(760px, calc(100vh - 40px));
  max-width: 520px;
  overflow: auto;
  padding: 18px;
  width: min(100%, 520px);
}

.claimed-profile-issue-card {
  gap: 16px;
}

.claimed-profile-issue-card .bio {
  background: rgba(4, 10, 20, 0.36);
  border: 1px solid rgba(111, 151, 196, 0.28);
  border-radius: 8px;
  padding: 12px;
}

.claimed-profile-issue-options label {
  align-items: flex-start;
}

.app-message-dialog {
  background:
    radial-gradient(circle at 50% 42%, rgba(181, 138, 0, 0.14), transparent 34%),
    rgba(1, 18, 48, 0.68);
  backdrop-filter: blur(7px);
}

.app-message-card {
  max-width: min(460px, calc(100vw - 34px));
}

.app-message-card .bio {
  background: rgba(4, 10, 20, 0.38);
  border: 1px solid rgba(111, 151, 196, 0.28);
  border-radius: 8px;
  color: #dbeaff;
  margin: 0;
  padding: 12px;
}

.app-toast-region {
  bottom: 18px;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
  position: fixed;
  right: 18px;
  z-index: 110;
}

.app-toast {
  align-items: start;
  animation: toast-slide-in 180ms ease-out;
  backdrop-filter: blur(18px);
  background: rgba(4, 13, 27, 0.94);
  border: 1px solid rgba(111, 151, 196, 0.42);
  border-left: 4px solid #58a6ff;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 22px rgba(0, 83, 155, 0.18);
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 12px 12px 14px;
  pointer-events: auto;
}

.app-toast[data-tone="success"] {
  border-left-color: #d9a900;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 22px rgba(217, 169, 0, 0.18);
}

.app-toast[data-tone="warning"] {
  border-left-color: #ffca26;
}

.app-toast[data-tone="error"] {
  border-left-color: #ff7b7b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 22px rgba(255, 123, 123, 0.16);
}

.app-toast.is-dismissing {
  animation: toast-slide-out 180ms ease-in forwards;
}

.app-toast-content {
  display: grid;
  gap: 4px;
}

.app-toast-content p {
  color: #9dccff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.app-toast-content span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.app-toast-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 173, 204, 0.28);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 24px;
}

.app-toast-close:hover {
  border-color: rgba(217, 169, 0, 0.55);
  color: var(--ink);
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

.relationship-edit-header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.relationship-edit-header h3 {
  color: #dbeaff;
  font-family: "Libre Baskerville", Georgia, serif;
  margin-top: 3px;
}

.icon-close-button {
  min-width: 40px;
  padding: 8px 12px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .map-tab-shell {
    grid-template-columns: 1fr;
  }

  .geography-panel,
  .geography-sidebar {
    height: auto;
    min-height: auto;
  }

  .geography-header {
    align-items: stretch;
    flex-direction: column;
  }

  .geography-header-actions {
    justify-items: stretch;
    max-width: none;
  }

  .geography-search-form {
    grid-template-columns: 1fr;
  }

  .geography-header p:last-child {
    text-align: left;
  }

  .database-status-banner {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .database-status-icon {
    display: none;
  }

  .database-status-action {
    width: 100%;
  }

  .geography-map-viewport {
    min-height: 680px;
  }

  .workspace {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
  }

  .tree-panel,
  .search-panel,
  .profile-panel,
  .forms-column,
  .connection-stack,
  .connection-panel,
  .mentorship-comment-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .forms-column {
    display: grid;
    grid-template-rows: auto;
  }

  .connection-decor {
    display: none;
  }

  .search-panel,
  .profile-panel,
  .connection-panel,
  .mentorship-comment-panel {
    height: auto;
    max-height: none;
    overflow-y: visible;
  }

  .doctor-list {
    max-height: 420px;
  }

  .forms-column {
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .login-form {
    align-items: stretch;
    justify-items: stretch;
  }

  .account-card {
    min-width: 0;
    width: 100%;
  }

  .login-form {
    flex-direction: column;
  }

  .account-fields {
    grid-template-columns: 1fr;
  }

  .login-form.is-logged-in {
    align-items: stretch;
  }

  .account-buttons {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .account-buttons button {
    flex: 1;
  }

  .account-management-grid {
    grid-template-columns: 1fr;
  }

  .moderator-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .account-email-stack {
    height: auto;
  }

  .account-recovery-grid {
    grid-template-columns: 1fr;
  }

  .account-reset-step {
    grid-template-columns: 1fr;
  }

  .account-reset-step label,
  .account-reset-step button {
    grid-column: 1;
  }

  .account-settings-card > button,
  .account-reset-step button {
    justify-self: stretch;
    min-width: 0;
  }

  .login-status {
    text-align: left;
  }

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

  .moderation-request {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .past-role-entry {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .tree-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tree-control-row {
    align-items: flex-start;
    flex-direction: column;
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .relationship-legend {
    justify-content: flex-start;
    justify-self: stretch;
  }

  .map-zoom-controls {
    justify-content: flex-start;
  }

}
