/* TheCodexes.com — Multi-Exam Track Switcher & NGN Polytomous Player Styles (2026-10-27) */
.qb-track-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
}
.qb-track-bar-lbl {
  font: 700 11px/1.2 var(--mono, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b4a3d;
}
.qb-track-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qb-track-tab {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font: 600 13px/1.2 var(--sans, system-ui, sans-serif);
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.qb-track-tab:hover {
  border-color: #0b4a3d;
  color: #0b4a3d;
}
.qb-track-tab.on {
  background: #0b4a3d;
  border-color: #0b4a3d;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 74, 61, 0.22);
}
.qb-track-tab small {
  font-weight: 400;
  opacity: 0.85;
  margin-left: 4px;
}

/* NGN Unfolding Case 6-Stage CJMM Bar */
.ngn-case-bar {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0b4a3d;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.ngn-case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}
.ngn-case-kicker {
  font: 700 11px/1.2 var(--mono, monospace);
  color: #0b4a3d;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ngn-case-stages {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.ngn-stage-pill {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 7px;
  padding: 5px 6px;
  font: 600 11px/1.2 var(--sans, system-ui, sans-serif);
  color: #334155;
  cursor: pointer;
  text-align: left;
}
.ngn-stage-pill.cur {
  background: #0b4a3d;
  border-color: #0b4a3d;
  color: #ffffff;
}
.ngn-stage-pill small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* NGN Tabbed Electronic Health Record (EHR) */
.ngn-ehr-shell {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.ngn-ehr-banner {
  background: #0f172a;
  color: #f8fafc;
  padding: 8px 14px;
  font: 600 12px/1.3 var(--mono, monospace);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ngn-ehr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: #e2e8f0;
  padding: 4px 6px 0;
  border-bottom: 1px solid #cbd5e1;
}
.ngn-ehr-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: #f1f5f9;
  color: #334155;
  font: 600 12px/1.2 var(--sans, system-ui, sans-serif);
  padding: 7px 12px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}
.ngn-ehr-tab.on {
  background: #ffffff;
  color: #0b4a3d;
  border-color: #cbd5e1;
}
.ngn-ehr-panel {
  padding: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #1e293b;
  max-height: 340px;
  overflow-y: auto;
}
.ngn-ehr-entry {
  padding: 9px 11px;
  border-left: 3px solid #0b4a3d;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  margin-bottom: 9px;
}
.ngn-ehr-time {
  font: 700 11px/1.2 var(--mono, monospace);
  color: #0b4a3d;
  margin-bottom: 3px;
}

/* NGN Bow-Tie 3-Column Interactive Diagram */
.ngn-bowtie-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}
.ngn-bt-slot-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ngn-bt-slot-group strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}
.ngn-bt-slot {
  padding: 6px 8px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #ffffff;
  min-height: 30px;
  font-weight: 600;
  color: #0f172a;
}
.ngn-bt-slot.filled {
  border-style: solid;
  border-color: #0b4a3d;
  background: #f0fdf4;
}
.ngn-bt-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 820px) {
  .ngn-bt-cols, .ngn-bowtie-summary {
    grid-template-columns: 1fr;
  }
  .ngn-case-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.ngn-bt-col {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}
.ngn-bt-col h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #0b4a3d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ngn-chip-btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font: 500 13px/1.35 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
.ngn-chip-btn.selected {
  border-color: #0b4a3d;
  background: #ecfdf5;
  font-weight: 600;
}
.ngn-chip-btn.correct-ans {
  border-color: #15803d;
  background: #dcfce7;
}
.ngn-chip-btn.wrong-ans {
  border-color: #b91c1c;
  background: #fee2e2;
}

/* NGN Matrix Grid */
.ngn-matrix-wrap {
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}
.ngn-matrix-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ngn-matrix-tbl th,
.ngn-matrix-tbl td {
  border: 1px solid #e2e8f0;
  padding: 9px 10px;
  text-align: center;
}
.ngn-matrix-tbl th:first-child,
.ngn-matrix-tbl td:first-child {
  text-align: left;
  font-weight: 500;
}
.ngn-matrix-tbl thead th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

/* NGN Cloze Dropdowns */
.ngn-cloze-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ngn-cloze-row {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}
.ngn-cloze-row label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #0f172a;
}
.ngn-cloze-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  font-size: 13px;
  background: #f8fafc;
}

/* NGN Polytomous Score Badge */
.ngn-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #0b4a3d;
  color: #ffffff;
  font: 700 12px/1.2 var(--mono, monospace);
  margin-bottom: 8px;
}

.qb-track-tab { min-height: 44px; }
