:root {
  --uaslp-blue: #004a98;
  --uaslp-sky: #00a9df;
  --org-navy: #002f6c;
  --line: #202020;
  --paper: #ffffff;
  --muted: #f4f7fb;
  --text: #172033;
  --card-w: 94px;
  --card-h: 116px;
  --map-w: 1162px;
}

* {
  box-sizing: border-box;
}

[data-plan-root],
[data-organigram-root],
.prototype-shell {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.prototype-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.prototype-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.prototype-title {
  margin: 0;
  color: var(--uaslp-blue);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
}

.prototype-subtitle {
  margin: 5px 0 0;
  color: #56657a;
  font-size: 14px;
}

.prototype-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.prototype-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #c8d6e8;
  border-radius: 6px;
  background: #fff;
  color: var(--uaslp-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.prototype-link:hover,
.prototype-link[aria-current="page"] {
  background: var(--uaslp-blue);
  color: #fff;
}

.legend-panel,
.map-panel,
.org-panel,
.index-panel,
.plan-block,
.plan-branch {
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(0, 74, 152, 0.08);
}

.legend-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 18px 22px;
  align-items: start;
  justify-content: center;
  padding: 8px 12px 14px;
  background: #f4f9fd;
}

.legend-section {
  width: 100%;
}

.legend-title {
  margin: 0 0 12px;
  color: #111;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.legend-samples,
.classification-samples {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  max-width: none;
  margin: 0;
}

.classification-card {
  position: relative;
  flex: 0 0 108px;
  width: 108px;
  height: 72px;
  display: grid;
  grid-template-rows: 1fr 13px;
  border: 2px solid #111;
  background: var(--sample-bg, #fff);
  color: #111;
}

.classification-body {
  position: relative;
  display: grid;
  place-items: center;
  padding: 7px 5px 4px;
  font-size: 9px;
  line-height: 1.08;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.classification-footer {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 2px solid #111;
}

.classification-footer span {
  border-right: 2px solid #111;
}

.classification-footer span:last-child {
  border-right: 0;
}

.classification-card.prereq {
  --sample-bg: #ffc0c0;
  border-color: transparent;
}

.classification-card.prereq::before {
  content: "";
  position: absolute;
  inset: 0 0 13px;
  border: 2px dashed #111;
  border-bottom: 0;
  pointer-events: none;
}

.classification-card.prereq .classification-footer {
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  border-left: 2px solid #111;
}

.classification-card.humanist .classification-body span {
  display: grid;
  place-items: center;
  width: calc(100% - 14px);
  height: calc(100% - 10px);
  border: 2px solid #111;
}

.classification-card.humanist {
  --sample-bg: #ffc17f;
}

.classification-card.dfm {
  --sample-bg: #a7ef8e;
}

.classification-card.career {
  --sample-bg: #b8c9da;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.classification-card.dui .classification-body span {
  display: grid;
  place-items: center;
  width: calc(100% - 16px);
  height: calc(100% - 8px);
  border: 3px double #111;
  border-radius: 7px 7px 0 0;
}

.classification-card.dui {
  --sample-bg: #fff17a;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.classification-card.area {
  --sample-bg: #bfe1ff;
}

.classification-card.other {
  --sample-bg: #c7a4ff;
}

.legend-course {
  width: 100%;
  min-width: 58px;
  height: 72px;
  border: 2px solid #111;
  background: #fff;
  position: relative;
}

.legend-course::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13px;
  border-top: 2px solid #111;
  background: repeating-linear-gradient(to right, transparent 0 20%, #111 20% calc(20% + 2px), transparent calc(20% + 2px) 40%);
}

.legend-course span {
  position: absolute;
  inset: 12px 6px 18px;
  display: grid;
  place-items: center;
  color: #111;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.legend-course.prereq {
  border-top-style: dashed;
}

.legend-course.prereq::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 2px;
  border-top: 2px dashed #111;
}

.legend-course.humanist span {
  border: 2px solid #111;
  inset: 8px 8px 18px;
}

.legend-course.dui span {
  border: 3px double #111;
  inset: 7px 7px 18px;
  border-radius: 6px 6px 0 0;
}

.legend-course.dfm::before,
.legend-course.career::before,
.legend-course.area::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 16px;
  border-bottom: 2px solid #111;
}

.nomenclature-card {
  position: relative;
  width: 96px;
  height: 68px;
  display: grid;
  grid-template-rows: 15px 1fr 15px;
  margin: 0;
  border: 2px solid #111;
  background: #d8fbfb;
  color: #111;
}

.nomenclature-card.has-pdf-marker::after,
.pdf-corner-sample,
.course-card.has-program-link::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid var(--uaslp-blue);
  border-left: 8px solid transparent;
}

.nomenclature-card.has-pdf-marker::after {
  position: absolute;
  top: 4px;
  right: 4px;
}

.pdf-corner-sample {
  display: inline-block;
  margin-right: 4px;
  vertical-align: -1px;
}

.legend-nomenclature {
  display: grid;
  grid-template-columns: max-content auto;
  gap: 5px 35px;
  align-items: center;
  max-width: none;
  margin: 0;
  justify-content: center;
  justify-items: center;
}

.legend-nomenclature .legend-title {
  grid-column: 1 / -1;
}

.nom-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 2px solid #111;
}

