/* =================================================================
   MedType Simulation Charting — SimChart-inspired module
   Uses MedType brand palette (navy/green) but adopts the SimChart
   information architecture (three tabs, left info panel, icon toolbar,
   orange action buttons for high-affordance CTAs).
   ================================================================= */

:root {
  /* Sim-specific accents (borrowed from the SimChart reference) */
  --sim-orange: #e26a2c;
  --sim-orange-dark: #c85820;
  --sim-tab-active: var(--brand-teal);
  --sim-tab-inactive: #4d7f92;
  --sim-info-bg: #eef5f8;
  --sim-info-active: var(--brand-navy);
  --sim-hint-bg: #e6f2f8;
  --sim-hint-border: #4a9bbf;
  --sim-body-bg: #f4f7f9;
}

/* ===== Full-screen sim root ===== */
.sim-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--sim-body-bg);
  overflow: auto;
  display: none;
  flex-direction: column;
  color: var(--ink);
}
.sim-root.active { display: flex; }
body.sim-active { overflow: hidden; }

/* ===== Ribbon header (blue swoosh, like SimChart) ===== */
.sim-ribbon {
  background: linear-gradient(135deg, #d6eaf1 0%, #f6f9fb 55%, #ffffff 100%);
  padding: 18px 32px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sim-ribbon::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 120' preserveAspectRatio='none'><path d='M0,60 C200,20 400,100 800,40 L800,120 L0,120 Z' fill='%23c8e2ec' opacity='0.5'/><path d='M0,80 C300,40 500,110 800,70 L800,120 L0,120 Z' fill='%23a5cad9' opacity='0.35'/></svg>") no-repeat right center / 100% 100%;
  pointer-events: none;
}
.sim-ribbon-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
  min-height: 68px;
}
.sim-brand {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--font-head);
  color: var(--brand-navy);
}
.sim-brand-name {
  font-size: 34px; font-weight: 800; letter-spacing: -0.01em;
  line-height: 1;
}
.sim-brand-sub {
  font-size: 13px; color: var(--brand-teal); font-weight: 500;
  letter-spacing: 0.02em;
}
.sim-brand-name sup {
  font-size: 12px; color: var(--sim-orange);
  vertical-align: super; margin-left: 2px;
}
.sim-ribbon-right {
  display: flex; align-items: center; gap: 20px;
  font-size: 13px;
}
.sim-user-line { color: var(--ink-soft); }
.sim-user-line strong { color: var(--brand-navy); }
.sim-back-btn {
  background: transparent;
  border: 1px solid var(--brand-navy);
  color: var(--brand-navy);
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.sim-back-btn:hover { background: var(--brand-navy); color: white; }
.sim-back-link {
  color: var(--brand-navy);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

/* Assignment header strip (only shown when inside an assignment) */
.sim-assignment-strip {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 10px 32px;
  font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.sim-assignment-strip .strip-label {
  color: var(--ink-soft);
  margin-right: 8px;
}
.sim-assignment-strip strong { color: var(--brand-navy); }

/* ===== Three tabs (Front Office / Clinical / Coding & Billing) ===== */
.sim-tabs {
  display: flex;
  background: white;
  padding: 0 32px;
  border-bottom: 2px solid var(--brand-teal);
  gap: 2px;
}
.sim-tab {
  background: var(--sim-tab-inactive);
  color: white;
  border: none;
  padding: 12px 28px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: background 0.15s;
}
.sim-tab:hover { background: var(--brand-teal); }
.sim-tab.active {
  background: var(--sim-tab-active);
  box-shadow: 0 -2px 6px rgba(42, 113, 137, 0.15);
}
.sim-tab.disabled { opacity: 0.5; cursor: not-allowed; }
.sim-tab.disabled:hover { background: var(--sim-tab-inactive); }

/* ===== Icon toolbar (Calendar / Correspondence / Demographics / Find / Forms) ===== */
.sim-toolbar {
  background: white;
  padding: 10px 32px;
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 13px;
  overflow-x: auto;
}
.sim-toolbar-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: var(--ink-soft);
  font-family: var(--font-body); font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.sim-toolbar-item:hover { color: var(--brand-navy); background: var(--sim-info-bg); }
.sim-toolbar-item.active {
  color: var(--brand-navy); background: var(--sim-info-bg);
}
.sim-toolbar-icon { width: 18px; height: 18px; }

/* ===== Layout: left info panel + main content ===== */
.sim-workspace {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  flex: 1;
}
.sim-info-panel {
  background: white;
  border-right: 1px solid var(--line);
  padding: 0;
}
.sim-info-header {
  background: var(--sim-info-active);
  color: white;
  padding: 10px 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sim-info-item {
  display: block;
  padding: 10px 16px;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left;
  font-family: var(--font-body);
}
.sim-info-item:hover { background: var(--sim-info-bg); }
.sim-info-item.active {
  background: var(--sim-orange);
  color: white;
  font-weight: 600;
}
.sim-info-item.dim { color: var(--muted); font-style: italic; cursor: default; }
.sim-info-item.dim:hover { background: transparent; }

.sim-main {
  padding: 24px 32px 60px;
  min-width: 0;
}
.sim-main h2, .sim-main h3 {
  font-family: var(--font-head);
  color: var(--brand-navy);
}

/* ===== Cards & tables ===== */
.sim-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.sim-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.sim-card-head h2 { margin: 0; font-size: 22px; }
.sim-card-head h3 { margin: 0; font-size: 17px; }

.sim-btn {
  background: var(--sim-orange);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}
.sim-btn:hover { background: var(--sim-orange-dark); }
.sim-btn:disabled { background: var(--line-dark); cursor: not-allowed; }
.sim-btn-ghost {
  background: white;
  border: 1px solid var(--line-dark);
  color: var(--brand-navy);
}
.sim-btn-ghost:hover { background: var(--sim-info-bg); }
.sim-btn-primary {
  background: var(--brand-green);
}
.sim-btn-primary:hover { background: var(--brand-green-dark); }
.sim-btn-lg { padding: 12px 22px; font-size: 14px; }

/* Table */
.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sim-table th {
  background: var(--sim-info-bg);
  color: var(--brand-navy);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-dark);
}
.sim-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.sim-table tr:hover td { background: #f9fbfc; }
.sim-table a.assignment-link {
  color: var(--brand-teal);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}
.sim-table a.assignment-link:hover { color: var(--brand-navy); }

.sim-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sim-badge-notstarted { background: #e9edf1; color: var(--ink-soft); }
.sim-badge-inprogress { background: #fff0dc; color: #a15310; }
.sim-badge-completed  { background: #dff4e6; color: #1f7a3f; }
.sim-badge-fo { background: #d9ecf3; color: #1a5d75; }
.sim-badge-cc { background: #e6ded9; color: #6f4a2a; }
.sim-badge-cb { background: #f0e2e7; color: #8a2d54; }

/* ===== Helpful Hint callout ===== */
.sim-hint {
  background: var(--sim-hint-bg);
  border-left: 4px solid var(--sim-hint-border);
  padding: 14px 18px;
  border-radius: 4px;
  margin: 18px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.sim-hint-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--sim-hint-border);
}
.sim-hint-title {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sim-hint-border);
  font-size: 12px;
  margin-bottom: 4px;
}
.sim-hint p { margin: 0; color: var(--ink); font-size: 14px; }

/* ===== Assignment brief ===== */
.assignment-brief h2 { margin-bottom: 4px; }
.assignment-brief .brief-eyebrow {
  font-family: var(--font-head);
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.brief-meta {
  display: flex; gap: 20px;
  margin: 12px 0 18px;
  font-size: 13px;
  color: var(--ink-soft);
}
.brief-meta strong { color: var(--brand-navy); }
.brief-section { margin-bottom: 18px; }
.brief-section h4 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-navy);
  margin: 0 0 8px;
}
.brief-section ol, .brief-section ul {
  margin: 0; padding-left: 20px;
  font-size: 14px; line-height: 1.6;
}
.brief-section p { font-size: 14px; margin: 0; }

/* ===== Calendar (Front Office) ===== */
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav-btn {
  background: white; border: 1px solid var(--line-dark);
  border-radius: 4px; width: 28px; height: 28px;
  cursor: pointer; color: var(--brand-navy);
  font-size: 14px;
}
.cal-nav-btn:hover { background: var(--sim-info-bg); }
.cal-range {
  font-family: var(--font-head);
  color: var(--brand-navy);
  font-size: 17px; font-weight: 700;
}
.cal-view-switch { display: flex; gap: 2px; }
.cal-view-switch button {
  background: white; border: 1px solid var(--line-dark);
  padding: 6px 14px; font-size: 12px;
  font-family: var(--font-head); font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; color: var(--ink-soft);
}
.cal-view-switch button.active {
  background: var(--brand-teal); color: white; border-color: var(--brand-teal);
}

.cal-grid {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
  overflow: hidden;
  font-size: 12px;
}
.cal-head-cell {
  background: var(--sim-info-bg);
  color: var(--brand-navy);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--line-dark);
  border-right: 1px solid var(--line);
  letter-spacing: 0.04em;
}
.cal-head-cell.today {
  background: #ffe8d6;
  color: var(--sim-orange-dark);
}
.cal-time-slot {
  background: var(--sim-info-bg);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.cal-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 32px;
  padding: 2px;
  cursor: pointer;
  position: relative;
}
.cal-cell:hover { background: #f6fafc; }
.cal-cell.today-col { background: #fff8f2; }
.cal-appt {
  background: var(--brand-teal); color: white;
  border-radius: 3px;
  padding: 3px 5px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  margin-bottom: 2px;
}
.cal-appt.type-new { background: var(--brand-green); }
.cal-appt.type-follow { background: var(--brand-teal); }
.cal-appt.type-urgent { background: var(--error); }

/* ===== Forms ===== */
.sim-form { max-width: 720px; }
.sim-form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.sim-form-row.stacked { grid-template-columns: 1fr; }
.sim-form-label {
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 14px;
}
.sim-form-label .req { color: var(--error); margin-left: 3px; }
.sim-input, .sim-select, .sim-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: white;
}
.sim-input:focus, .sim-select:focus, .sim-textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(42, 113, 137, 0.15);
}
.sim-textarea { min-height: 100px; resize: vertical; }
.sim-form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 20px;
}

/* ===== Patient search modal ===== */
.sim-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 36, 48, 0.55);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 60px;
}
.sim-modal-overlay.active { display: flex; }
.sim-modal {
  background: white;
  border-radius: 6px;
  width: min(720px, 92vw);
  max-height: 80vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
}
.sim-modal-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.sim-modal-head h3 { margin: 0; font-size: 18px; }
.sim-modal-close {
  background: none; border: none; font-size: 24px;
  color: var(--muted); cursor: pointer;
}
.sim-modal-body { padding: 18px 22px; }

/* ===== Grading feedback ===== */
.sim-feedback {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sim-orange);
  border-radius: 4px;
  padding: 20px 24px;
  margin-top: 20px;
}
.sim-feedback.perfect { border-left-color: var(--brand-green); }
.sim-feedback h3 { margin: 0 0 8px; font-size: 20px; }
.sim-feedback .score-big {
  font-family: var(--font-head);
  font-size: 44px;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1;
  margin: 8px 0 4px;
}
.sim-feedback .score-sub { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.sim-feedback-list { list-style: none; padding: 0; margin: 0; }
.sim-feedback-list li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: baseline;
}
.sim-feedback-list li:last-child { border-bottom: none; }
.sim-feedback-list .fb-mark { font-size: 16px; text-align: center; }
.sim-feedback-list .fb-mark.correct { color: var(--brand-green); }
.sim-feedback-list .fb-mark.wrong { color: var(--error); }
.sim-feedback-list .fb-expected {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

/* ===== Simulation entry card (on home screen) ===== */
.sim-entry-card {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-teal) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  margin: 40px auto;
  max-width: var(--container);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: 0 20px 50px rgba(26, 74, 94, 0.25);
}
.sim-entry-card h2 {
  font-size: 2.4rem;
  color: white;
  margin: 0 0 12px;
}
.sim-entry-card .eyebrow {
  color: var(--brand-green-bright);
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.sim-entry-card p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  margin-bottom: 24px;
  line-height: 1.55;
}
.sim-entry-card .btn-primary {
  background: var(--brand-green);
  color: white;
  font-size: 14px;
  padding: 14px 28px;
}
.sim-entry-features {
  display: flex; flex-direction: column; gap: 12px;
}
.sim-entry-feature {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px; padding: 12px 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}
.sim-entry-feature strong { color: white; display: block; }

/* Responsive */
@media (max-width: 900px) {
  .sim-workspace { grid-template-columns: 1fr; }
  .sim-info-panel { border-right: none; border-bottom: 1px solid var(--line); }
  .sim-info-panel .sim-info-header { display: none; }
  .sim-tabs { padding: 0 16px; overflow-x: auto; }
  .sim-toolbar { padding: 10px 16px; gap: 14px; }
  .sim-main { padding: 20px 16px 40px; }
  .sim-entry-card { grid-template-columns: 1fr; padding: 28px 24px; gap: 24px; }
  .cal-grid { grid-template-columns: 50px repeat(7, 1fr); font-size: 10px; }
}

/* ============================================================
   Session 2 — Form renderer, letter preview, phone player, superbill
   ============================================================ */

.sim-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin: 8px 0 4px;
}
.sim-field { display: flex; flex-direction: column; gap: 4px; }
.sim-field-wide { grid-column: span 2; }
.sim-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sim-field input,
.sim-field select,
.sim-field textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  background: white;
  color: var(--ink);
  transition: border-color 0.15s;
}
.sim-field input:focus,
.sim-field select:focus,
.sim-field textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(42, 113, 137, 0.14);
}
.sim-field input[readonly] {
  background: #f5f7f9;
  color: var(--ink-soft);
  cursor: default;
}
.sim-field textarea { min-height: 60px; resize: vertical; }
.sim-hint-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.sim-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 22px 0 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sim-btn-primary { background: var(--sim-orange); color: white; border-color: var(--sim-orange); }
.sim-btn-primary:hover { background: #c95a1e; border-color: #c95a1e; }

/* Correspondence — letter preview */
.sim-letter-preview {
  margin: 22px 0 4px;
  padding: 24px 28px;
  background: #fdfcf8;
  border: 1px solid #e8e4d7;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-family: Georgia, 'Times New Roman', serif;
  color: #2d2d2d;
  line-height: 1.6;
  font-size: 14px;
}
.sim-letter-body p { margin: 0 0 12px; }
.sim-letter-body p:last-child { margin-bottom: 0; }
.letter-slot {
  display: inline-block;
  min-width: 60px;
  padding: 1px 6px;
  background: rgba(226, 106, 44, 0.09);
  border-bottom: 1.5px solid rgba(226, 106, 44, 0.35);
  color: var(--sim-orange);
  font-family: var(--font-sans, system-ui);
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
}

/* Phone encounter — audio player */
.sim-phone-player {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: #eef4f7;
  border: 1px solid #cfdde5;
  border-radius: 8px;
  margin: 12px 0 20px;
}
.sim-phone-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-navy);
  color: white;
  border-radius: 50%;
  font-size: 22px;
  flex-shrink: 0;
}
.sim-phone-player audio { margin-top: 4px; }

