@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap");
:root {
  --uoa-navy: #00467F;
  --uoa-navy-dark: #003060;
  --uoa-navy-light: #005CA8;
  --uoa-gold: #E8A000;
  --uoa-gold-light: #FFF3CC;
  --uoa-teal: #00877A;
  --bg: #FFFFFF;
  --bg2: #F5F7FA;
  --bg3: #EDF0F5;
  --border: #D6DCE6;
  --border2: #B8C4D4;
  --text: #1A2233;
  --text2: #3D5068;
  --text3: #7A8FA6;
  --text-on-navy2: rgba(255,255,255,0.75);
  --green: #007A5E;
  --red: #C0392B;
  --radius: 4px;
  --transition: 180ms ease;
  --shadow-sm: 0 1px 3px rgba(0,70,127,0.08);
  --shadow-md: 0 4px 16px rgba(0,70,127,0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg2);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

.app {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 100vh;
}

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 108px);
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

.uoa-topbar {
  background: var(--uoa-navy-dark);
  padding: 0 2rem;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.uoa-topbar .uoa-wordmark {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@media (max-width: 480px) {
  .uoa-topbar .uoa-wordmark {
    font-size: 0.6rem;
  }
}
.uoa-topbar .uoa-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 0.5rem;
}
@media (max-width: 480px) {
  .uoa-topbar .uoa-divider {
    display: none;
  }
}
.uoa-topbar .uoa-faculty {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}
@media (max-width: 480px) {
  .uoa-topbar .uoa-faculty {
    display: none;
  }
}

.site-header {
  background: var(--uoa-navy);
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.site-header .header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-header .header-brand .uoa-logo-mark {
  width: 38px;
  height: 38px;
  background: var(--uoa-navy);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Source Serif 4", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--uoa-navy-dark);
  flex-shrink: 0;
}
.site-header .header-brand .brand-text h1 {
  font-family: "Source Serif 4", serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
@media (max-width: 480px) {
  .site-header .header-brand .brand-text h1 {
    font-size: 0.9rem;
  }
}
.site-header .header-brand .brand-text .brand-sub {
  font-size: 0.68rem;
  color: var(--text-on-navy2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@media (max-width: 480px) {
  .site-header .header-brand .brand-text .brand-sub {
    display: none;
  }
}
.site-header .header-stats {
  display: flex;
  gap: 0;
}
@media (max-width: 600px) {
  .site-header .header-stats {
    display: none;
  }
}
.site-header .header-stats .stat {
  text-align: center;
  padding: 0.4rem 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}
.site-header .header-stats .stat:first-child {
  border-left: none;
}
.site-header .header-stats .stat .stat-num {
  font-family: "Source Serif 4", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
  line-height: 1;
}
.site-header .header-stats .stat .stat-label {
  font-size: 0.62rem;
  color: var(--text-on-navy2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    max-height: 45vh;
    border-right: none;
    border-bottom: 2px solid var(--uoa-navy);
  }
}
.sidebar .sidebar-search {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.sidebar .sidebar-search .search-wrap {
  position: relative;
}
.sidebar .sidebar-search .search-wrap input {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border-radius: var(--radius);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition);
}
.sidebar .sidebar-search .search-wrap input::placeholder {
  color: var(--text3);
}
.sidebar .sidebar-search .search-wrap input:focus {
  border-color: var(--uoa-navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 70, 127, 0.1);
}
.sidebar .sidebar-search .search-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 1rem;
}
.sidebar .sidebar-filters {
  padding: 0.875rem 1.25rem;
  border-bottom: 2px solid var(--uoa-navy);
}
.sidebar .sidebar-filters .filter-group {
  margin-bottom: 0.75rem;
}
.sidebar .sidebar-filters .filter-group:last-child {
  margin-bottom: 0;
}
.sidebar .sidebar-filters .filter-group label.filter-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.sidebar .sidebar-filters .filter-group .filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
@media (max-width: 900px) {
  .sidebar .sidebar-filters .filter-group .filter-pills {
    gap: 0.3rem;
  }
}
.sidebar .sidebar-filters .filter-group .filter-pills button {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 500;
}
.sidebar .sidebar-filters .filter-group .filter-pills button:hover {
  border-color: var(--uoa-navy);
  color: var(--uoa-navy);
  background: rgba(0, 70, 127, 0.04);
}
.sidebar .sidebar-filters .filter-group .filter-pills button.active {
  background: var(--uoa-navy);
  border-color: var(--uoa-navy);
  color: #fff;
}
.sidebar .sidebar-list {
  flex: 1;
  overflow-y: auto;
}
.sidebar .sidebar-list .list-section {
  border-bottom: 1px solid var(--border);
}
.sidebar .sidebar-list .list-section .section-header {
  padding: 0.55rem 1.25rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  background: var(--uoa-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar .sidebar-list .list-section .section-header .section-count {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}
.sidebar .sidebar-list .list-section .course-list-item {
  padding: 0.55rem 1.25rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar .sidebar-list .list-section .course-list-item:hover {
  background: var(--bg2);
  border-left-color: var(--border2);
}
.sidebar .sidebar-list .list-section .course-list-item.active {
  background: rgba(0, 70, 127, 0.06);
  border-left-color: var(--uoa-navy);
}
.sidebar .sidebar-list .list-section .course-list-item .item-code {
  font-size: 0.7rem;
  color: var(--uoa-navy);
  white-space: nowrap;
  min-width: 85px;
  font-weight: 700;
}
.sidebar .sidebar-list .list-section .course-list-item .item-title {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.sidebar .sidebar-list .list-section .course-list-item.active .item-title {
  color: var(--text);
  font-weight: 600;
}
.sidebar .sidebar-list .list-section .course-list-item .item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.sidebar .sidebar-list .list-section .course-list-item .item-dot.inactive {
  background: var(--border2);
}

.main-content {
  overflow-y: auto;
  padding: 2rem;
  background: var(--bg2);
}
@media (max-width: 900px) {
  .main-content {
    padding: 1rem;
  }
}
@media (max-width: 480px) {
  .main-content {
    padding: 0.75rem;
  }
}

.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  text-align: center;
  gap: 1rem;
  padding: 1rem;
}
.welcome-state .welcome-icon {
  width: 64px;
  height: 64px;
  background: var(--uoa-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--uoa-gold);
}
.welcome-state h2 {
  font-family: "Source Serif 4", serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--uoa-navy);
}
.welcome-state p {
  color: var(--text2);
  font-size: 0.9rem;
  max-width: 420px;
  line-height: 1.7;
}
.welcome-state .pathway-hint {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}
.welcome-state .pathway-hint .hint-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.welcome-state .pathway-hint .hint-pill:hover {
  border-color: var(--uoa-navy);
  color: var(--uoa-navy);
  box-shadow: var(--shadow-md);
}
.welcome-state .pathway-hint .hint-pill .pill-code {
  font-weight: 700;
  color: var(--uoa-navy);
  font-size: 0.75rem;
}

.path-view .path-title {
  font-family: "Source Serif 4", serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--uoa-navy);
  margin-bottom: 0.25rem;
  border-bottom: 3px solid var(--uoa-navy);
  padding-bottom: 0.75rem;
}
.path-view .path-subtitle {
  color: var(--text3);
  font-size: 0.82rem;
  margin-bottom: 2rem;
  margin-top: 0.5rem;
}
.path-view .path-level {
  margin-bottom: 2.5rem;
  position: relative;
}
.path-view .path-level::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2.5rem;
  bottom: -2.5rem;
  width: 2px;
  background: var(--border);
}
.path-view .path-level:last-child::before {
  display: none;
}
.path-view .path-level .level-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.path-view .path-level .level-header .level-dot {
  position: absolute;
  left: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--uoa-navy);
  background: var(--bg);
}
.path-view .path-level .level-header .level-name {
  font-family: "Source Serif 4", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--uoa-navy);
}
.path-view .path-level .level-header .level-count {
  font-size: 0.7rem;
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg);
}
.path-view .path-level .level-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding-left: 1.5rem;
}
@media (max-width: 600px) {
  .path-view .path-level .level-cards {
    grid-template-columns: 1fr;
    padding-left: 1rem;
    gap: 0.75rem;
  }
}

