/*
 * V7.4 engineering problem training
 * Converts course-like packs into problem-driven engineering loops.
 */

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .shell .main.main > section.panel.active {
  padding: 22px clamp(18px, 2.4vw, 34px) 42px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-center {
  gap: 18px !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 24px !important;
  color: var(--v51-text, #0f172a) !important;
  background: color-mix(in srgb, var(--v51-card, #fff) 96%, transparent) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 20px !important;
}

html:not(.react-student-embedded) body:is([data-active-panel="question-bank"], [data-active-panel="interview"]) #companionAvatarDock.companion-avatar-dock {
  display: none !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow {
  display: grid !important;
  gap: 12px !important;
  padding: 15px 17px !important;
  background: color-mix(in srgb, var(--hw-primary, #1677ff) 5%, var(--v51-card, #fff)) !important;
  border: 1px solid color-mix(in srgb, var(--hw-primary, #1677ff) 18%, var(--v51-border, #dbe4f0)) !important;
  border-radius: 14px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > header > div {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > header span {
  color: var(--hw-primary, #1677ff) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: 0.08em !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > header strong {
  color: var(--v51-text, #0f172a) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > header em {
  color: var(--v51-muted, #64748b) !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 680 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > ol {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow li {
  display: flex !important;
  min-height: 38px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 7px 9px !important;
  color: var(--v51-text, #0f172a) !important;
  background: var(--v51-card, #fff) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 9px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow li span {
  color: var(--hw-primary, #1677ff) !important;
  font-size: 9px !important;
  font-weight: 850 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow li strong {
  overflow: hidden !important;
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 790 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow li:last-child {
  color: var(--hw-ai, #7c3aed) !important;
  background: color-mix(in srgb, var(--hw-ai, #7c3aed) 8%, var(--v51-card, #fff)) !important;
  border-color: color-mix(in srgb, var(--hw-ai, #7c3aed) 23%, var(--v51-border, #dbe4f0)) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-center > .section-head {
  margin: 0 !important;
  padding: 2px 2px 16px !important;
  border-bottom: 1px solid var(--v51-border, #dbe4f0) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-center > .section-head h3 {
  margin: 4px 0 0 !important;
  color: var(--v51-text, #0f172a) !important;
  font-size: clamp(25px, 2.4vw, 34px) !important;
  letter-spacing: -0.035em !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-subtitle {
  max-width: 760px !important;
  color: var(--v51-muted, #64748b) !important;
  font-weight: 680 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit {
  display: grid !important;
  grid-template-columns: 0.72fr 0.86fr 1.45fr 0.92fr !important;
  gap: 10px !important;
  margin: 0 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit > div {
  min-height: 76px !important;
  padding: 13px 14px !important;
  background: var(--v51-card-soft, #f8fafc) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 13px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit > div:nth-child(3) {
  background: color-mix(in srgb, var(--hw-ai, #7c3aed) 8%, var(--v51-card, #fff)) !important;
  border-color: color-mix(in srgb, var(--hw-ai, #7c3aed) 24%, var(--v51-border, #dbe4f0)) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit span {
  color: var(--v51-muted, #64748b) !important;
  font-size: 11px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit strong {
  color: var(--v51-text, #0f172a) !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] #trainingCockpitStage,
html:not(.react-student-embedded) body[data-active-panel="question-bank"] #trainingCockpitGain {
  color: var(--hw-ai, #7c3aed) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-card {
  gap: 17px !important;
  min-height: 0 !important;
  padding: 22px !important;
  background:
    radial-gradient(circle at 93% 4%, color-mix(in srgb, var(--hw-ai, #7c3aed) 15%, transparent), transparent 27%),
    linear-gradient(135deg, color-mix(in srgb, var(--hw-primary, #1677ff) 7%, var(--v51-card, #fff)), var(--v51-card, #fff) 48%) !important;
  border: 1px solid color-mix(in srgb, var(--hw-ai, #7c3aed) 24%, var(--v51-border, #dbe4f0)) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-head h4 {
  color: var(--v51-text, #0f172a) !important;
  font-size: clamp(22px, 2.2vw, 30px) !important;
  letter-spacing: -0.025em !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-head p {
  color: var(--v51-muted, #64748b) !important;
  font-weight: 650 !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 13px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card {
  gap: 13px !important;
  min-height: 0 !important;
  padding: 18px !important;
  color: var(--v51-text, #0f172a) !important;
  background: var(--v51-card, #fff) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card.primary {
  grid-column: 1 / -1 !important;
  padding: 21px !important;
  background:
    linear-gradient(128deg, color-mix(in srgb, var(--hw-ai, #7c3aed) 7%, var(--v51-card, #fff)), var(--v51-card, #fff) 43%) !important;
  border-color: color-mix(in srgb, var(--hw-ai, #7c3aed) 26%, var(--v51-border, #dbe4f0)) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card h5,
html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card.primary h5 {
  margin: 0 !important;
  color: var(--v51-text, #0f172a) !important;
  font-size: clamp(20px, 2vw, 27px) !important;
  font-weight: 880 !important;
  line-height: 1.28 !important;
  letter-spacing: -0.025em !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card.primary h5 {
  font-size: clamp(24px, 2.3vw, 32px) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-why {
  background: color-mix(in srgb, var(--hw-primary, #1677ff) 5%, var(--v51-card, #fff)) !important;
  border-color: color-mix(in srgb, var(--hw-primary, #1677ff) 18%, var(--v51-border, #dbe4f0)) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-why :is(strong, b) {
  color: var(--v51-text, #0f172a) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-why :is(p, small, span) {
  color: var(--v51-muted, #64748b) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-why-result > strong {
  color: var(--hw-ai, #7c3aed) !important;
}

.engineering-problem-card-flow {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.engineering-problem-card-flow li {
  position: relative;
  display: grid !important;
  align-content: center !important;
  gap: 3px !important;
  min-width: 0 !important;
  min-height: 54px !important;
  padding: 8px 9px !important;
  color: var(--v51-text, #0f172a) !important;
  background: var(--v51-card-soft, #f8fafc) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 10px !important;
}

.engineering-problem-card-flow li > span {
  color: var(--hw-primary, #1677ff) !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: 0.04em !important;
}

.engineering-problem-card-flow li > strong {
  overflow: hidden !important;
  color: var(--v51-text, #0f172a) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.engineering-problem-card-flow li.engineering-problem-ai-score {
  background: color-mix(in srgb, var(--hw-ai, #7c3aed) 9%, var(--v51-card, #fff)) !important;
  border-color: color-mix(in srgb, var(--hw-ai, #7c3aed) 25%, var(--v51-border, #dbe4f0)) !important;
}

.engineering-problem-card-flow li.engineering-problem-ai-score > span {
  color: var(--hw-ai, #7c3aed) !important;
}

.engineering-problem-card-flow li.done {
  background: color-mix(in srgb, #22c55e 9%, var(--v51-card, #fff)) !important;
  border-color: color-mix(in srgb, #22c55e 26%, var(--v51-border, #dbe4f0)) !important;
}

.engineering-problem-card-flow li.done > span {
  color: #16a15f !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card:not(.primary) .engineering-problem-card-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card .primary-btn {
  width: 100% !important;
  min-height: 46px !important;
  justify-self: stretch !important;
  margin-top: auto !important;
  border-radius: 12px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-entry-grid {
  gap: 10px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-entry-grid > button {
  min-height: 84px !important;
  padding: 13px 14px !important;
  background: var(--v51-card-soft, #f8fafc) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 13px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-entry-grid > button strong {
  color: var(--v51-text, #0f172a) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-entry-grid > button em {
  color: var(--v51-muted, #64748b) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-pack {
  color: var(--v51-text, #0f172a) !important;
  background: var(--v51-card, #fff) !important;
  border-color: var(--v51-border, #dbe4f0) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-pack-headline strong {
  color: var(--v51-text, #0f172a) !important;
  font-size: 18px !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-pack p {
  color: var(--v51-muted, #64748b) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-pack .engineering-problem-card-flow {
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-pack .engineering-problem-card-flow li {
  min-height: 50px !important;
}

/* Fixed flow inside every active training. */
html:not(.react-student-embedded) body.interview-meeting-active[data-active-panel="interview"] #interviewStudio.interview-space-arena-open {
  grid-template-rows: 80px 68px minmax(0, 1fr) calc(72px + var(--safe-bottom)) !important;
}

html:not(.react-student-embedded) body.interview-meeting-active[data-active-panel="interview"] #interviewCoachRoom.interview-training-statusbar {
  height: 80px !important;
  min-height: 80px !important;
  max-height: 80px !important;
  overflow: hidden !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] #interviewStudio > .engineering-training-flow {
  display: grid !important;
  grid-row: 2 / 3 !important;
  gap: 12px !important;
  margin: 12px 0 14px !important;
  padding: 14px 16px !important;
  color: var(--v51-text, #0f172a) !important;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--hw-ai, #7c3aed) 7%, var(--v51-card, #fff)), var(--v51-card, #fff) 50%) !important;
  border: 1px solid color-mix(in srgb, var(--hw-ai, #7c3aed) 24%, var(--v51-border, #dbe4f0)) !important;
  border-radius: 15px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055) !important;
}

html:not(.react-student-embedded) body.interview-meeting-active[data-active-panel="interview"] #interviewStudio > .interview-main-dashboard {
  grid-row: 3 / 4 !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 11px !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > header > span {
  display: inline-flex !important;
  min-height: 27px !important;
  align-items: center !important;
  padding: 0 9px !important;
  color: var(--hw-ai, #7c3aed) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  background: color-mix(in srgb, var(--hw-ai, #7c3aed) 10%, transparent) !important;
  border-radius: 999px !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > header > strong {
  overflow: hidden !important;
  color: var(--v51-text, #0f172a) !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > header > em {
  color: var(--v51-muted, #64748b) !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > ol {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow li {
  display: flex !important;
  min-width: 0 !important;
  min-height: 39px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 7px 9px !important;
  color: var(--v51-muted, #64748b) !important;
  background: var(--v51-card-soft, #f8fafc) !important;
  border: 1px solid var(--v51-border, #dbe4f0) !important;
  border-radius: 9px !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow li > span {
  color: var(--v51-muted, #64748b) !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow li > strong {
  overflow: hidden !important;
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 790 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow li.is-current {
  color: #fff !important;
  background: linear-gradient(105deg, var(--hw-primary, #1677ff), var(--hw-ai, #7c3aed)) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--hw-ai, #7c3aed) 22%, transparent) !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow li.is-current > span {
  color: rgba(255, 255, 255, 0.75) !important;
}

html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow li.is-done {
  color: #168a57 !important;
  background: color-mix(in srgb, #22c55e 9%, var(--v51-card, #fff)) !important;
  border-color: color-mix(in srgb, #22c55e 25%, var(--v51-border, #dbe4f0)) !important;
}

@media (max-width: 980px) {
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit,
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-training-card.primary {
    grid-column: 1 / -1 !important;
  }

  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .engineering-problem-card-flow,
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > ol,
  html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > ol {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .shell .main.main > section.panel.active {
    padding: 12px 10px 28px !important;
  }

  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-training-center {
    padding: 16px !important;
  }

  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .v51-training-cockpit,
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .question-ai-recommend-head,
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > header,
  html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > header {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .engineering-problem-card-flow,
  html:not(.react-student-embedded) body[data-active-panel="question-bank"] .training-center-fixed-flow > ol,
  html:not(.react-student-embedded) body[data-active-panel="interview"] .engineering-training-flow > ol {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
