/* Heavier heading weights for better visual hierarchy */
.md-typeset h1 {
  font-weight: 800;
}

.md-typeset h2,
.md-typeset h3 {
  font-weight: 550;
}

.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-weight: 500;
}

/* Population card grid (3-2-1 responsive) */
.population-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 0.4rem;
}

.population-card {
  border: 1px solid #d3d9e2;
  border-radius: 8px;
  padding: 0.8rem 0.85rem;
  background: #ffffff;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.population-card h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.population-card p {
  margin: 0.2rem 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.population-card .label {
  font-weight: 600;
}

.population-card.ar {
  border-left: 4px solid #1e6fa8;
}

.population-card.ws2 {
  border-left: 4px solid #2f855a;
}

.population-card.optional {
  border-left: 4px dashed #6b46c1;
}

@media (max-width: 1100px) {
  .population-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .population-cards {
    grid-template-columns: 1fr;
  }
}

/* Standardized visual captions */
.md-typeset .figcap {
  max-width: 72ch;
  margin: 0.5rem auto 1.1rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #5f6b7a;
  text-align: left;
}

.md-typeset .exhibit-html + .figcap {
  margin-top: 0.85rem;
}

/* Standard wrapper for pure-HTML exhibits (cards, custom blocks) */
.md-typeset .exhibit-html {
  width: min(94%, 1100px);
  margin: 1.1rem auto 0.45rem;
}

/* Staggered timeline exhibit (program flow) */
.program-gantt {
  display: grid;
  gap: 0.85rem;
}

.gantt-thread {
  border: 1px solid #d3d9e2;
  border-left: 4px solid #5b6b7e;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.65rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.gantt-thread strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.88rem;
}

.gantt-axis {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.45rem 0.55rem;
  font-size: 0.72rem;
  color: #4d5d72;
}

.gantt-axis span:nth-child(1) {
  grid-column: 1 / 5;
}

.gantt-axis span:nth-child(2) {
  grid-column: 5 / 9;
  text-align: center;
}

.gantt-axis span:nth-child(3) {
  grid-column: 9 / 13;
  text-align: right;
}

.gantt-lane {
  border: 1px solid #d3d9e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.7rem;
}

.gantt-lane h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.gantt-lane.ws1 {
  border-left: 4px solid #1e6fa8;
}

.gantt-lane.ws2 {
  border-left: 4px solid #2f855a;
}

.gantt-lane.beyond {
  border-left: 4px solid #7c3aed;
}

.gantt-lanes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.65rem;
}

.gantt-lanes .gantt-lane.ws1 {
  grid-column: 1 / 10;
}

.gantt-lanes .gantt-lane.ws2 {
  grid-column: 4 / 13;
}

.gantt-lanes .gantt-lane.beyond {
  grid-column: 6 / 13;
}

.gantt-focus {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #2f3d4f;
}

.gantt-focus .label {
  font-weight: 700;
}

.gantt-note {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: #516072;
}

.gantt-row {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 0.55rem;
  align-items: center;
}

.gantt-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3c4b60;
}

.gantt-bar {
  display: grid;
  gap: 0.45rem;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.4rem;
}

.gantt-bar.ws1 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gantt-bar.ws2 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bar-seg {
  border: 1px solid #e0e7f0;
  border-radius: 6px;
  background: #f8fbff;
  padding: 0.35rem 0.4rem;
  font-size: 0.7rem;
  line-height: 1.25;
}

.bar-seg.delayed {
  background: #eef6ff;
  border-color: #c9ddf5;
}

.gantt-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.gantt-notes h4 {
  margin: 0 0 0.2rem;
  font-size: 0.76rem;
}

.gantt-notes p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .gantt-axis {
    display: none;
  }

  .gantt-lanes {
    display: block;
  }

  .gantt-row {
    grid-template-columns: 1fr;
  }

  .gantt-bar.ws1,
  .gantt-bar.ws2 {
    grid-template-columns: 1fr;
  }

  .gantt-notes {
    grid-template-columns: 1fr;
  }
}

/* Charter process flow exhibit */
.charter-flow {
  display: grid;
  gap: 0.7rem;
}

.charter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
}

.charter-step {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem 0.6rem;
}

.charter-step h5 {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.charter-step p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #344256;
}

.charter-step.ws1 {
  border-left: 4px solid #1e6fa8;
}

.charter-step.gate {
  border-left: 4px solid #915f00;
  background: #fffdf5;
}

.charter-step.ws2 {
  border-left: 4px solid #2f855a;
}

.charter-arrow {
  text-align: center;
  font-size: 1rem;
  color: #7a8899;
  line-height: 1;
}

.charter-trigger {
  border: 1px dashed #c7d3e3;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: #f8fafd;
  font-size: 0.75rem;
  color: #3e4f65;
}

@media (max-width: 900px) {
  .charter-row {
    grid-template-columns: 1fr;
  }

  .charter-arrow {
    transform: rotate(90deg);
  }
}

/* Workstream vertical timeline exhibit */
.ws-vertical {
  border: 1px solid #d7dfeb;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 0.8rem 0.9rem;
}

.ws-vertical h4 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.ws-axis {
  position: relative;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
}

.ws-axis::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.1rem;
  bottom: 0.1rem;
  width: 2px;
  background: #c3d0e2;
}

.ws-block {
  position: relative;
  width: min(78%, 760px);
  border: 1px solid #d6e0ec;
  border-left: 4px solid #1e6fa8;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.ws-block::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.8rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: #3f79aa;
}

.ws-block h5 {
  margin: 0 0 0.22rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.ws-block p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #334256;
}

.ws-output {
  margin-top: 0.28rem;
  font-size: 0.73rem;
  color: #4a5d75;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.ws-output .arrow {
  font-weight: 700;
  color: #2f5f90;
}

.ws-vertical.ws2 .ws-block {
  border-left-color: #2f855a;
}

.ws-vertical.ws2 .ws-block::before {
  background: #2f855a;
}

.ws-vertical.ws2 .ws-output .arrow {
  color: #2f855a;
}

.ws-notes {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.ws-notes .note {
  border: 1px solid #dce6f2;
  border-radius: 7px;
  padding: 0.4rem 0.45rem;
  background: #f8fbff;
}

.ws-notes .note strong {
  display: block;
  font-size: 0.73rem;
  margin-bottom: 0.15rem;
}

.ws-notes .note p {
  margin: 0;
  font-size: 0.71rem;
  line-height: 1.28;
}

@media (max-width: 900px) {
  .ws-block {
    width: 100%;
  }

  .ws-notes {
    grid-template-columns: 1fr;
  }
}
