/* ============================================================
   ArcReady — Main Stylesheet
   Design System: Red #CC0000 | White #FFFFFF | Charcoal #1A1A1A
   Desktop-first | Inter font
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --red: #CC0000;
  --red-dark: #A00000;
  --red-light: #FF3333;
  --red-bg: #FFF5F5;
  --white: #FFFFFF;
  --charcoal: #1A1A1A;
  --charcoal-mid: #2C2C2C;
  --gray-light: #F5F5F5;
  --gray-mid: #E0E0E0;
  --gray-border: #CCCCCC;
  --gray-text: #666666;
  --blue: #1565C0;
  --blue-dark: #0D47A1;
  --blue-light: #1E88E5;
  --blue-bg: #F0F4FF;
  --green: #2E7D32;
  --green-light: #4CAF50;
  --green-bg: #F1F8E9;
  --amber: #F57C00;
  --amber-bg: #FFF8E1;
  --danger: #CC0000;
  --font-base: 'Inter', 'Roboto', sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --nav-height: 62px;
  --container-width: 1200px;
  --radius-sm: 4px;
  --radius-btn: 4px;
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.10), 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-deep: 0 4px 24px rgba(0, 0, 0, 0.16);
  --shadow-nav: 0 2px 8px rgba(0, 0, 0, 0.18);
  --transition: all 0.18s ease;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-base);
  background: var(--gray-light);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ============================================================
   TOP NAVIGATION
   ============================================================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--charcoal);
  z-index: 1000;
  box-shadow: var(--shadow-nav);
}

.nav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-icon {
  font-size: 22px;
  line-height: 1;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 2px;
  flex: 1;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.70);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  height: 100%;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  letter-spacing: 0.01em;
}

.nav-tab:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  color: var(--white);
  border-bottom-color: var(--red);
  background: rgba(204, 0, 0, 0.12);
}

.tab-icon {
  font-size: 14px;
}

/* Nav Toggle (Hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.nav-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--white);
  border-radius: 10px;
  transition: all 0.3s linear;
}

/* Nav Active States */
.nav-inner.nav-active .nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-inner.nav-active .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-inner.nav-active .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-inner.nav-active .nav-tabs {
  display: flex !important;
}

.tab-icon--red {
  color: var(--red);
  font-size: 10px;
}

.tab-icon--blue {
  color: var(--blue-light);
  font-size: 10px;
}

/* ============================================================
   MAIN CONTENT & CONTAINER
   ============================================================ */
.main-content {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   TAB SECTIONS
   ============================================================ */
.tab-section {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  animation: fadeIn 0.2s ease;
}

.tab-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   TAB HEADERS
   ============================================================ */
.tab-header {
  background: var(--charcoal);
  color: var(--white);
  padding: 64px 0;
  margin-bottom: 32px;
  position: relative;
}

.hero-standards {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
}

#tab-home .hero-text {
  padding-top: 52px;
}

.tab-header--red {
  border-left: 8px solid var(--red);
}

.tab-header--blue {
  border-left: 8px solid var(--blue);
}

.tab-header--yellow {
  border-left: 8px solid var(--amber);
}

.tab-header--charcoal {
  border-left: 8px solid var(--gray-mid);
}

.tab-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.tab-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 520px;
  line-height: 1.65;
}

/* ============================================================
   HOME — HERO
   ============================================================ */
.tab-header .container {
  position: relative;
}

.hero-badge {
  position: absolute;
  top: 0;
  right: 60px;
  z-index: 5;
  animation: badgeFloat 4s ease-in-out infinite;
}

.cert-badge {
  width: 140px;
  height: 140px;
  border: 4px solid var(--white);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(circle at 30% 30%, var(--red), var(--red-dark));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.cert-badge::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -150%;
  width: 50%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.4) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  animation: badgeShine 6s infinite;
}

@keyframes badgeFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

@keyframes badgeShine {
  0% {
    left: -150%;
  }

  20%,
  100% {
    left: 250%;
  }
}

.cert-badge-icon {
  font-size: 36px;
  line-height: 1;
}

.cert-badge-label {
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  line-height: 1.2;
}

@media (max-width: 1024px) {
  .hero-badge {
    display: none;
  }
}

.hero-text {
  flex: 1;
}

.text-red {
  color: var(--red);
}

/* ============================================================
   HOME — SECTION BLOCKS
   ============================================================ */
.section-block {
  padding: 48px 0;
  background: var(--white);
}

.section-block--gray {
  background: var(--gray-light);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-mid);
}

/* ============================================================
   CERTIFICATION PATH
   ============================================================ */
.cert-path {
  display: flex;
  align-items: stretch;
  margin-bottom: 28px;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  overflow: hidden;
}

.cert-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  transition: background 0.15s;
}

.cert-step:hover {
  background: var(--gray-light);
}

.cert-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-step-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.cert-step-sublabel {
  font-size: 12px;
  color: var(--gray-text);
}

.cert-step-status {
  margin-left: auto;
}

.cert-path-connector {
  width: 2px;
  background: var(--gray-mid);
  flex-shrink: 0;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pending {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber);
}

.status-locked {
  background: var(--gray-light);
  color: var(--gray-text);
  border: 1px solid var(--gray-border);
}

.status-pass {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green);
}

.status-fail {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red);
}

.progress-track {
  height: 8px;
  background: var(--gray-mid);
  width: 100%;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--red);
  transition: width 0.5s ease;
}

.progress-label {
  font-size: 13px;
  color: var(--gray-text);
  margin-top: 8px;
  font-weight: 500;
}

/* ============================================================
   HOME — SECTION CARDS
   ============================================================ */
.section-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.section-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s, box-shadow 0.15s;
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}

