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

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #dde3ed;
  --text: #1a2332;
  --text-muted: #6b7a8f;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --warn: #d97706;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --radius: 8px;
  --sidebar-w: 220px;
}

html, body { width: 100%; height: 100%; min-height: 100%; overflow: hidden;   padding-bottom: 28px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#app, .app, .app-shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#appsiteTopNav, #appsite-topnav, .appsite-topnav, .appsite-topnav-shell, header.appsite-topnav, .tl-topnav, .topnav-module {
  flex: 0 0 auto; width: 100%; max-width: 100%; z-index: 1000;
}

/* Status bar */
#statusBar { font-size: 12px; padding: 4px 16px; background: var(--primary-light); color: var(--primary); border-top: 1px solid var(--border); min-height: 24px; display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; }
#statusBar:empty { padding: 0; min-height: 0; border-top: none; }
#statusBar.error { background: var(--danger-light); color: var(--danger); }

/* Layout */
.app-layout { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; border-bottom: 1px solid var(--border); }
.sidebar-title { font-size: 13px; font-weight: 700; color: var(--text); }
.sidebar-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 8px 12px 2px; }
.sidebar-scroll { flex: 1 1 auto; overflow-y: auto; padding: 4px 0; }
.sidebar-item { display: flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; border-radius: 0; color: var(--text); transition: background 0.1s; }
.sidebar-item:hover { background: var(--bg); }
.sidebar-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-empty { font-size: 12px; color: var(--text-muted); padding: 8px 12px; }

/* Agent type / status dots */
.agent-type-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); }
.agent-type-dot.ai { background: var(--primary); }
.agent-type-dot.human { background: var(--success); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-left: auto; background: var(--text-muted); }
.status-dot.active { background: var(--success); }
.status-dot.away { background: var(--warn); }