.nom-top span,
.nom-body,
.nom-footer span {
  display: grid;
  place-items: center;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
}

.nom-top span {
  border-right: 2px solid #111;
}

.nom-top span:last-child {
  border-right: 0;
}

.nom-body {
  align-content: center;
  gap: 1px;
}

.nom-code {
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
}

.nom-title-number {
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
}

.nom-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid #111;
}

.nom-footer span {
  border-right: 2px solid #111;
}

.nom-footer span:last-child {
  border-right: 0;
}

.n1 { left: 5px; top: 5px; }
.n8 { left: 22px; top: 5px; }
.n9 { right: 6px; top: 5px; }
.n7 { left: 43px; top: 22px; }
.n2 { left: 5px; bottom: 5px; }
.n3 { left: 20px; bottom: 5px; }
.n4 { left: 36px; bottom: 5px; }
.n5 { right: 18px; bottom: 5px; }
.n6 { right: 5px; bottom: 5px; }

.nomenclature-list {
  display: grid;
  gap: 2px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #111;
  font-size: 13px;
  line-height: 1.2;
}

.nomenclature-list {
  grid-template-columns: 1fr;
}

.cacei-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 8px;
  max-width: 850px;
  margin: 0 auto;
}

.legend-cacei {
  grid-column: 1 / -1;
  margin-top: 42px;
}

.cacei-swatch {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: stretch;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #8392a6;
  background: #fff;
  color: #172033;
}