.section-card--safety {
  border-top: 4px solid var(--red);
}

.section-card--theory {
  border-top: 4px solid var(--blue);
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-card-icon {
  font-size: 20px;
}

.section-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
}

.section-card-desc {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 16px;
  line-height: 1.55;
}

.section-card-topics {
  margin-bottom: 20px;
}

.section-card-topics li {
  font-size: 13px;
  color: var(--charcoal);
  padding: 4px 0 4px 14px;
  border-bottom: 1px solid var(--gray-light);
  position: relative;
}

.section-card-topics li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gray-border);
}

.section-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-light);
}

.pass-req {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pass-req--red {
  color: var(--red);
}

.pass-req--blue {
  color: var(--blue);
}

.card-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 245, 245, 0.90);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.lock-icon {
  font-size: 32px;
}

.lock-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-text);
  text-align: center;
}

/* ============================================================
   HOME — USER INFO FORM
   ============================================================ */
.user-info-panel {
  background: var(--gray-light);
  border: 1px solid var(--gray-mid);
  padding: 28px 32px;
  max-width: 720px;
}

.user-info-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--charcoal);
}

.optional-tag {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-text);
}

.user-info-desc {
  font-size: 13px;
  color: var(--gray-text);
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.form-group {
  flex: 1;
}

.form-group--action {
  flex: 0 0 auto;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--charcoal);
  background: var(--white);
  font-family: var(--font-base);
  font-size: 14px;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
}

.form-input:focus {
  border-color: var(--red);
}

.form-input::placeholder {
  color: var(--gray-border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  transition: var(--transition);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  text-decoration: none;
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn-blue:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.btn-outline:hover {
  background: var(--red);
  color: var(--white);
}

.btn-outline-blue {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn-outline-blue:hover {
  background: var(--blue);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--blue);
  border-color: var(--blue);
}

.btn-secondary:hover {
  background: var(--blue);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-text);
  border-color: var(--gray-mid);
}

.btn-ghost:hover {
  background: var(--gray-light);
  color: var(--charcoal);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-danger:hover {
  background: var(--red-dark);
}

.btn-large {
  padding: 13px 28px;
  font-size: 15px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   MODE TOGGLE
   ============================================================ */
.mode-toggle {
  display: flex;
  gap: 0;
  border: 2px solid var(--red);
  width: fit-content;
  margin: 28px 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.mode-toggle--blue {
  border-color: var(--blue);
}

.mode-btn {
  padding: 10px 24px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--charcoal) !important;
  border: none;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.mode-btn:hover {
  background: var(--red-bg);
}

.mode-btn--active {
  background: var(--red);
  color: var(--white) !important;
}

.mode-btn--blue {
  color: var(--charcoal) !important;
}

.mode-btn--blue:hover {
  background: var(--blue-bg);
}

.mode-btn--blue.mode-btn--active {
  background: var(--blue);
  color: var(--white) !important;
}

.mode-content {
  display: none;
}

.mode-content--active {
  display: block;
}

/* ============================================================
   STUDY MODE — TOPIC CARDS
   ============================================================ */
.study-intro {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--white);
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow-card);
}

.study-intro--blue {
  border-left-color: var(--blue);
}

.study-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.study-desc {
  font-size: 14px;
  color: var(--gray-text);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 40px;
}

.topic-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-top: 3px solid var(--red);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s, box-shadow 0.15s;
}

.topic-card--blue {
  border-top-color: var(--blue);
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}

.topic-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
}

.topic-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.topic-card-desc {
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ============================================================
   EXAM SHELL
   ============================================================ */
.certify-lock-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
}

.lock-banner-icon {
  font-size: 20px;
}

.exam-shell {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  box-shadow: var(--shadow-card);
  padding: 32px;
  margin-bottom: 40px;
}

.exam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.exam-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.exam-counter {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
}

.exam-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
}

.exam-section-label--red {
  background: var(--red-bg);
  color: var(--red);
}

.exam-section-label--blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.exam-timer {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
}

.exam-timer--blue {
  color: var(--blue);
}

.exam-progress-bar {
  height: 4px;
  background: var(--gray-mid);
  margin-bottom: 28px;
}

.exam-progress-fill {
  height: 100%;
  background: var(--red);
  transition: width 0.3s ease;
}

.exam-progress-fill--blue {
  background: var(--blue);
}

.question-block {
  margin-bottom: 28px;
}

.question-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.question-number--blue {
  color: var(--blue);
}

.question-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.6;
}

.question-image-area {
  margin-top: 16px;
  border: 1px solid var(--gray-mid);
  background: var(--gray-light);
  padding: 12px;
  display: flex;
  justify-content: center;
}

.question-image {
  max-height: 280px;
  object-fit: contain;
}

/* Answer Options */
.answer-options {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--gray-mid);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.answer-option:hover {
  border-color: var(--red);
  background: var(--red-bg);
}

.answer-option.selected {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.answer-option.selected .answer-letter {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.answer-option--blue:hover {
  border-color: var(--blue);
  background: var(--blue-bg);
}

.answer-option--blue.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.answer-option.correct {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--charcoal);
}

.answer-option.incorrect {
  border-color: var(--red);
  background: var(--red-bg);
}

.answer-letter {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: var(--transition);
}

.answer-letter--blue {
  color: var(--blue);
  border-color: var(--blue);
}

.answer-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.answer-radio {
  display: none;
}

.exam-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-mid);
}

/* ============================================================
   CERTIFY OVERLAY
   ============================================================ */
.certify-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 250, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.certify-overlay-content {
  text-align: center;
  max-width: 380px;
  padding: 48px 32px;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  box-shadow: var(--shadow-deep);
}

