:root{
  --bg: #ffffff;
  --panel: #ffffff;
  --panel2: #ffffff;
  --text: #111827;      /* near-black */
  --muted: #4b5563;     /* slate */
  --line: rgba(17,24,39,.18);

  --accent: #e11d48;    /* USMG-ish red */
  --good: rgba(34,197,94,.9);
  --warn: rgba(245,158,11,.9);
  --empty: rgba(148,163,184,.9);

  --radius: 16px;
}

*{ box-sizing: border-box; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.usmg-org-page{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.hero{
  padding: 10px 6px 6px;
}
.hero h1{
  margin: 10px 0 6px;
  letter-spacing: .2px;
}
.subtitle{
  margin: 0;
  color: var(--muted);
}

.card{
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid rgba(17,24,39,.10);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  padding: 16px;
}

.card-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(17,24,39,.08);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.card-head h2{ margin: 0; }
.card-head p{
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.footer{
  margin-top: 22px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

/* --- Org chart --- */
.orgchart-wrap{
  overflow-x: auto;
  padding: 12px 8px 18px;
}

/* Classic org chart tree connectors */
/* Prevent children from wrapping to a new line (keeps VPs under President) */
.org ul{
  padding-top: 20px;
  position: relative;
  margin: 0;
  padding-left: 0;
  text-align: center;

  /* NEW */
  white-space: nowrap;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

/* Let individual cards render normally inside nowrap rows */
.org li{
  display: inline-block;
  list-style-type: none;
  position: relative;
  padding: 20px 10px 0 10px;
  vertical-align: top;

  /* NEW */
  white-space: normal;
}

/* connector lines */
.org li::before,
.org li::after{
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 1px solid var(--line);
  width: 50%;
  height: 20px;
}
.org li::after{
  right: auto;
  left: 50%;
  border-left: 1px solid var(--line);
}

.org li:only-child::after,
.org li:only-child::before{ display: none; }
.org li:only-child{ padding-top: 0; }

/* Don't kill the whole connector element; only remove the horizontal segment */
.org li:first-child::before{
  border-top: 0 none;     /* keep the element, just remove the top line */
}

.org li:last-child::after{
  border-top: 0 none;     /* keep border-left so vertical drop stays */
}

.org li ul::before{
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 1px solid var(--line);
  width: 0;
  height: 20px;
}

.node-link{
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.node{
  display: inline-flex;
  flex-direction: column;
  min-width: 240px;
  max-width: 280px;
  background: #ffffff;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 14px;
  padding: 12px 12px 10px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.node:hover{
  transform: translateY(-2px);
  border-color: rgba(225,29,72,.35);
  box-shadow: 0 12px 26px rgba(0,0,0,.08);
}

.node .role{
  font-weight: 750;
  letter-spacing: .2px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.node .name{
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.25rem;
  word-break: break-word;
}
.node .meta{
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(17,24,39,.55);
  font-size: .82rem;
}

.node.filled .badge{ background: var(--good); }
.node.tbd .badge{ background: var(--warn); }
.node.empty .badge{ background: var(--empty); }

.legend{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: .9rem;
}
.dot{
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin: 0 6px 0 14px;
}
.dot:first-child{ margin-left: 0; }
.dot-filled{ background: var(--good); }
.dot-tbd{ background: var(--warn); }
.dot-empty{ background: var(--empty); }

/* Advisory / Trustee cards */

.advisory-wrap{
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 16px;
  margin-top: 28px;
}

.advisory-card{
  background: #fff;
  border: 1px solid rgba(17,24,39,.10);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}

.advisory-card h3{
  margin: 0 0 8px;
}

.advisory-card p{
  margin: 0 0 10px;
  color: #374151;
  line-height: 1.55;
}

.advisory-card a{
  color: #e11d48;
  font-weight: 700;
  text-decoration: none;
}

.advisory-card a:hover{
  text-decoration: underline;
}


/* Root row with side advisors + president in the middle */
.org-root{
  text-align: center;
}

/* Row that sits above the children */
.org-toprow{
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
  width: max-content;      /* ensures true centering */
}

/* Side containers */
.org-side{
  display: flex;
  justify-content: center;
  min-width: 260px;        /* keeps them from collapsing */
}

/* Center container */
.org-center{
  display: flex;
  justify-content: center;
}

/* Advisors: subtle dashed border so people understand "advisory" */
.org-side .node{
  border-style: dashed;
  opacity: .92;
}

@media (max-width: 520px){
  .node{ min-width: 210px; }
}