.cacei-swatch strong {
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(42, 54, 70, 0.35);
  background: var(--badge-bg, #30ded5);
  font-size: 12px;
  font-weight: 900;
}

.cacei-swatch span {
  display: grid;
  align-items: center;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
}

.cacei-swatch[data-cacei="CB"] { --badge-bg: #ec4ee7; }
.cacei-swatch[data-cacei="CI"] { --badge-bg: #ffa34f; }
.cacei-swatch[data-cacei="IA"] { --badge-bg: #ff5558; }
.cacei-swatch[data-cacei="DI"] { --badge-bg: #ad6aff; }
.cacei-swatch[data-cacei="CS"] { --badge-bg: #61e37d; }
.cacei-swatch[data-cacei="CE"] { --badge-bg: #ffd36a; }
.cacei-swatch[data-cacei="CC"] { --badge-bg: #3fe3dc; }
.cacei-swatch[data-cacei="OC"] { --badge-bg: #7f65ff; }

.map-panel {
  width: 100%;
  max-width: 100%;
  padding: 20px;
  overflow-x: visible;
  box-shadow: none;
}

.plan-block {
  width: 100%;
  max-width: 100%;
  margin: 28px auto;
  padding: 22px;
}

.plan-block-required {
  border-top: 5px solid #16856f;
}

.plan-block-elective {
  border-top: 5px solid #6b5bd6;
}

.plan-block-info {
  border-top: 5px solid #00b2e3;
}

.plan-block-notes {
  border-top-color: #f0b429;
}

.plan-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 13px 18px;
  border-left: 7px solid var(--uaslp-blue);
  border-radius: 6px;
  background: #eef4fb;
  color: var(--uaslp-blue);
  cursor: pointer;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
  text-align: left;
  list-style: none;
}

.plan-section-title::-webkit-details-marker {
  display: none;
}

.plan-section-title::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 9px solid var(--uaslp-sky);
  transition: transform 0.25s ease;
}

.plan-block[open] > .plan-section-title::after {
  transform: rotate(90deg);
}

.plan-section-title:hover {
  color: var(--uaslp-sky);
}

.plan-info-content {
  padding: 4px 18px 2px;
  color: #243247;
  font-size: 15px;
  line-height: 1.55;
  text-align: justify;
}

.plan-info-content p {
  margin: 0 0 10px;
  text-align: justify;
}

.plan-info-subtitle {
  margin: 18px 0 10px;
  color: var(--uaslp-blue);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.plan-info-footer {
  margin-top: 12px;
}

.plan-info-list,
.plan-notes-list {
  text-align: justify;
}

.plan-notes-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.plan-info-list {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
  padding-left: 22px;
}

.plan-lettered-list {
  list-style: none;
  padding-left: 0;
}

.plan-subsection-title {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--uaslp-blue);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.plan-branches-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 18px;
  align-items: stretch;
}

.plan-branches-grid-im {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
}

.plan-branch {
  display: flex;
  flex-direction: column;
  grid-column: span var(--branch-span, 1);
  min-height: 170px;
  padding: 14px;
  border-left: 6px solid var(--uaslp-sky);
  box-shadow: 0 3px 10px rgba(0, 74, 152, 0.05);
}

.plan-branch-humanistic {
  border-left-color: #b45309;
}

.plan-branch-mechanical,
.plan-branch-electrical {
  border-left-color: #0f8aa8;
}

.plan-branch-admin,
.plan-branch-other {
  border-left-color: #d97706;
}

.plan-branch-variable {
  border-left-color: #7c3aed;
}

.plan-branch-basic {
  border-left-color: #15803d;
}

.elective-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.elective-gallery .course-card {
  flex: 0 0 var(--card-w);
}

.elective-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 88px;
  border: 1px dashed #aebed0;
  border-radius: 6px;
  background: #f8fbff;
  color: #65748a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.plan-map {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  align-items: start;
}

.semester-row {
  display: grid;
  grid-template-columns: 42px 1fr 78px;
  align-items: stretch;
  gap: 12px;
}

.semester-label {
  display: grid;
  place-items: center;
  min-height: var(--card-h);
  border: 2px solid var(--uaslp-blue);
  border-radius: 4px;
  background: #eef4fb;
  color: var(--uaslp-blue);
  font-size: 18px;
  font-weight: 900;
}

.semester-credits {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: var(--card-h);
  padding: 6px 4px;
  border: 2px solid var(--uaslp-blue);
  border-radius: 4px;
  background: #eef4fb;
  color: var(--uaslp-blue);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.semester-credits strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.semester-credits span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.semester-subjects {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-flow: column;
  align-items: flex-start;
  gap: 10px;
  min-height: var(--card-h);
}

.course-card {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: var(--card-h);
  margin: 0 auto;
  border: 1px solid #8392a6;
  border-radius: 0;
  background: var(--course-bg, #c8e5ff);
  color: #0d2a3c;
  overflow: hidden;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.course-card.has-program-link {
  cursor: pointer;
}

.course-card.has-program-link::after {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 5;
  opacity: 0.75;
  pointer-events: none;
  transition: border-top-color 0.18s ease, opacity 0.18s ease;
}

.course-card.has-program-link:hover::after,
.course-card.has-program-link:focus-visible::after {
  border-top-color: #fff;
  opacity: 1;
}

.course-card.has-program-link:focus-visible {
  outline: 3px solid var(--uaslp-sky);
  outline-offset: 3px;
}

.course-card.is-rounded {
  border-radius: 10px 10px 0 0;
}

.course-card.is-dashed {
  border-color: transparent;
}

.course-card.is-dashed::before {
  content: "";
  position: absolute;
  inset: 0 0 23px;
  z-index: 2;
  border: 1px dashed #8392a6;
  border-bottom: 0;
  pointer-events: none;
}

.course-card.is-dashed .course-footer {
  border-right: 1px solid #8392a6;
  border-bottom: 1px solid #8392a6;
  border-left: 1px solid #8392a6;
}

.course-card:hover,
.course-card:focus-within {
  background: #209bd3;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 74, 152, 0.24);
}

.course-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  height: 21px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(42, 54, 70, 0.35);
  background: var(--course-head, rgba(255, 255, 255, 0.32));
  font-weight: 800;
}

.course-note {
  justify-self: start;
  font-size: 7px;
  line-height: 1;
}

.course-prereq {
  justify-self: center;
  font-size: 9px;
  line-height: 1;
}

.course-level {
  justify-self: end;
  font-size: 7px;
  line-height: 1;
}

.course-card.has-program-link .course-level {
  padding-right: 10px;
}

.course-title {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 69px;
  padding: 4px 6px;
  text-align: center;
  font-size: clamp(8px, 0.72vw, 10px);
  line-height: 1.08;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.course-title > * {
  position: relative;
  z-index: 1;
}

.course-code {
  display: block;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
}

.course-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 23px;
  border-top: 1px solid rgba(42, 54, 70, 0.35);
  background: rgba(255, 255, 255, 0.24);
}

.course-footer span {
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(42, 54, 70, 0.35);
  font-size: 10px;
  font-weight: 700;
}

.course-footer span:last-child {
  border-right: 0;
  background: var(--badge-bg, #30ded5);
  color: #202030;
}

.course-card:hover .course-head,
.course-card:hover .course-footer {
  background: rgba(255, 255, 255, 0.12);
}

.course-card:hover .course-footer span:last-child {
  background: #0070ad;
  color: #fff;
}

.course-card[data-cacei="CB"] { --badge-bg: #ec4ee7; }
.course-card[data-cacei="CI"] { --badge-bg: #ffa34f; }
.course-card[data-cacei="IA"] { --badge-bg: #ff5558; }
.course-card[data-cacei="DI"] { --badge-bg: #ad6aff; }
.course-card[data-cacei="CS"] { --badge-bg: #61e37d; }
.course-card[data-cacei="CE"] { --badge-bg: #ffd36a; }
.course-card[data-cacei="CC"] { --badge-bg: #3fe3dc; }
.course-card[data-cacei="OC"] { --badge-bg: #7f65ff; }

.course-card[data-faculty="prereq"] {
  --course-bg: #ffc0c0;
  --course-head: #ffd9d9;
}

.course-card[data-faculty="humanist"] {
  --course-bg: #ffc17f;
  --course-head: #ffd8ae;
}

.course-card[data-faculty="dfm"] {
  --course-bg: #a7ef8e;
  --course-head: #c8ffbd;
}

.course-card[data-faculty="career"] {
  --course-bg: #b8c9da;
  --course-head: #d5e0eb;
  border-radius: 10px 10px 0 0;
}

.course-card[data-faculty="dui"] {
  --course-bg: #fff17a;
  --course-head: #fff7ad;
  border-radius: 10px 10px 0 0;
}

.course-card[data-faculty="area"],
.course-card[data-faculty="default"] {
  --course-bg: #bfe1ff;
  --course-head: #d9edff;
}

.course-card[data-faculty="other"] {
  --course-bg: #c7a4ff;
  --course-head: #ddcaff;
}

.course-card[data-faculty="dui"] .course-title::before {
  content: "";
  position: absolute;
  inset: 5px 6px 4px;
  border: 2px double rgba(42, 54, 70, 0.72);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
}

.course-card[data-faculty="humanist"] .course-title::before {
  content: "";
  position: absolute;
  inset: 5px 6px 4px;
  border: 1px solid rgba(42, 54, 70, 0.72);
  pointer-events: none;
}

.program-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.program-modal.is-open {
  display: flex;
}

.program-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 24, 44, 0.68);
}

.program-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(88vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(0, 35, 82, 0.35);
}

.program-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: var(--uaslp-blue);
  color: #fff;
}

.program-modal-eyebrow {
  margin: 0 0 4px;
  color: #cfefff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.program-modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.program-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}

.program-modal-close:hover,
.program-modal-close:focus-visible {
  background: var(--uaslp-sky);
  outline: none;
}

.program-modal-viewer {
  min-height: 320px;
  background: #eef4fb;
}

.program-modal-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 62vh;
  border: 0;
  background: #fff;
}

.program-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #d6e0ec;
  background: #f7fbff;
}

.program-modal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--uaslp-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.program-modal-link:hover,
.program-modal-link:focus-visible {
  background: var(--uaslp-sky);
  color: #fff;
  outline: none;
}

.org-panel {
  padding: 24px 0 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}

.org-career-menu {
  margin-bottom: 18px;
}

.org-career-section {
  width: 100%;
  min-width: 672px;
  padding: 28px 0 38px;
  border-bottom: 1px solid #d8e3ef;
}

.org-career-section:last-child {
  border-bottom: 0;
}

.org-career-title {
  margin: 0 0 24px;
  color: var(--org-navy);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.organigram {
  width: 100%;
  min-width: 672px;
  display: grid;
  justify-items: center;
  position: relative;
}

.org-lines-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.org-lines-svg line {
  stroke: var(--org-navy);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.organigram > :not(.org-lines-svg) {
  position: relative;
  z-index: 1;
}

.org-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  position: relative;
  width: 100%;
}

.org-row.stack {
  flex-direction: column;
  align-items: center;
}

.org-line {
  width: 2px;
  height: 30px;
  background: var(--org-navy);
}

.org-card {
  width: 100%;
  max-width: 230px;
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 2px solid var(--org-navy);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 74, 152, 0.08);
}

.org-card.is-wide {
  width: min(390px, 100%);
  max-width: 100%;
  min-height: 84px;
  padding-inline: 18px;
}

.org-role {
  color: var(--org-navy);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.org-name {
  color: #253244;
  font-size: 13px;
  font-weight: 800;
}

.org-card.hour-class {
  max-width: 190px;
  min-height: 68px;
  border-color: var(--org-navy);
  background: #eef5ff;
}

.org-teacher-group {
  width: min(100%, 1180px);
  min-width: min(100%, 672px);
  display: grid;
  justify-items: center;
  gap: 40px;
  margin-top: 16px;
}

.org-teachers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--teacher-count, 3), minmax(0, 1fr));
  justify-content: center;
  gap: 26px clamp(5px, 0.9vw, 12px);
  width: 100%;
  padding-top: 30px;
}

.org-hour-class-row {
  width: 100%;
  display: flex;
  justify-content: center;
}

.org-teachers::before {
  content: none;
}

.org-teacher-slot {
  position: relative;
  min-width: 0;
}

.org-teacher-slot::before {
  content: none;
}

.org-teacher-slot .org-card {
  max-width: none;
  height: 100%;
}

.general-organigram {
  gap: 54px;
}

.org-coordinators {
  width: min(100%, 1180px);
  min-width: 672px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 14px);
  padding-top: 28px;
}

.org-coordinator-slot {
  min-width: 0;
}

.org-coordinator-slot .org-card {
  max-width: none;
  height: 100%;
}

.org-coordinator-slot .org-name {
  font-size: 11px;
}

.org-coordinator-slot .org-role {
  font-size: 8px;
}

.org-teacher-group.is-compact .org-teacher-slot .org-card {
  min-height: 64px;
  padding: 8px 6px;
}

.org-teacher-group.is-compact .org-teacher-slot .org-name {
  font-size: 11px;
}

.org-teacher-group.is-compact .org-teacher-slot .org-role {
  font-size: 9px;
}

.org-teacher-group.is-dense {
  gap: 34px;
}

.org-teacher-group.is-dense .org-teachers {
  gap: 24px 5px;
}

.org-teacher-group.is-dense .org-teacher-slot .org-card {
  min-height: 58px;
  padding: 6px 4px;
  border-width: 1.5px;
}

.org-teacher-group.is-dense .org-teacher-slot .org-name {
  font-size: 9px;
}

.org-teacher-group.is-dense .org-teacher-slot .org-role {
  font-size: 7px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 20px;
}

.index-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
}

.index-card strong {
  color: var(--uaslp-blue);
  font-size: 18px;
}

.index-card span {
  color: #5f6f84;
  font-size: 13px;
}

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

  .prototype-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .prototype-links {
    justify-content: flex-start;
  }

  .program-modal {
    padding: 0;
  }

  .program-modal-panel {
    width: 100%;
    max-width: 100%;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    max-height: 92vh;
    grid-template-rows: auto minmax(280px, 1fr) auto;
  }

  .program-modal-header {
    align-items: flex-start;
    padding: 14px;
  }

  .program-modal-header h2 {
    font-size: 16px;
  }

  .program-modal-viewer iframe {
    min-height: 58vh;
  }
}

@media (max-width: 1207px) {
  .legend-panel,
  .map-panel,
  .plan-block-elective {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .legend-panel {
    justify-content: start;
  }

  .legend-panel > * {
    min-width: max-content;
  }

  .plan-map,
  .plan-branches-grid,
  .plan-branches-grid-im {
    min-width: var(--map-w);
  }
}