.overlay-lock-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.overlay-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.overlay-text {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ============================================================
   LAB TAB
   ============================================================ */
.circuit-selector {
  display: flex;
  gap: 12px;
  margin: 28px 0 24px;
}

.circuit-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--white);
  border: 2px solid var(--gray-mid);
  cursor: pointer;
  font-family: var(--font-base);
  transition: var(--transition);
  text-align: left;
}

.circuit-btn:hover {
  border-color: var(--charcoal);
  background: var(--gray-light);
}

.circuit-btn--active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
}

.circuit-btn-icon {
  font-size: 20px;
  line-height: 1;
}

.circuit-btn-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.circuit-btn-label small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.lab-workspace {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  padding-bottom: 48px;
}

.circuit-panel {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  box-shadow: var(--shadow-card);
}

.circuit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-mid);
  background: var(--gray-light);
}

.circuit-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
}

.lab-mode-toggle {
  display: flex;
  border: 1.5px solid var(--charcoal);
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.lab-mode-btn {
  padding: 6px 14px;
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--charcoal);
  border: none;
  transition: var(--transition);
}

.lab-mode-btn--active {
  background: var(--charcoal);
  color: var(--white);
}

.circuit-display {
  min-height: 500px;
  background: var(--gray-light);
  position: relative;
  display: flex;
  align-items: stretch;
}

.circuit-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circuit-placeholder-inner {
  text-align: center;
  color: var(--gray-text);
}

.circuit-placeholder-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.4;
}

.circuit-placeholder-sub {
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.7;
}

.circuit-image-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.circuit-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.test-points-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.probe-instructions {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-mid);
  background: var(--charcoal-mid);
  color: var(--white);
}

.probe-status {
  display: flex;
  gap: 24px;
  margin-bottom: 8px;
}

.probe-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.probe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.probe-dot--red {
  background: #FF3333;
  box-shadow: 0 0 6px rgba(255, 51, 51, 0.6);
}

.probe-dot--black {
  background: #888;
}

.probe-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

/* ============================================================
   MULTIMETER
   ============================================================ */
.multimeter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.multimeter {
  background: #1C1C1C;
  border: 2px solid #333;
  padding: 16px;
  box-shadow: var(--shadow-deep);
}

.multimeter-brand {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #555;
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.multimeter-display {
  background: #0A0A0A;
  border: 2px inset #111;
  padding: 16px 12px;
  text-align: right;
  margin-bottom: 12px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.multimeter-reading {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: #00FF41;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
}

.multimeter-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(0, 255, 65, 0.6);
  letter-spacing: 0.12em;
}

.multimeter-mode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}

.multimeter-mode-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #555;
  letter-spacing: 0.1em;
}

.multimeter-mode-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #FFAA00;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.multimeter-controls {
  margin-bottom: 12px;
}

.dial-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #555;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.dial-select {
  width: 100%;
  background: #111;
  color: #FFAA00;
  border: 1px solid #444;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 8px;
  cursor: pointer;
  outline: none;
  border-radius: 0;
}

.multimeter-leads {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lead {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.lead--red {
  color: #FF3333;
}

.lead--black {
  color: #888;
}

.multimeter-clear {
  width: 100%;
  color: #888;
  border-color: #333;
  font-size: 11px;
  background: transparent;
}

.multimeter-clear:hover {
  background: #333;
  color: var(--white);
}

.fault-panel {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.fault-panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-mid);
}

.fault-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.fault-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  font-family: var(--font-base);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  color: var(--charcoal);
}

.fault-btn:hover {
  background: var(--gray-light);
  border-color: var(--charcoal);
}

.fault-btn--active {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}

.fault-note {
  font-size: 11px;
  color: var(--gray-text);
  line-height: 1.5;
}

/* ============================================================
   REFERENCE TAB
   ============================================================ */
.reference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 28px 0 24px;
}

.ref-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ref-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}

.ref-card-icon {
  font-size: 28px;
  line-height: 1;
}

.ref-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
}

.ref-card-desc {
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.55;
  flex: 1;
}

.ref-open-btn {
  margin-top: 8px;
  align-self: flex-start;
}

.ref-content-panel {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  margin-bottom: 48px;
  box-shadow: var(--shadow-deep);
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ref-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 2px solid var(--red);
  background: var(--charcoal);
  color: var(--white);
}

.ref-content-title {
  font-size: 16px;
  font-weight: 700;
}

.ref-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
}

.ref-close-btn:hover {
  color: var(--white);
}

.ref-content-body {
  padding: 32px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--charcoal);
  max-height: 520px;
  overflow-y: auto;
}

/* ============================================================
   PROGRESS TAB
   ============================================================ */
.progress-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--gray-mid);
}

.progress-section:last-child {
  border-bottom: none;
}

.progress-section--actions {
  padding-bottom: 48px;
}

.progress-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 20px;
}

.cert-status-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cert-status-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.cert-status-card--safety {
  border-top: 4px solid var(--red);
}

.cert-status-card--theory {
  border-top: 4px solid var(--blue);
}

.cert-status-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cert-status-icon {
  font-size: 18px;
}

.cert-status-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--charcoal);
}

.cert-status-result {
  margin-bottom: 16px;
}

.result-badge {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.result-badge--pending {
  background: var(--amber-bg);
  color: var(--amber);
}

.result-badge--locked {
  background: var(--gray-light);
  color: var(--gray-text);
}

.result-badge--pass {
  background: var(--green-bg);
  color: var(--green);
}

.result-badge--fail {
  background: var(--red-bg);
  color: var(--red);
}

.cert-status-details {
  margin-bottom: 16px;
  border: 1px solid var(--gray-light);
}

.cert-detail-row {
  display: flex;
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-light);
}

.cert-detail-row:last-child {
  border-bottom: none;
}