/* Workspace */
.workspace { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.workspace-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.workspace-header-group { display: flex; flex-direction: column; margin-right: auto; }
.workspace-title { font-size: 15px; font-weight: 700; color: var(--text); }
.workspace-subtitle { font-size: 11px; color: var(--text-muted); }
.workspace-scroll { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

/* Summary grid */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.summary-value { font-size: 22px; font-weight: 700; color: var(--text); }
.summary-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 13px; font-weight: 700; }
.card-body { padding: 0; overflow-x: auto; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 8px 12px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.muted { color: var(--text-muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.badge-ai { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.badge-human { background: #f0fdf4; color: #16a34a; border-color: transparent; }
.badge-active { background: #f0fdf4; color: #16a34a; border-color: transparent; }

.status-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--bg); color: var(--text-muted); }
.status-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.status-chip.active { background: #f0fdf4; color: #16a34a; }
.status-chip.away { background: #fffbeb; color: #d97706; }
.status-chip.inactive { background: var(--bg); color: var(--text-muted); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-surface { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-surface:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { font-size: 12px; padding: 4px 10px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.field-input { font-size: 13px; font-family: inherit; border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; color: var(--text); background: var(--surface); outline: none; width: 100%; }
.field-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
textarea.field-input { resize: vertical; min-height: 60px; }
.form-grid { display: grid; gap: 10px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--surface); border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,0.18); width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-wide { max-width: 600px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }

/* Landing page */
.landing-wrap { max-width: 880px; margin: 0 auto; padding: 60px 24px 40px; }
.landing-hero { text-align: center; margin-bottom: 48px; }
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--primary); margin-bottom: 8px; }
.landing-hero h1 { font-size: 42px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.landing-sub { font-size: 16px; color: var(--text-muted); max-width: 540px; margin: 0 auto 28px; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-signin { display: inline-flex; align-items: center; background: var(--primary); color: #fff; padding: 10px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.btn-signin:hover { background: var(--primary-hover); }
.btn-hub { display: inline-flex; align-items: center; background: var(--surface); color: var(--text); padding: 10px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid var(--border); }
.btn-hub:hover { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature-card svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; stroke-width: 1.5; margin-bottom: 10px; }
.feature-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-muted); }
.landing-footer { text-align: center; padding: 24px; font-size: 12px; }
.landing-footer a { color: var(--text-muted); }

/* SSO banner */
.sso-banner { display: flex; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px; font-size: 13px; }
.sso-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.sso-name { font-weight: 600; }
.sso-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.btn-link { color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; }
.btn-sm { font-size: 12px; padding: 4px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; }

/* .layout / .order-list / .order-editor pattern */
header.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; flex-shrink: 0; }
header.topbar h1 { font-size: 18px; font-weight: 700; }
header.topbar .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.workspace { padding: 12px; display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 12px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.order-list { overflow-y: auto; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius,8px); }
/* Narrow / Desk-embedded panes: single-pane master-detail. Show the list;
   when a course editor or landing is open, it takes over the whole pane. */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .layout:has(> .order-editor:not(.hidden)) .order-list { display: none; }
}
.order-item { padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.order-item:hover { background: var(--bg); }
.order-item.active { background: var(--primary-light); border-left: 3px solid var(--primary); }
.order-item:last-child { border-bottom: 0; }
.order-editor { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius,8px); display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.order-editor.hidden { display: none; }
.wo-header-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.wo-header-left { display: flex; align-items: center; gap: 10px; }
.wo-header-left h2 { font-size: 16px; font-weight: 700; }
.wo-status-chip { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-muted,#6b7280); background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px; }
.wo-header-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn-primary-action { background: var(--primary); border: 1px solid var(--primary); color: #fff; font-weight: 600; padding: 5px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; min-height: 32px; }
.wo-tabs { display: flex; gap: 2px; padding: 8px 20px 0; background: var(--surface); border-bottom: 2px solid var(--border); position: sticky; top: 57px; z-index: 9; flex-wrap: wrap; }
.wo-tab { padding: 7px 14px; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-muted,#6b7280); cursor: pointer; white-space: nowrap; }
.wo-tab.active { background: var(--surface); border-color: var(--border); color: var(--primary); margin-bottom: -2px; padding-bottom: 9px; }
.wo-tab-panel { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; }
.wo-form { display: flex; flex-direction: column; }
.wo-row { display: flex; gap: 12px; }
.wo-row.four-col { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }

/* Read-only learner view — multi-step course player */
.course-reader { display: flex; align-items: flex-start; }
.reader-nav { width: 250px; flex-shrink: 0; padding: 16px 14px; border-right: 1px solid var(--border); }
.reader-main { flex: 1 1 auto; min-width: 0; padding: 20px 24px; }
@media (max-width: 560px) {
  .course-reader { flex-direction: column; }
  .reader-nav { width: auto; border-right: 0; border-bottom: 1px solid var(--border); }
}
.reader-progress { height: 6px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.reader-progress-bar { height: 100%; width: 0; background: var(--primary); transition: width .25s ease; }
.reader-progress-label { font-size: 11px; color: var(--text-muted); margin: 6px 0 12px; }
.reader-steps { list-style: none; margin: 0; padding: 0; }
.reader-step-item { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); }
.reader-step-item:hover { background: var(--bg); }
.reader-step-item.active { background: var(--primary-light); }
.reader-step-check { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--surface); }
.reader-step-item.done .reader-step-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.reader-step-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-step-vid { flex-shrink: 0; font-size: 10px; color: var(--text-muted); }
.reader-step-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.reader-video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 16px; background: #000; border-radius: 8px; overflow: hidden; }
.reader-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reader-video { width: 100%; border-radius: 8px; margin: 0 0 16px; background: #000; }
.reader-controls { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.reader-controls #readerCompleteBtn { margin: 0 auto; }
.reader-gate-hint { flex-basis: 100%; text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pricing-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 4px; cursor: pointer; }
.reader-controls .btn[disabled] { opacity: .4; cursor: default; }
#readerCompleteBtn.is-done { background: var(--bg); border-color: var(--border); color: var(--text-muted); }

/* Requirement badges */
.order-item-title { display: flex; align-items: center; gap: 6px; }
.req-badge { flex-shrink: 0; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 20px; }
.req-mandatory { background: #fee2e2; color: #b91c1c; }
.req-recommended { background: #fef3c7; color: #b45309; }

/* Curriculum step editor */
.steps-editor { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.steps-help { font-size: 12px; color: var(--text-muted); margin: 0 0 4px; line-height: 1.5; }
.steps-empty { font-size: 13px; color: var(--text-muted); font-style: italic; padding: 8px 0; }
.step-edit { border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.step-edit-head { display: flex; align-items: center; gap: 8px; }
.step-edit-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-edit-head .step-f[data-f="title"] { flex: 1; }
.step-btn { flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-muted); }
.step-btn:hover:not([disabled]) { background: var(--bg); color: var(--text); }
.step-btn[disabled] { opacity: .35; cursor: default; }
.step-btn-del:hover { color: #b91c1c; border-color: #b91c1c; }
.step-content-ta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* Step activity authoring */
.step-activity-edit { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 2px; }
.step-activity-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.step-activity-label select { flex: 0 0 220px; }
.step-activity-answer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }

/* Activity panel in the reader */
.reader-activity { margin-top: 18px; }
.activity-panel { border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; padding: 14px 16px; background: var(--bg); }
.activity-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); margin-bottom: 8px; }
.activity-prompt { margin-bottom: 10px; }
.activity-list { display: flex; flex-direction: column; gap: 6px; }
.activity-ack, .activity-check, .activity-quiz-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; line-height: 1.5; }
.activity-ack input, .activity-check input, .activity-quiz-opt input { margin-top: 3px; flex-shrink: 0; }
.activity-answer { width: 100%; margin-bottom: 8px; }
.activity-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.activity-note { font-size: 12px; color: var(--text-muted); }

/* Practice terminal activity */
.term { background: #0b1020; border: 1px solid #1e293b; border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.55; }
.term-caption { color: #64748b; font-size: 11px; margin-bottom: 8px; font-family: inherit; }
.term-log { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.term-line { color: #e2e8f0; white-space: pre-wrap; word-break: break-word; }
.term-line code { background: rgba(148,163,184,.15); color: #93c5fd; padding: 0 4px; border-radius: 4px; }
.term-hint { color: #64748b; }
.term-out { color: #94a3b8; }
.term-ok { color: #4ade80; }
.term-err { color: #f87171; }
.term-prompt { color: #4ade80; font-weight: 700; }
.term-inputline { display: flex; align-items: center; gap: 8px; margin-top: 6px; border-top: 1px solid #1e293b; padding-top: 8px; }
.term-input { flex: 1; background: transparent; border: 0; outline: none; color: #e2e8f0; font-family: inherit; font-size: 12.5px; }
.term-input::placeholder { color: #475569; }

/* Practice-terminal overlay (openable from any course) */
.term-modal { background: #0b1020; border: 1px solid #1e293b; border-radius: 12px; width: 100%; max-width: 720px; max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; }
.term-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #1e293b; }
.term-modal-title { color: #e2e8f0; font-weight: 700; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.term-modal-head .btn { color: #94a3b8; }
.term-modal-body { border: 0; border-radius: 0; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.term-modal-body .term-log { flex: 1; max-height: none; }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.term-chip { background: rgba(148,163,184,.12); color: #93c5fd; border: 1px solid #1e293b; border-radius: 20px; padding: 3px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; cursor: pointer; }
.term-chip:hover { background: rgba(148,163,184,.22); }

/* History / supervisor overlay */
.history-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.history-overlay.hidden { display: none; }
.history-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 860px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.history-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.history-modal-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.history-modal-body { overflow-y: auto; padding: 16px 20px; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.hist-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.hist-row { cursor: pointer; }
.hist-row:hover { background: var(--bg); }
.mini-bar { height: 6px; border-radius: 6px; background: var(--bg); overflow: hidden; margin-bottom: 3px; }
.mini-bar-fill { height: 100%; background: var(--primary); }
.hist-pct { font-size: 11px; color: var(--text-muted); }
.hist-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.hist-completed { background: #dcfce7; color: #166534; }
.hist-inprogress { background: #fef3c7; color: #b45309; }
.hist-notstarted { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.team-course { margin-bottom: 22px; }
.team-course-head { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.team-course-count { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-left: 6px; }
.team-activity { padding: 6px 4px; display: flex; flex-direction: column; gap: 4px; }
.team-act-item { font-size: 12.5px; color: var(--text); }
.team-act-item strong { color: var(--text); }

/* Parameters editor */
.param-edit { display: flex; align-items: center; gap: 6px; }
.param-braces { color: var(--text-muted); font-family: ui-monospace, monospace; font-size: 13px; }
.param-eq { color: var(--text-muted); }
.param-edit .param-f[data-f="key"] { flex: 0 0 140px; font-family: ui-monospace, monospace; }
.param-edit .param-f[data-f="value"] { flex: 1; font-family: ui-monospace, monospace; }
.steps-help code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

.course-reader-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.course-reader-desc { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.course-reader-desc:empty { display: none; }
.course-reader-empty { color: var(--text-muted); font-style: italic; }
.course-reader-pre { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.prose { font-size: 14px; line-height: 1.7; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: 22px; margin: 24px 0 12px; font-weight: 700; }
.prose h2 { font-size: 18px; margin: 22px 0 10px; font-weight: 700; }
.prose h3 { font-size: 15px; margin: 18px 0 8px; font-weight: 700; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
/* Command blocks render as a mock terminal (dark, mac-style traffic lights). */
.prose pre { background: #0b1020; color: #e2e8f0; border: 1px solid #1e293b; border-radius: 8px; padding: 34px 16px 14px; overflow-x: auto; margin: 0 0 14px; position: relative; font-size: 12.5px; line-height: 1.6; }
.prose pre::before { content: ""; position: absolute; top: 12px; left: 14px; width: 10px; height: 10px; border-radius: 50%; background: #f87171; box-shadow: 16px 0 0 #fbbf24, 32px 0 0 #4ade80; }
.prose pre::after { content: "Terminal"; position: absolute; top: 11px; left: 62px; font-size: 10px; font-weight: 600; letter-spacing: .04em; color: #64748b; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose pre .term-copy { position: absolute; top: 7px; right: 8px; background: rgba(148,163,184,.16); color: #cbd5e1; border: 1px solid #334155; border-radius: 5px; padding: 2px 9px; font-size: 11px; font-family: system-ui, -apple-system, sans-serif; cursor: pointer; line-height: 1.4; }
.prose pre .term-copy:hover { background: rgba(148,163,184,.32); color: #fff; }
.prose table { border-collapse: collapse; margin: 0 0 14px; font-size: 13px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.prose th { background: var(--bg); font-weight: 600; }
.prose a { color: var(--primary); }
.prose blockquote { border-left: 3px solid var(--border); margin: 0 0 12px; padding: 2px 14px; color: var(--text-muted); }
.prose em { font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

.training-landing { display: flex; align-items: center; justify-content: center; }
.training-landing.hidden { display: none; }
.training-landing-inner { display: flex; flex-direction: column; align-items: center; padding: 40px 24px; }

/* ── Developer module ─────────────────────────────────────────────────────── */
.dev-nav { padding: 8px 0; }
.dev-nav-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 12px 14px 4px; }
.dev-tab-label { font-weight: 600; font-size: 13px; }
.dev-nav-repo { border-top: 1px solid var(--border); margin-top: 10px; }
.dev-repo-chip { margin: 4px 14px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-body { padding: 16px 20px; overflow-y: auto; }
.dev-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 48px 16px; }
.dev-form { display: flex; flex-direction: column; gap: 12px; }
.gc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gc-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; background: var(--surface); }
.gc-card:hover { border-color: var(--primary); }
.gc-arrow { color: var(--text-muted); }
.gc-section { font-size: 13px; font-weight: 700; margin: 18px 0 8px; color: var(--text); }
.gc-section:first-child { margin-top: 0; }
.hist-row.gc-active td { background: var(--primary-light, #eef2ff); }