.course-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--uoa-navy);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.course-card:hover {
  border-top-color: var(--uoa-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.course-card.selected {
  border-top-color: var(--uoa-gold);
  outline: 2px solid var(--uoa-navy);
  outline-offset: 2px;
  box-shadow: var(--shadow-md);
}
.course-card .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.course-card .card-header .card-code {
  font-size: 0.72rem;
  color: var(--uoa-navy);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.course-card .card-header .card-units {
  font-size: 0.63rem;
  color: var(--text3);
  white-space: nowrap;
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.course-card .card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
.course-card .card-prereqs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.course-card .card-prereqs .prereq-tag {
  font-size: 0.63rem;
  background: rgba(0, 70, 127, 0.07);
  border: 1px solid rgba(0, 70, 127, 0.2);
  color: var(--uoa-navy);
  padding: 1px 7px;
  border-radius: 3px;
}
.course-card .card-prereqs .no-prereq {
  font-size: 0.7rem;
  color: var(--text3);
  font-style: italic;
}
.course-card .card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.course-card .card-badges .badge {
  font-size: 0.58rem;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.course-card .card-badges .badge.badge-active {
  background: rgba(0, 122, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 122, 94, 0.25);
}
.course-card .card-badges .badge.badge-inactive {
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
}
.course-card .card-badges .badge.badge-main {
  background: rgba(232, 160, 0, 0.12);
  color: #7a5200;
  border: 1px solid rgba(232, 160, 0, 0.3);
}
.course-card .card-badges .badge.badge-thesis {
  background: rgba(192, 57, 43, 0.08);
  color: var(--red);
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.detail-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--uoa-navy);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  animation: slideIn 200ms ease;
}
@media (max-width: 600px) {
  .detail-panel {
    padding: 1.25rem;
  }
}
@media (max-width: 480px) {
  .detail-panel {
    padding: 1rem;
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.detail-panel .detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.detail-panel .detail-top .detail-code-block {
  flex: 1;
}
.detail-panel .detail-top .detail-code-block .detail-code {
  font-size: 0.75rem;
  color: var(--uoa-navy);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.detail-panel .detail-top .detail-code-block h2 {
  font-family: "Source Serif 4", serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--uoa-navy);
  line-height: 1.25;
  max-width: 580px;
}
@media (max-width: 480px) {
  .detail-panel .detail-top .detail-code-block h2 {
    font-size: 1.2rem;
  }
}
.detail-panel .detail-top .detail-meta {
  text-align: right;
  flex-shrink: 0;
  background: var(--uoa-navy);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
}
@media (max-width: 480px) {
  .detail-panel .detail-top .detail-meta {
    padding: 0.4rem 0.75rem;
  }
}
.detail-panel .detail-top .detail-meta .meta-units {
  font-family: "Source Serif 4", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
  line-height: 1;
}
@media (max-width: 480px) {
  .detail-panel .detail-top .detail-meta .meta-units {
    font-size: 1.2rem;
  }
}
.detail-panel .detail-top .detail-meta .meta-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.detail-panel .detail-description {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.detail-panel .detail-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
@media (max-width: 480px) {
  .detail-panel .detail-sections {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
.detail-panel .detail-sections .detail-section .section-title {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text3);
  margin-bottom: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.detail-panel .detail-sections .detail-section .section-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--uoa-navy);
  border-radius: 2px;
}
.detail-panel .detail-sections .detail-section .section-content {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}
.detail-panel .detail-sections .detail-section .section-content .prereq-item {
  display: inline-block;
  background: rgba(0, 70, 127, 0.07);
  border: 1px solid rgba(0, 70, 127, 0.2);
  color: var(--uoa-navy);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 2px;
}
.detail-panel .detail-sections .detail-section .section-content .coreq-item {
  display: inline-block;
  background: rgba(0, 122, 94, 0.08);
  border: 1px solid rgba(0, 122, 94, 0.2);
  color: var(--green);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 2px;
}
.detail-panel .detail-sections .detail-section .section-content .restrict-item {
  display: inline-block;
  background: rgba(192, 57, 43, 0.07);
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: var(--red);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 2px;
}
.detail-panel .detail-sections .detail-section .section-content .none-text {
  color: var(--text3);
  font-style: italic;
  font-size: 0.82rem;
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .req-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .req-group.req-or-group {
  background: rgba(0, 70, 127, 0.03);
  border: 1px dashed rgba(0, 70, 127, 0.15);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .req-connector {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  margin: 0 0.1rem;
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .req-connector.req-and {
  background: rgba(0, 70, 127, 0.1);
  color: var(--uoa-navy);
  border: 1px solid rgba(0, 70, 127, 0.2);
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .req-connector.req-or {
  background: rgba(232, 160, 0, 0.12);
  color: #7a5200;
  border: 1px solid rgba(232, 160, 0, 0.3);
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .prereq-link {
  cursor: pointer;
  transition: all var(--transition);
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .prereq-link:hover {
  background: var(--uoa-navy);
  color: #fff;
  border-color: var(--uoa-navy);
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .prereq-or-item {
  background: rgba(0, 70, 127, 0.04);
  border-color: rgba(0, 70, 127, 0.15);
}
.detail-panel .detail-sections .detail-section .section-content.prereq-tree .prereq-text {
  font-size: 0.75rem;
  color: var(--text2);
  font-style: italic;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.detail-panel .detail-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.detail-panel .detail-badges .badge {
  font-size: 0.68rem;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-panel .detail-badges .badge.badge-active {
  background: rgba(0, 122, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 122, 94, 0.25);
}
.detail-panel .detail-badges .badge.badge-inactive {
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
}
.detail-panel .detail-badges .badge.badge-main {
  background: rgba(232, 160, 0, 0.12);
  color: #7a5200;
  border: 1px solid rgba(232, 160, 0, 0.3);
}
.detail-panel .detail-badges .badge.badge-level {
  background: rgba(0, 70, 127, 0.08);
  color: var(--uoa-navy);
  border: 1px solid rgba(0, 70, 127, 0.2);
}

.prereq-graph {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--uoa-gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.prereq-graph h3 {
  font-family: "Source Serif 4", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--uoa-navy);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.prereq-graph h3 span {
  font-size: 0.68rem;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text3);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.prereq-graph .graph-svg-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 60px;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prereq-graph .graph-svg-wrap .graph-svg {
  flex-shrink: 0;
  width: 60px;
  overflow: visible;
  align-self: stretch;
}
.prereq-graph .graph-svg-wrap .graph-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  flex-shrink: 0;
}
.prereq-graph .graph-svg-wrap .graph-no-links {
  color: var(--text3);
  font-size: 0.8rem;
  margin-left: 0.75rem;
}
.prereq-graph .flow-node {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.prereq-graph .flow-node:hover {
  border-color: var(--uoa-navy);
  color: var(--uoa-navy);
  background: rgba(0, 70, 127, 0.05);
}
.prereq-graph .flow-node.node-current {
  border-color: var(--uoa-navy);
  background: var(--uoa-navy);
  color: #fff;
  cursor: default;
}
.prereq-graph .flow-node.node-prereq {
  border-color: rgba(0, 70, 127, 0.3);
  background: rgba(0, 70, 127, 0.06);
  color: var(--uoa-navy);
}
.prereq-graph .flow-node.node-dependent {
  border-color: rgba(0, 135, 122, 0.3);
  background: rgba(0, 135, 122, 0.06);
  color: var(--uoa-teal);
}
.prereq-graph .flow-node.node-or {
  border-style: dashed;
  opacity: 0.85;
}
.prereq-graph .flow-node .node-title {
  display: block;
  font-size: 0.62rem;
  color: var(--text3);
  font-weight: 400;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.prereq-graph .flow-node.node-current .node-title {
  color: rgba(255, 255, 255, 0.7);
}

.empty-state {
  padding: 3rem;
  text-align: center;
  color: var(--text3);
  font-size: 0.9rem;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--uoa-navy);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  margin-right: 0.5rem;
}
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: all var(--transition);
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .sidebar {
    max-height: 0;
    overflow: hidden;
    border-bottom: none;
    transition: max-height 300ms ease, border-bottom 300ms ease;
  }
  .sidebar.sidebar-open {
    max-height: 60vh;
    overflow-y: auto;
    border-bottom: 2px solid var(--uoa-navy);
  }
}
@media (max-width: 600px) {
  .path-view .path-title {
    font-size: 1.3rem;
  }
  .path-view .path-level {
    margin-bottom: 1.75rem;
  }
  .path-view .path-level::before {
    display: none;
  }
  .path-view .path-level .level-header {
    padding-left: 0;
  }
  .path-view .path-level .level-header .level-dot {
    display: none;
  }
  .path-view .path-level .level-cards {
    padding-left: 0;
  }
}
@media (max-width: 600px) {
  .prereq-graph {
    padding: 1rem;
  }
  .prereq-graph .graph-svg-wrap {
    min-height: 40px;
  }
  .prereq-graph .flow-node {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    min-height: 38px;
  }
  .prereq-graph .flow-node .node-title {
    max-width: 110px;
  }
  .prereq-graph .graph-svg {
    width: 40px;
  }
}