.cert-detail-label {
  color: var(--gray-text);
  flex: 1;
}

.cert-detail-value {
  font-weight: 600;
  color: var(--charcoal);
}

.score-history-wrap {
  overflow-x: auto;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--gray-mid);
}

.score-table th {
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}

.score-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  color: var(--charcoal);
}

.score-table tr:hover td {
  background: var(--gray-light);
}

.empty-cell {
  text-align: center;
  color: var(--gray-text);
  font-style: italic;
  padding: 32px;
}

.weak-areas {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  padding: 32px;
}

.empty-state {
  text-align: center;
  padding: 16px;
}

.empty-state-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
  color: var(--gray-text);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--white);
  width: 640px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-deep);
  animation: slideDown 0.2s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--charcoal);
  color: var(--white);
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--white);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================================
   RESULT OVERLAY
   ============================================================ */
.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.result-card {
  background: var(--white);
  width: 440px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-deep);
  animation: slideDown 0.25s ease;
}

.result-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 16px;
  line-height: 1;
}

.result-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--charcoal);
}

.result-score {
  font-size: 40px;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1;
  letter-spacing: -1px;
}

.result-pct {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-text);
  margin-bottom: 16px;
}

.result-status {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
  padding: 8px 20px;
  display: inline-block;
}

.result-status.pass {
  background: var(--green-bg);
  color: var(--green);
}