/* Code lookup table */
.sim-code-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}
.sim-code-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f5f7f9;
  border-bottom: 2px solid var(--line);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sim-code-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.sim-code-table td:first-child { font-family: var(--font-mono, monospace); font-weight: 600; }

/* Card header */
.sim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.sim-card-header h2 { font-size: 20px; }

/* Responsive */
@media (max-width: 720px) {
  .sim-form-grid { grid-template-columns: 1fr; }
  .sim-field-wide { grid-column: auto; }
}

/* ============================================================
   Gamified progress: bars, stars, grade badges
   ============================================================ */

/* Overall + per-module progress bars */
.sim-progress-block {
  background: linear-gradient(135deg, #f4f8fb 0%, #e9f2f7 100%);
  border: 1px solid #d6e2ea;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.sim-progress-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.sim-progress-title strong {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-navy);
}
.sim-progress-title .sim-progress-num {
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-navy);
}
.sim-progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(23, 43, 77, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.sim-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-teal, #17a2b8) 0%, #12b886 100%);
  border-radius: 999px;
  transition: width 0.6s ease-out;
}
.sim-progress-bar-fill.perfect {
  background: linear-gradient(90deg, #12b886 0%, #ffd43b 100%);
  box-shadow: 0 0 8px rgba(255, 212, 59, 0.4);
}

/* Compact bar inside the per-module hint cards */
.sim-hint .sim-mini-bar-track {
  margin-top: 8px;
  width: 100%;
  height: 6px;
  background: rgba(23, 43, 77, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.sim-hint .sim-mini-bar-fill {
  height: 100%;
  background: var(--brand-teal, #17a2b8);
  border-radius: 999px;
  transition: width 0.6s ease-out;
}
.sim-hint .sim-mini-bar-fill.perfect {
  background: #12b886;
}
.sim-hint .sim-hint-completion {
  margin-top: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Grade cell in the assignment table */
.sim-grade-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
}
.sim-grade-cell.grade-none  { color: var(--muted); font-weight: 400; }
.sim-grade-cell.grade-low   { color: #a15310; }
.sim-grade-cell.grade-mid   { color: #a17510; }
.sim-grade-cell.grade-high  { color: #1f7a3f; }
.sim-grade-cell.grade-full  { color: #12b886; }
.sim-stars {
  display: inline-flex;
  gap: 1px;
  font-size: 12px;
  letter-spacing: -1px;
}
.sim-stars .star-on  { color: #ffd43b; text-shadow: 0 0 3px rgba(255,212,59,0.5); }
.sim-stars .star-off { color: #d0d7de; }

/* Row highlight when completed */
.sim-table tr.row-complete { background: linear-gradient(90deg, rgba(18,184,134,0.06) 0%, transparent 60%); }
.sim-table tr.row-inprogress { background: linear-gradient(90deg, rgba(255,212,59,0.06) 0%, transparent 60%); }

/* Score pop-in on completion screen */
.sim-feedback .score-stars-earned {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 6px 0 2px;
  font-size: 32px;
  letter-spacing: 2px;
}
.sim-feedback .score-stars-earned .star-on {
  color: #ffd43b;
  text-shadow: 0 0 12px rgba(255,212,59,0.6);
  animation: starPop 0.5s ease-out backwards;
}
.sim-feedback .score-stars-earned .star-on:nth-child(1) { animation-delay: 0.15s; }
.sim-feedback .score-stars-earned .star-on:nth-child(2) { animation-delay: 0.35s; }
.sim-feedback .score-stars-earned .star-on:nth-child(3) { animation-delay: 0.55s; }
.sim-feedback .score-stars-earned .star-off { color: #d0d7de; }
@keyframes starPop {
  0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(10deg);  opacity: 1; }
  100% { transform: scale(1)   rotate(0deg);   opacity: 1; }
}