.result-status.fail {
  background: var(--red-bg);
  color: var(--red);
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center {
  text-align: center;
}

.text-red {
  color: var(--red);
}

.text-blue {
  color: var(--blue);
}

.text-green {
  color: var(--green);
}

.text-muted {
  color: var(--gray-text);
}

.font-mono {
  font-family: var(--font-mono);
}

.hidden {
  display: none !important;
}

.divider {
  height: 1px;
  background: var(--gray-mid);
  margin: 24px 0;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--gray-border);
}

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

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {

  .top-nav,
  .mode-toggle,
  .exam-shell,
  .circuit-selector,
  .lab-workspace,
  .reference-grid,
  .ref-content-panel,
  .modal-overlay,
  .result-overlay,
  .hero,
  .btn:not(#print-report-btn) {
    display: none !important;
  }

  body {
    background: white;
    font-size: 12pt;
    min-width: unset;
  }

  .main-content {
    margin-top: 0;
  }

  .tab-section {
    display: none !important;
  }

  #tab-progress {
    display: block !important;
  }

  .container {
    max-width: 100%;
    padding: 0 16px;
  }

  .cert-status-cards,
  .section-cards {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .cert-status-card,
  .section-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .score-table {
    font-size: 10pt;
  }

  .tab-header {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  .progress-section {
    break-inside: avoid;
  }

  @page {
    margin: 1.5cm;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }
}


/* ================================================================
   PHASE 3 ADDITIONS — Test Engine, Results, Progress, Reference
   ================================================================ */

/* --- CSS Variable Additions --- */
:root {
  --blue: #1565C0;
  --blue-light: #E3F2FD;
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --amber: #F57C00;
  --amber-light: #FFF8E1;
  --danger: #B71C1C;
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ================================================================
   MODE CONTENT PANELS
   ================================================================ */
.mode-content {
  display: none;
  padding: 40px 0;
}

.mode-content--active {
  display: block;
}


/* ================================================================
   STUDY MODE
   ================================================================ */
.study-header {
  padding: 32px 0 24px;
}

.study-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.study-desc {
  color: #555;
  margin-bottom: 20px;
}

.study-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.study-area {
  padding-bottom: 60px;
}

.study-mode-badge {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  padding: 4px 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.study-mode-badge--blue {
  background: var(--blue);
}

/* ================================================================
   EXAM SHELL
   ================================================================ */
.exam-shell {
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: var(--shadow-md);
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.exam-shell--blue .exam-top-bar {
  border-bottom-color: var(--blue);
}

.exam-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: var(--charcoal);
  color: #fff;
  border-bottom: 4px solid var(--red);
}

.question-counter {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ccc;
  letter-spacing: 0.04em;
}

.exam-timer {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
}

.exam-timer--blue {
  color: #64B5F6;
}

.timer--warning {
  color: #FF5252 !important;
  animation: pulse 1s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.exam-progress-bar {
  height: 4px;
  background: #eee;
  width: 100%;
}

.exam-progress-fill {
  height: 4px;
  background: var(--red);
  transition: width 0.4s ease;
  width: 0%;
}

.exam-progress-fill--blue {
  background: var(--blue);
}

/* Question display */
.question-image-wrap {
  padding: 20px 28px 0;
}

.question-image {
  max-width: 100%;
  max-height: 320px;
  border: 1px solid #ddd;
  display: block;
  margin: 0 auto;
}

.question-topic-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  padding: 16px 28px 0;
}

.question-topic-badge--blue {
  color: var(--blue);
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--charcoal);
  padding: 12px 28px 20px;
}

/* Answer options */
.answer-options {
  padding: 0 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid #ddd;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  background: #fff;
}

.answer-option:hover {
  border-color: var(--red);
  background: #fff5f5;
}

.answer-option.selected {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.answer-option.correct {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.answer-option.incorrect {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.answer-options--blue .answer-option:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.answer-options--blue .answer-option.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.answer-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 2px solid currentColor;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.answer-text {
  flex: 1;
  font-size: 0.98rem;
  line-height: 1.5;
  padding-top: 2px;
}

/* Answer explanation */
.answer-explanation {
  padding: 0 28px 20px;
}

.explanation-inner {
  padding: 16px 20px;
  border-left: 4px solid;
  font-size: 0.95rem;
  line-height: 1.6;
}

.explanation-inner p {
  margin: 8px 0 0;
  color: #444;
}

.explanation--correct {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}

.explanation--incorrect {
  border-color: var(--danger);
  background: #FFEBEE;
  color: var(--danger);
}

.retry-notice {
  font-weight: 700;
  color: var(--amber) !important;
}

/* Exam navigation */
.exam-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.exam-bottom-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 28px 20px;
}

/* Flag button */
.flag-btn {
  padding: 8px 16px;
  background: #fff;
  border: 2px solid #bbb;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}

.flag-btn:hover {
  border-color: var(--amber);
}

.flag-btn--active {
  border-color: var(--amber);
  background: var(--amber-light);
  color: var(--amber);
}

/* ================================================================
   EXAM START SCREEN
   ================================================================ */
.exam-start-screen {
  padding: 60px 0;
  display: flex;
  justify-content: center;
}

.exam-start-card {
  background: #fff;
  border: 2px solid var(--red);
  padding: 48px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.exam-start-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--charcoal);
}

.exam-start-card p {
  color: #555;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.6;
}

.exam-note {
  font-size: 0.88rem !important;
  color: #888 !important;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 16px !important;
}

.exam-start-card--red {
  border-color: var(--red);
}

.exam-start-card--blue {
  border-color: var(--blue);
}

.exam-start-card .btn {
  margin-top: 24px;
  min-width: 200px;
}

/* ================================================================
   CHECKPOINT BAR (Safety Certify)
   ================================================================ */
.checkpoint-bar {
  display: flex;
  align-items: center;
  padding: 16px 28px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
  gap: 0;
}

.cp-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.cp-node--active {
  opacity: 1;
}

.cp-node--done {
  opacity: 0.75;
}

.cp-node--done .cp-node-num {
  background: var(--green);
}

.cp-node--active .cp-node-num {
  background: var(--red);
}

.cp-node-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #bbb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.cp-node-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  color: #555;
  max-width: 60px;
  line-height: 1.2;
}

.cp-connector {
  flex: 1;
  height: 2px;
  background: #ccc;
  min-width: 12px;
  max-width: 40px;
  margin-bottom: 16px;
}

/* ================================================================
   RESULTS PANEL
   ================================================================ */
.results-panel-inner {
  border: 2px solid #ddd;
  background: #fff;
  max-width: 860px;
  margin: 32px auto;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.results--pass {
  border-color: var(--green);
}

.results--fail {
  border-color: var(--danger);
}

.results-header {
  padding: 32px;
  text-align: center;
}

.results--pass .results-header {
  background: var(--green-light);
}

.results--fail .results-header {
  background: #FFEBEE;
}

.results-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 8px;
}

.results-score {
  font-size: 2rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.results--pass .results-score {
  color: var(--green);
}

.results--fail .results-score {
  color: var(--danger);
}

.results-msg {
  font-size: 1rem;
  color: #555;
  margin-top: 8px;
}

.results-body {
  padding: 24px 32px;
}

.results-topic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.results-topic-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.results-topic-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.topic-row--weak td {
  background: #FFF8E1;
}

.results-missed {
  padding: 24px 32px;
  border-top: 2px solid #eee;
}

.results-missed h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--danger);
}

.missed-item {
  padding: 16px;
  border: 1px solid #eee;
  margin-bottom: 12px;
  background: #fafafa;
  font-size: 0.88rem;
  line-height: 1.6;
}

.missed-q {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--charcoal);
}

.missed-your {
  color: #888;
  margin-bottom: 2px;
}

.missed-correct {
  color: var(--green);
  font-weight: 600;
  margin-bottom: 6px;
}

.missed-exp {
  color: #666;
  border-top: 1px solid #eee;
  padding-top: 8px;
  margin-top: 8px;
}

.answer-wrong {
  color: var(--danger);
  font-weight: 700;
}

.answer-right {
  color: var(--green);
  font-weight: 700;
}

.results-actions {
  padding: 20px 32px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #eee;
  background: #fafafa;
  flex-wrap: wrap;
}

/* ================================================================
   LOCK OVERLAY
   ================================================================ */
.lock-overlay {
  display: flex;
  justify-content: center;
  padding: 80px 20px;
}

.lock-card {
  background: #fff;
  border: 2px solid var(--blue);
  padding: 56px 48px;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.lock-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.lock-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.lock-card p {
  color: #666;
  margin-bottom: 10px;
  line-height: 1.6;
}

.lock-card .btn {
  margin-top: 20px;
}

/* ================================================================
   FORM SELECT
   ================================================================ */
.form-select {
  padding: 10px 14px;
  border: 2px solid var(--charcoal);
  font-family: var(--font);
  font-size: 0.9rem;
  background: #fff;
  cursor: pointer;
  min-width: 240px;
}

.form-select:focus {
  outline: none;
  border-color: var(--red);
}

/* ================================================================
   BUTTON VARIANTS
   ================================================================ */
.btn-secondary-blue {
  padding: 12px 28px;
  background: var(--blue);
  color: #fff;
  border: 2px solid var(--blue);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  letter-spacing: 0.04em;
}

.btn-secondary-blue:hover {
  background: #1976D2;
  border-color: #1976D2;
}

.btn-danger {
  padding: 12px 28px;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--danger);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-danger:hover {
  opacity: 0.85;
}

.btn-outline-red {
  padding: 12px 28px;
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-outline-red:hover {
  background: var(--red);
  color: #fff;
}

.btn-ready {
  animation: pulse-ready 0.6s ease;
}

@keyframes pulse-ready {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

/* ================================================================
   CERT PATH (Home Tab) UPDATES
   ================================================================ */
.cert-path {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 40px 0;
}

.cert-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 2px solid #e0e0e0;
  flex: 1;
  transition: border-color 0.3s, background 0.3s;
}

.cert-step--done {
  border-color: var(--green);
  background: var(--green-light);
}

.cert-step-number {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: #e0e0e0;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  transition: background 0.3s;
  flex-shrink: 0;
}

.cert-step--done .cert-step-number {
  background: var(--green);
  color: #fff;
}

.cert-step-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.cert-step-sublabel {
  font-size: 0.78rem;
  color: #888;
  margin-top: 2px;
}

.cert-step-status {
  margin-left: auto;
  flex-shrink: 0;
}

.cert-path-connector {
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  flex-shrink: 0;
  transition: background 0.3s;
}

.cert-path-connector--done {
  background: var(--green);
}

.status-badge {
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pending {
  background: #eee;
  color: #888;
}

.status-pass {
  background: var(--green);
  color: #fff;
}

.status-fail {
  background: var(--danger);
  color: #fff;
}

/* ================================================================
   PROGRESS TAB
   ================================================================ */
.progress-cert-row {
  display: flex;
  gap: 24px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.progress-cert-card {
  flex: 1;
  min-width: 280px;
  background: #fff;
  border: 2px solid #e0e0e0;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s;
}

.progress-cert-card--red {
  border-left: 6px solid var(--red);
}

.progress-cert-card--blue {
  border-left: 6px solid var(--blue);
}

.progress-cert-card--certified {
  border-color: var(--green);
  background: var(--green-light);
}

.pcc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pcc-icon {
  font-size: 1.8rem;
}

.pcc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--charcoal);
  flex: 1;
}

.pcc-status {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
}

.pcc-status--pass {
  background: var(--green);
  color: #fff;
}

.pcc-status--fail {
  background: var(--danger);
  color: #fff;
}

.pcc-status--none {
  background: #eee;
  color: #888;
}

.pcc-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
  color: #555;
}

.pcc-detail-row span:last-child {
  font-weight: 700;
  color: var(--charcoal);
}

.progress-section {
  margin-bottom: 40px;
}

.progress-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
}

/* Weak areas */
.weak-areas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weak-topic-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #eee;
  padding: 12px 16px;
}

.weak-topic-name {
  min-width: 220px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.weak-topic-bar-wrap {
  flex: 1;
  height: 10px;
  background: #eee;
}

.weak-topic-bar {
  height: 10px;
  background: var(--amber);
  transition: width 0.5s ease;
}

.weak-topic-pct {
  min-width: 48px;
  text-align: right;
  font-weight: 800;
  font-size: 0.9rem;
}

.weak-pct--danger {
  color: var(--danger);
}

.weak-pct--warn {
  color: var(--amber);
}

/* History table */
.table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
}

.history-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--charcoal);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.history-table tr:hover td {
  background: #fafafa;
}

.result-pass {
  color: var(--green);
  font-weight: 800;
}

.result-fail {
  color: var(--danger);
  font-weight: 800;
}

.progress-actions {
  display: flex;
  gap: 16px;
  padding: 32px 0;
  flex-wrap: wrap;
}

/* ================================================================
   REFERENCE PANEL CONTENT
   ================================================================ */
.ref-content-panel {
  margin-top: 40px;
  background: #fff;
  border: 2px solid var(--charcoal);
  padding: 0;
  box-shadow: var(--shadow-md);
}

.ref-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: var(--charcoal);
  color: #fff;
}

.ref-content-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.ref-content-body {
  padding: 32px 28px;
}

/* Ohm's calculator */
.ohms-calc p {
  color: #555;
  margin-bottom: 20px;
}

.ohms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.ohms-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--charcoal);
}

.ohms-result {
  margin-top: 20px;
}

.ohms-result ul {
  padding-left: 20px;
}

.ohms-result li {
  padding: 4px 0;
  font-weight: 600;
  color: var(--charcoal);
}

.ohms-formulas {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.ohms-formulas h4 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.ohms-formulas ul {
  padding-left: 20px;
  color: #555;
}

.ohms-formulas li {
  padding: 3px 0;
  font-size: 0.9rem;
}

/* Symbol table */
.symbol-search-wrap {
  margin-bottom: 16px;
}

.symbol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.symbol-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--charcoal);
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.symbol-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

.symbol-table tr:hover td {
  background: #fafafa;
}

/* HRC table */
.ref-table-wrap p {
  color: #555;
  margin-bottom: 16px;
  line-height: 1.6;
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ref-table th {
  padding: 10px 14px;
  background: var(--charcoal);
  color: #fff;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.ref-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.ref-table tr:hover td {
  background: #fafafa;
}

.hrc-0 td {
  border-left: 4px solid #90CAF9;
}

.hrc-1 td {
  border-left: 4px solid #66BB6A;
}

.hrc-2 td {
  border-left: 4px solid var(--amber);
}

.hrc-3 td {
  border-left: 4px solid #EF5350;
}

.hrc-4 td {
  border-left: 4px solid var(--danger);
}

.hrc-prohibited td {
  border-left: 4px solid #000;
  background: #fafafa;
  font-weight: 700;
}

.ref-note {
  font-size: 0.82rem;
  color: #888;
  margin-top: 12px;
}

/* LOTO steps */
.loto-steps p {
  color: #555;
  margin-bottom: 16px;
}

.loto-list {
  padding-left: 0;
  counter-reset: loto;
  list-style: none;
}

.loto-list li {
  counter-increment: loto;
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.6;
}

.loto-list li::before {
  content: counter(loto);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.loto-notes {
  margin-top: 24px;
  padding: 20px;
  background: #FFF8E1;
  border-left: 4px solid var(--amber);
}

.loto-notes h4 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.loto-notes ul {
  padding-left: 20px;
}

.loto-notes li {
  padding: 4px 0;
  font-size: 0.88rem;
  color: #555;
}

/* Formula sheet */
.formula-sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.formula-group {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 20px;
}

.formula-group h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 12px;
}

.formula-group ul {
  padding-left: 0;
  list-style: none;
}

.formula-group li {
  padding: 6px 0;
  border-bottom: 1px dotted #ddd;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  color: var(--charcoal);
}

/* ================================================================
   TOAST NOTIFICATION
   ================================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-width: 380px;
  line-height: 1.4;
  animation: toast-in 0.25s ease;
}

@keyframes toast-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast--info {
  background: var(--charcoal);
  color: #fff;
}

.toast--success {
  background: var(--green);
  color: #fff;
}

.toast--error {
  background: var(--danger);
  color: #fff;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 32px;
  font-style: italic;
}

/* ================================================================
   PRINT STYLES UPDATE
   ================================================================ */
@media print {

  .top-nav,
  .mode-toggle,
  .exam-nav,
  .exam-bottom-bar,
  .btn,
  .ref-grid,
  .lab-workspace,
  .toast,
  .modal-overlay,
  #tab-home,
  #tab-safety,
  #tab-theory,
  #tab-lab,
  #tab-reference {
    display: none !important;
  }

  #tab-progress {
    display: block !important;
  }

  .tab-section.active {
    display: block !important;
  }

  body {
    font-size: 12pt;
  }

  .progress-cert-card {
    page-break-inside: avoid;
  }
}

/* =============================================================
   SVG Lab Additions — test points, circuit container, multimeter
   ============================================================= */

/* Test Points */
.test-point {
  cursor: crosshair;
  transition: fill 0.15s, r 0.15s, filter 0.15s;
}

.test-point:hover {
  filter: brightness(1.3);
}

.test-point.probe-red {
  fill: #CC0000 !important;
  stroke: #900000 !important;
  stroke-width: 2.5;
}

.test-point.probe-black {
  fill: #1A1A1A !important;
  stroke: #000 !important;
  stroke-width: 2.5;
}

/* SVG circuit container */
.circuit-svg-wrap {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
}

.circuit-svg-wrap svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Multimeter reading — monospace LCD style */
.multimeter-reading {
  font-family: 'Courier New', 'Lucida Console', monospace !important;
  font-size: 2.4rem !important;
  color: #00FF41 !important;
  letter-spacing: 4px;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
  transition: color 0.3s;
}

/* Fault buttons in sidebar */
.fault-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.fault-btn {
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f9f9f9;
  color: #1A1A1A;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: inherit;
}

.fault-btn:hover {
  background: #fff0f0;
  border-color: #CC0000;
  color: #CC0000;
}

.fault-btn.active,
.fault-btn.fault-btn--active {
  background: #CC0000;
  color: #fff;
  border-color: #900000;
  font-weight: 700;
}

/* =============================================================
   Symbol Glossary Grid
   ============================================================= */
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.symbol-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: default;
}

.symbol-card:hover {
  box-shadow: 0 3px 12px rgba(204, 0, 0, 0.12);
  border-color: #CC0000;
}

.symbol-svg-wrap {
  width: 80px;
  height: 50px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symbol-svg-wrap svg {
  width: 100%;
  height: 100%;
}

.symbol-name {
  font-weight: 700;
  font-size: 11px;
  color: #1A1A1A;
  line-height: 1.3;
  margin-bottom: 2px;
}

.symbol-category {
  font-size: 10px;
  color: #CC0000;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.symbol-desc {
  font-size: 10px;
  color: #777;
  line-height: 1.4;
}

#symbol-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#symbol-search:focus {
  border-color: #CC0000;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

/* =============================================================
   Lab Mode Buttons with IDs
   ============================================================= */
#btn-mode-guided,
#btn-mode-challenge {
  transition: all 0.15s;
}

#btn-mode-challenge.active,
#btn-mode-challenge.lab-mode-btn--active {
  background: #CC0000;
  color: #fff;
  border-color: #900000;
}

#btn-mode-guided.active,
#btn-mode-guided.lab-mode-btn--active {
  background: #2E7D32;
  color: #fff;
  border-color: #1B5E20;
}

/* Measurement history scroll */
#reading-history::-webkit-scrollbar {
  width: 4px;
}

#reading-history::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

/* ── DUAL-STANDARD MODE ───────────────────────────────────────── */
.standards-selector {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px
}

.standards-selector h3 {
  margin: 0 0 8px;
  color: #1A1A1A;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em
}

.standards-toggle {
  display: flex;
  gap: 12px;
  margin: 16px 0
}

.std-btn {
  flex: 1;
  padding: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit
}

.std-btn strong {
  font-size: 1rem;
  color: #1A1A1A;
  display: block
}

.std-btn span {
  font-size: .8rem;
  color: #666;
  display: block
}

.std-btn.active--workplace {
  background: linear-gradient(135deg, #2E7D32, #1B5E20);
  border-color: #1B5E20;
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(46, 125, 50, 0.4)
}

.std-btn.active--workplace strong,
.std-btn.active--workplace span {
  color: #fff
}

.std-btn.active--nfpa {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  border-color: #0D47A1;
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(21, 101, 192, 0.4)
}

.std-btn.active--nfpa strong,
.std-btn.active--nfpa span {
  color: #fff
}

.std-btn:hover:not(.active--workplace):not(.active--nfpa) {
  border-color: #999;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card)
}

.std-note {
  font-size: .85rem;
  color: #555;
  margin: 8px 0 0;
  padding: 8px 12px;
  background: #f9f9f9;
  border-left: 3px solid #CC0000;
  border-radius: 0 4px 4px 0;
  min-height: 1em
}

.std-toggle-hint {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.std-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  vertical-align: middle;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.std-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  filter: brightness(1.1);
}

.std-badge:active {
  transform: translateY(0);
}

.std-badge.workplace {
  background: linear-gradient(135deg, #2E7D32, #1B5E20);
  color: #fff;
}

.std-badge.nfpa {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  color: #fff;
}

#ppe-categories-table table,
#approach-boundaries-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0
}

#ppe-categories-table th,
#approach-boundaries-table th {
  background: #1A1A1A;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: .85rem
}

#ppe-categories-table td,
#approach-boundaries-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: .85rem;
  vertical-align: top
}

#ppe-categories-table tr.prohibited-row td {
  background: #ffebee;
  color: #CC0000;
  font-weight: 600
}

.boundary-note {
  background: #fff8e1;
  border-left: 3px solid #F57C00;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: .82rem;
  color: #5d4037;
  border-radius: 0 4px 4px 0
}

#loto-steps-container .loto-step {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start
}

#loto-steps-container .loto-step:last-child {
  border-bottom: none
}

#loto-steps-container .step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #CC0000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem
}

#loto-steps-container .step-content h4 {
  margin: 0 0 4px;
  font-size: .9rem;
  color: #1A1A1A
}

#loto-steps-container .step-content p {
  margin: 0;
  font-size: .82rem;
  color: #555
}

#complex-loto-container .loto-levels {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px
}

#complex-loto-container .loto-level {
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 4px;
  border-left: 3px solid #CC0000
}

#complex-loto-container .loto-level strong {
  display: block;
  font-size: .9rem;
  color: #1A1A1A;
  margin-bottom: 2px
}

#complex-loto-container .loto-level span {
  font-size: .82rem;
  color: #555
}

.qp-block {
  padding: 14px 16px;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 3px solid #CC0000
}

.qp-block strong {
  display: block;
  font-size: .95rem;
  color: #1A1A1A;
  margin-bottom: 6px
}

.qp-block p {
  margin: 0 0 6px;
  font-size: .85rem;
  color: #333
}

.qp-block cite {
  font-size: .78rem;
  color: #888;
  font-style: italic
}


/* === Lab Pulse Animation === */
.voltage-update-pulse {
  animation: pulse 0.3s ease-out;
}

@keyframes pulse {
  0% {
    background-color: rgba(204, 0, 0, 0.2);
    transform: scale(1.0);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    background-color: transparent;
    transform: scale(1.0);
  }
}

/* Switch container styling */
.controls-container {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.switch-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.lab-toggle {
  padding: 6px 12px;
  border: 2px solid #cc0000;
  border-radius: 4px;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lab-toggle:hover {
  background: #cc0000;
  color: #fff;
}

.lab-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.3);
}

/* ============================================================
   GLOBAL QUICK START NAVIGATION
   ============================================================ */
.global-quick-start {
  margin-top: 24px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--gray-mid);
  opacity: 0.95;
}

.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.home-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
  border-color: var(--gray-mid);
}

.home-card[data-action="goto-safety"] {
  border-left: 5px solid var(--red);
}

.home-card[data-action="goto-theory"] {
  border-left: 5px solid var(--blue);
}

.home-card[data-action="goto-lab"] {
  border-left: 5px solid var(--amber);
}

.home-card[data-action="goto-reference"] {
  border-left: 5px solid var(--charcoal);
}

.home-card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.home-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.home-card-desc {
  font-size: 0.9rem;
  color: var(--gray-text);
  line-height: 1.4;
}

.home-card svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

/* ============================================================
   MOBILE RESPONSIVENESS (Media Queries)
   ============================================================ */

@media (max-width: 768px) {

  /* Navigation */
  .nav-toggle {
    display: flex;
  }

  .nav-tabs {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--charcoal);
    height: auto;
    padding: 20px;
    box-shadow: var(--shadow-deep);
    border-top: 1px solid var(--gray-mid);
    z-index: 1001;
  }

  .nav-tab {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid transparent;
  }

  .nav-tab.active {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--red);
  }

  /* Heroes - Centered for mobile */
  .tab-header {
    padding: 50px 0;
    text-align: center;
    border-left: none;
    border-top: 6px solid var(--red);
  }

  .tab-header--blue {
    border-top-color: var(--blue);
  }

  .tab-header--yellow {
    border-top-color: var(--amber);
  }

  .tab-header--charcoal {
    border-top-color: var(--gray-mid);
  }

  .tab-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tab-title {
    font-size: 32px;
  }

  .tab-subtitle {
    font-size: 15px;
    margin: 0 auto;
  }

  /* Certification Path */
  .cert-path-track {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .cert-path-connector {
    width: 3px;
    height: 32px;
    margin-top: 0;
  }

  /* Virtual Lab Layout - Stacking */
  .lab-workspace {
    display: block !important;
  }

  .multimeter-sidebar {
    width: 100% !important;
    max-width: none;
    order: 2;
    margin-top: 32px;
  }

  .lab-main-area {
    order: 1;
    width: 100%;
  }

  .circuit-panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .circuit-selector {
    flex-direction: column;
    align-items: stretch !important;
  }

  .circuit-selector>div {
    width: 100%;
  }

  .circuit-selector select {
    width: 100% !important;
  }

  /* Grids & Cards */
  .quick-start-grid,
  .progress-grid,
  .reference-grid {
    grid-template-columns: 1fr;
  }

  .user-info-panel .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .user-info-panel .form-group--action {
    width: 100%;
  }

  .user-info-panel .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {

  .hero-title,
  .tab-title {
    font-size: 28px;
  }

  .tab-header {
    padding: 32px 0;
  }

  .container {
    padding: 0 16px;
  }
}