/* Module 04 is an isolated detection studio. Every selector is m04-scoped. */

.m04-shell { min-height: 100vh; color: #172033; background: rgba(248, 250, 252, .76); }
.m04-topbar { min-height: 64px; padding: 10px clamp(20px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid #e5e7eb; }
.m04-brand img { width: auto; height: 42px; display: block; }
.m04-top-actions { display: flex; align-items: center; gap: 16px; }
.m04-simulation { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: #1e3a5f; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 999px; font-size: 13px; font-weight: 600; }
.m04-exit { display: inline-flex; align-items: center; gap: 7px; color: #1e3a5f; font-size: 13px; font-weight: 600; text-decoration: none; }
.m04-exit:hover { color: #c2410c; text-decoration: underline; }
.m04-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 80px; }

.m04-kicker { margin: 0; color: #f97316; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.m04-hero-action { width: fit-content; margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; color: #fff; background: #f97316; border-radius: 11px; font-size: 13px; font-weight: 700; text-decoration: none; }
.m04-hero-action:hover { background: #ea580c; transform: translateY(-1px); }

.m04-objective { margin-top: 22px; display: flex; align-items: flex-start; gap: 16px; padding: 22px; background: #fff; border: 1px solid #dbe3ed; border-radius: 16px; box-shadow: 0 8px 24px rgba(30, 58, 95, .06); }
.m04-objective > i { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: #f97316; border-radius: 12px; font-size: 21px; }
.m04-objective h2 { margin: 4px 0 0; color: #1e3a5f; font-size: 19px; line-height: 1.45; }
.m04-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.m04-guide-grid article { padding: 22px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; }
.m04-guide-grid i { color: #1e3a5f; font-size: 25px; }
.m04-guide-grid h3 { margin: 11px 0 6px; color: #1e3a5f; font-size: 15px; }
.m04-guide-grid p { margin: 0; color: #64748b; font: 12px/1.6 Inter, sans-serif; }

.m04-lab-section { border-top: 4px solid #f97316; }
.m04-signposts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 16px; }
.m04-signposts div { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 11px 12px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 11px; font: 700 11px/1.4 Inter, sans-serif; }
.m04-signposts span { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: #1e3a5f; border-radius: 7px; font-size: 10px; }
.m04-boundary { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; color: #1e3a5f; background: #eef6ff; border-left: 3px solid #1e3a5f; border-radius: 0 11px 11px 0; }
.m04-boundary i { flex: 0 0 auto; margin-top: 1px; font-size: 20px; }
.m04-boundary p { margin: 0; color: #64748b; font: 12px/1.6 Inter, sans-serif; }
.m04-boundary strong { color: #1e3a5f; }
.m04-progress-strip { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m04-progress-strip span { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; font: 700 11px/1.3 Inter, sans-serif; }
.m04-progress-strip span.is-done { color: #1e3a5f; background: #eff6ff; border-color: #bfdbfe; }
.m04-progress-strip i { font-size: 17px; }

.m04-station-chooser { margin-top: 16px; padding: 22px; background: #0f2440; border-radius: 15px; }
.m04-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.m04-panel-heading h3 { margin: 4px 0 0; color: #1e3a5f; font-size: 20px; }
.m04-panel-heading > span { color: #64748b; font: 11px/1.4 Inter, sans-serif; }
.m04-station-chooser .m04-panel-heading h3 { color: #fff; }
.m04-station-chooser .m04-panel-heading > span { color: rgba(255, 255, 255, .58); }
.m04-instruction { margin: 10px 0 0; color: #64748b; font: 13px/1.65 Inter, sans-serif; }
.m04-station-chooser > .m04-instruction { color: rgba(255, 255, 255, .68); }
.m04-station-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 17px; }
.m04-station-buttons button { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 17px; color: #1e3a5f; background: #fff; border: 2px solid transparent; border-radius: 13px; text-align: left; cursor: pointer; }
.m04-station-buttons button:hover { background: #f8fafc; transform: translateY(-1px); }
.m04-station-buttons button.is-active { border-color: #f97316; box-shadow: 0 0 0 2px rgba(249, 115, 22, .16); }
.m04-station-buttons button > i { width: 38px; height: 38px; grid-row: span 2; display: grid; place-items: center; color: #fff; background: #1e3a5f; border-radius: 10px; font-size: 20px; }
.m04-station-buttons strong { display: block; font-size: 14px; }
.m04-station-buttons small { display: block; margin-top: 4px; color: #64748b; font: 11px/1.5 Inter, sans-serif; }
.m04-station-buttons em { grid-column: 2; color: #c2410c; font: 700 10px/1.3 Inter, sans-serif; }
.m04-start-panel { margin-top: 16px; display: flex; align-items: flex-start; gap: 13px; padding: 20px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 13px; }
.m04-start-panel i { color: #1e3a5f; font-size: 22px; }
.m04-start-panel strong { color: #1e3a5f; font-size: 14px; }
.m04-start-panel p { margin: 4px 0 0; font: 12px/1.55 Inter, sans-serif; }

.m04-workbench { margin-top: 16px; padding: 22px; background: #f8fafc; border: 1px solid #dbe3ed; border-radius: 15px; }
.m04-baseline { margin-top: 16px; display: flex; align-items: flex-start; gap: 12px; padding: 15px; color: #7c2d12; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 11px; }
.m04-baseline i { flex: 0 0 auto; font-size: 20px; }
.m04-baseline strong { font-size: 13px; }
.m04-baseline p { margin: 4px 0 0; color: #9a3412; font: 12px/1.55 Inter, sans-serif; }
.m04-rule-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 14px; margin-top: 16px; }
.m04-rule-card { padding: 18px; background: #fff; border: 1px solid #dbe3ed; border-radius: 13px; }
.m04-rule-card-heading { display: flex; justify-content: space-between; gap: 12px; }
.m04-rule-card-heading h4 { margin: 4px 0 14px; color: #1e3a5f; font-size: 16px; }
.m04-rule-card-heading > span { height: fit-content; padding: 4px 8px; color: #9a3412; background: #ffedd5; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.m04-rule-card > label { display: block; margin: 10px 0 5px; color: #475569; font: 700 11px Inter, sans-serif; }
.m04-rule-card select { width: 100%; min-height: 40px; padding: 8px 35px 8px 10px; color: #172033; background: #fff; border: 1px solid #cbd5e1; border-radius: 9px; font: 12px Inter, sans-serif; }
.m04-rule-card pre { max-width: 100%; margin: 15px 0; overflow: auto; padding: 14px; color: #dbeafe; background: #0c1e32; border-radius: 10px; font: 11px/1.65 monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.m04-primary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 15px; color: #fff; background: #f97316; border: 1px solid #f97316; border-radius: 10px; font: 700 12px 'Space Grotesk', sans-serif; cursor: pointer; }
.m04-primary:hover { background: #ea580c; }
.m04-rule-output { padding: 18px; background: #eef6ff; border: 1px solid #cfe2f7; border-radius: 13px; }
.m04-rule-output h4 { margin: 4px 0 13px; color: #1e3a5f; font-size: 16px; }
.m04-empty-result { min-height: 110px; display: grid; place-content: center; gap: 4px; padding: 17px; color: #64748b; background: rgba(255, 255, 255, .82); border: 1px dashed #cbd5e1; border-radius: 10px; font: 12px/1.5 Inter, sans-serif; text-align: center; }
.m04-empty-result strong { color: #1e3a5f; font-size: 15px; }
.m04-rule-results { display: grid; gap: 9px; }
.m04-rule-results article { padding: 13px; background: #fff; border: 1px solid #dbe3ed; border-left: 4px solid #94a3b8; border-radius: 9px; }
.m04-rule-results article.is-target { border-left-color: #f97316; }
.m04-rule-results strong { display: block; color: #1e3a5f; font-size: 14px; }
.m04-rule-results span { display: block; margin-top: 3px; color: #475569; font: 11px Inter, sans-serif; }
.m04-rule-results small { display: block; margin-top: 5px; color: #64748b; font: 10px/1.4 Inter, sans-serif; }
.m04-hint { margin-top: 13px; color: #475569; background: rgba(255, 255, 255, .72); border: 1px solid #dbe3ed; border-radius: 9px; }
.m04-hint summary { padding: 10px 12px; color: #1e3a5f; font-size: 11px; font-weight: 700; cursor: pointer; }
.m04-hint p { margin: 0; padding: 0 12px 12px; color: #64748b; font: 11px/1.55 Inter, sans-serif; }
.m04-subheading { margin: 20px 0 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.m04-subheading h4 { margin: 0; color: #1e3a5f; font-size: 15px; }
.m04-subheading p { margin: 4px 0 0; color: #64748b; font: 11px/1.5 Inter, sans-serif; }
.m04-subheading > span { color: #64748b; font: 11px Inter, sans-serif; white-space: nowrap; }

.m04-event-list { display: grid; gap: 7px; }
.m04-event { min-width: 0; display: grid; grid-template-columns: 42px 86px minmax(155px, .7fr) minmax(220px, 1.3fr); align-items: center; gap: 10px; padding: 11px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.m04-event.is-selected { border-color: #f97316; background: #fffaf5; }
.m04-evidence-check { display: inline-flex; align-items: center; gap: 7px; color: #475569; font: 700 10px/1.4 Inter, sans-serif; cursor: pointer; }
.m04-evidence-check input { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; accent-color: #f97316; }
.m04-event-select .m04-evidence-check span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m04-event-time time { display: block; color: #1e3a5f; font-size: 12px; font-weight: 800; }
.m04-outcome { display: inline-flex; margin-top: 4px; padding: 3px 6px; border-radius: 999px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.m04-outcome-failed { color: #9a3412; background: #ffedd5; }
.m04-outcome-success { color: #1e3a5f; background: #eff6ff; }
.m04-event-entity strong { display: block; color: #334155; font-size: 12px; }
.m04-event-entity code { display: block; margin-top: 3px; color: #1e3a5f; font-size: 11px; overflow-wrap: anywhere; }
.m04-event-context span { color: #475569; font: 700 10px Inter, sans-serif; }
.m04-event-context p { margin: 3px 0 0; color: #64748b; font: 10px/1.45 Inter, sans-serif; }

.m04-intel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.m04-intel-card { min-width: 0; padding: 17px; background: #fff; border: 1px solid #dbe3ed; border-radius: 12px; }
.m04-intel-card.is-attached { border-color: #f97316; box-shadow: 0 0 0 2px rgba(249, 115, 22, .13); }
.m04-intel-top { display: flex; justify-content: space-between; gap: 12px; color: #64748b; font: 10px Inter, sans-serif; }
.m04-intel-top strong { color: #f97316; }
.m04-intel-card > code { display: block; margin-top: 10px; color: #1e3a5f; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.m04-intel-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 13px 0 0; }
.m04-intel-card dl div { padding: 8px; background: #f8fafc; border-radius: 8px; }
.m04-intel-card dt { color: #64748b; font: 9px Inter, sans-serif; }
.m04-intel-card dd { margin: 3px 0 0; color: #334155; font: 700 10px Inter, sans-serif; }
.m04-intel-card > p { min-height: 38px; margin: 12px 0; color: #64748b; font: 11px/1.55 Inter, sans-serif; }
.m04-intel-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid #e5e7eb; }
.m04-intel-actions button { min-height: 36px; padding: 8px 11px; color: #1e3a5f; background: #eef6ff; border: 1px solid #cfe2f7; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; }
.m04-intel-actions button:hover { background: #dbeafe; }

.m04-artifact-locked { margin-top: 16px; display: flex; align-items: flex-start; gap: 12px; padding: 19px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 13px; }
.m04-artifact-locked > i { color: #1e3a5f; font-size: 20px; }
.m04-artifact-locked strong { color: #1e3a5f; font-size: 13px; }
.m04-artifact-locked p { margin: 4px 0 0; font: 11px/1.5 Inter, sans-serif; }
.m04-artifact { margin-top: 16px; padding: 22px; background: #fff; border: 1px solid #dbe3ed; border-top: 4px solid #f97316; border-radius: 14px; }
.m04-fieldset { min-width: 0; margin: 22px 0 0; padding: 0; border: 0; }
.m04-fieldset legend { display: flex; align-items: center; gap: 9px; color: #1e3a5f; font-size: 14px; font-weight: 700; }
.m04-fieldset legend > span { width: 26px; height: 26px; display: grid; place-items: center; color: #fff; background: #f97316; border-radius: 7px; font-size: 10px; }
.m04-help { margin: 7px 0 10px 35px; color: #64748b; font: 11px/1.55 Inter, sans-serif; }
.m04-option-list { display: grid; gap: 8px; margin: 10px 0 0 35px; }
.m04-option-list label { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; background: #f8fafc; border: 1px solid #dbe3ed; border-radius: 10px; cursor: pointer; }
.m04-option-list label:has(input:checked) { border-color: #f97316; background: #fffaf5; }
.m04-option-list input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; accent-color: #f97316; }
.m04-option-list strong { display: block; color: #334155; font: 700 12px/1.45 Inter, sans-serif; }
.m04-option-list small { display: block; margin-top: 3px; color: #64748b; font: 10px/1.45 Inter, sans-serif; }
.m04-run-automation { min-height: 40px; margin: 11px 0 0 35px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; color: #fff; background: #1e3a5f; border: 1px solid #1e3a5f; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; }
.m04-run-automation:hover { background: #142d4b; }
.m04-run-automation:disabled { color: #94a3b8; background: #e2e8f0; border-color: #e2e8f0; cursor: not-allowed; }
.m04-automation-log { margin: 11px 0 0 35px; padding: 13px; color: #64748b; background: #eef6ff; border: 1px solid #cfe2f7; border-radius: 9px; font: 11px/1.5 Inter, sans-serif; }
.m04-automation-log strong { color: #1e3a5f; }
.m04-automation-log ol { margin: 8px 0 0; padding-left: 20px; }
.m04-note-field > label { display: flex; align-items: center; gap: 9px; color: #1e3a5f; font-size: 14px; font-weight: 700; }
.m04-note-field > label span { width: 26px; height: 26px; display: grid; place-items: center; color: #fff; background: #f97316; border-radius: 7px; font-size: 10px; }
.m04-note-field textarea { width: calc(100% - 35px); margin-left: 35px; padding: 13px 14px; resize: vertical; color: #172033; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; font: 13px/1.6 Inter, sans-serif; }
.m04-note-field textarea::placeholder { color: #94a3b8; }
.m04-note-count { margin: 5px 0 0 35px; color: #94a3b8; font: 10px Inter, sans-serif; text-align: right; }
.m04-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 23px 0 0 35px; }
.m04-secondary { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; color: #1e3a5f; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; font: 700 12px 'Space Grotesk', sans-serif; cursor: pointer; }
.m04-secondary:hover { background: #f8fafc; border-color: #1e3a5f; }

.m04-score-empty { margin: 20px 0 0 35px; padding: 17px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 11px; font: 11px/1.55 Inter, sans-serif; }
.m04-validation { margin: 20px 0 0 35px; display: flex; align-items: flex-start; gap: 11px; padding: 17px; color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 11px; }
.m04-validation i { font-size: 20px; }
.m04-validation strong { font-size: 13px; }
.m04-validation p { margin: 4px 0 0; font: 11px/1.5 Inter, sans-serif; }
.m04-score { margin: 20px 0 0 35px; padding: 19px; border: 1px solid; border-radius: 13px; }
.m04-score.is-pass { background: #eff6ff; border-color: #bfdbfe; }
.m04-score.is-remediate { background: #fff7ed; border-color: #fed7aa; }
.m04-score-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.m04-score-heading h3 { margin: 4px 0 0; color: #1e3a5f; font-size: 18px; }
.m04-score-heading > span { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: #1e3a5f; border-radius: 50%; font-size: 19px; font-weight: 800; }
.m04-score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 15px; }
.m04-score-grid div { padding: 10px; background: rgba(255, 255, 255, .8); border-radius: 8px; }
.m04-score-grid strong { display: block; color: #1e3a5f; font-size: 13px; }
.m04-score-grid span { display: block; margin-top: 2px; color: #475569; font: 700 10px Inter, sans-serif; }
.m04-score-grid small { display: block; margin-top: 4px; color: #64748b; font: 9px/1.4 Inter, sans-serif; }
.m04-feedback-list { margin: 14px 0 0; padding-left: 18px; color: #475569; font: 11px/1.65 Inter, sans-serif; }
.m04-expert-model { margin-top: 14px; padding: 13px; background: rgba(255, 255, 255, .78); border-radius: 9px; }
.m04-expert-model strong { color: #1e3a5f; font-size: 12px; }
.m04-expert-model p { margin: 5px 0 0; color: #64748b; font: 11px/1.55 Inter, sans-serif; }

.m04-section-collapsible .m04-section-body h3:not(.learn-it *):not(.m03e-console *) { margin-top: 22px; color: #1e3a5f; font-size: 17px; font-weight: 700; }
.m04-section-collapsible .m04-section-body h3:first-child:not(.learn-it *):not(.m03e-console *) { margin-top: 0; }
.m04-section-collapsible .m04-section-body p:not(.learn-it *):not(.m03e-console *) { margin: 10px 0; color: #475569; font: 14px/1.65 Inter, sans-serif; }
.m04-section-collapsible .m04-section-body ul { margin: 12px 0; padding-left: 20px; color: #475569; font: 14px/1.65 Inter, sans-serif; }
.m04-section-collapsible .m04-section-body li { margin: 8px 0; }
.m04-section-collapsible .m04-section-body li strong { color: #334155; }
.m04-lecture-section { padding: 0; }
.m04-lecture-intro { margin-bottom: 18px; }
.m04-lecture-intro p { color: #475569; font: 14px/1.65 Inter, sans-serif; }
.m04-quiz-form { margin-top: 14px; }
.m04-quiz-question { margin-bottom: 16px; padding: 14px; background: #f8fafc; border: 1px solid #dbe3ed; border-radius: 10px; }
.m04-quiz-question legend { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 11px; color: #1e3a5f; font-size: 14px; font-weight: 700; }
.m04-quiz-question legend span { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: #1e3a5f; border-radius: 5px; font-size: 9px; }
.m04-quiz-options { display: grid; gap: 8px; margin-left: 31px; }
.m04-quiz-options label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.m04-quiz-options input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; accent-color: #f97316; }
.m04-quiz-options span { color: #475569; font: 12px/1.55 Inter, sans-serif; }
.m04-quiz-submit { min-height: 40px; margin-top: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; color: #fff; background: #f97316; border: 1px solid #f97316; border-radius: 9px; font-size: 11px; font-weight: 800; cursor: pointer; }
.m04-quiz-submit:hover { background: #ea580c; }
.m04-quiz-submit:disabled { background: #cbd5e1; border-color: #cbd5e1; cursor: not-allowed; }
.m04-quiz-score { margin-top: 14px; padding: 14px; border: 1px solid; border-radius: 10px; }
.m04-quiz-pass { background: #eff6ff; border-color: #bfdbfe; }
.m04-quiz-remediate { background: #fff7ed; border-color: #fed7aa; }
.m04-quiz-score-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.m04-quiz-score-heading h3 { margin: 2px 0 0; color: #1e3a5f; font-size: 16px; }
.m04-quiz-score-heading span { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: #1e3a5f; border-radius: 50%; font-size: 16px; font-weight: 800; }
.m04-quiz-feedback-list { margin: 10px 0 0; padding-left: 16px; color: #475569; font: 11px/1.55 Inter, sans-serif; }
.m04-quiz-feedback-list li { margin: 8px 0; display: flex; gap: 8px; }
.m04-quiz-feedback-list li i { flex: 0 0 auto; margin-top: 1px; }
.m04-quiz-feedback-correct i { color: #059669; }
.m04-quiz-feedback-incorrect i { color: #dc2626; }
.m04-quiz-feedback-list strong { color: #334155; display: block; }
.m04-quiz-feedback-list p { margin: 3px 0 0; }
.m04-quiz-actions { display: flex; gap: 10px; margin-top: 10px; }
.m04-quiz-retry { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; color: #1e3a5f; background: #eef6ff; border: 1px solid #cfe2f7; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; }
.m04-quiz-retry:hover { background: #dbeafe; }
.m04-quiz-empty { margin-top: 10px; padding: 12px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 9px; font: 11px/1.5 Inter, sans-serif; }
.m04-quiz-ready { margin-top: 10px; padding: 12px; color: #1e3a5f; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 9px; font: 11px/1.5 Inter, sans-serif; }
.m04-review-section p { color: #475569; font: 14px/1.65 Inter, sans-serif; }
.m04-review-section ul { margin: 12px 0; padding-left: 20px; color: #475569; font: 14px/1.65 Inter, sans-serif; }
.m04-review-section li { margin: 8px 0; }
.m04-review-section li strong { color: #334155; }

.m04-shell :focus-visible { outline: 3px solid rgba(249, 115, 22, .42); outline-offset: 2px; }

@media (max-width: 900px) {
  .m04-rule-grid { grid-template-columns: 1fr; }
  .m04-event { grid-template-columns: 42px 78px minmax(140px, .7fr) minmax(190px, 1.3fr); }
}

@media (max-width: 700px) {
  .m04-guide-grid { grid-template-columns: 1fr; }
  .m04-signposts { grid-template-columns: repeat(2, 1fr); }
  .m04-progress-strip { grid-template-columns: repeat(2, 1fr); }
  .m04-station-buttons { grid-template-columns: 1fr; }
  .m04-intel-list { grid-template-columns: 1fr; }
  .m04-event { grid-template-columns: 34px 70px minmax(0, 1fr); align-items: start; }
  .m04-event-context { grid-column: 2 / -1; }
  .m04-score-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .m04-main { width: min(100% - 24px, 1180px); padding-top: 22px; }
  .m04-topbar { padding-inline: 14px; }
  .m04-brand img { height: 34px; }
  .m04-simulation { display: none; }
  .m04-exit { font-size: 0; }
  .m04-exit i { font-size: 20px; }
  .m04-panel-heading { flex-direction: column; }
  .m04-signposts { grid-template-columns: 1fr; }
  .m04-progress-strip { grid-template-columns: 1fr; }
  .m04-station-chooser { padding: 17px; }
  .m04-workbench { padding: 16px; }
  .m04-subheading { align-items: flex-start; flex-direction: column; }
  .m04-event { grid-template-columns: 30px minmax(0, 1fr); }
  .m04-event-time { grid-column: 2; }
  .m04-event-entity { grid-column: 2; }
  .m04-event-context { grid-column: 2; }
  .m04-intel-card dl { grid-template-columns: 1fr; }
  .m04-intel-actions { align-items: flex-start; flex-direction: column; }
  .m04-option-list { margin-left: 0; }
  .m04-help { margin-left: 0; }
  .m04-run-automation { margin-left: 0; }
  .m04-automation-log { margin-left: 0; }
  .m04-note-field textarea { width: 100%; margin-left: 0; }
  .m04-note-count { margin-left: 0; }
  .m04-actions { margin-left: 0; }
  .m04-score-empty { margin-left: 0; }
  .m04-validation { margin-left: 0; }
  .m04-score { margin-left: 0; }
  .m04-score-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .m04-hero-action:hover { transform: none; }
  .m04-station-buttons button:hover { transform: none; }
}
.m04-lesson-loops{display:grid;gap:1rem;margin:1.5rem 0}.m04-lesson-loop summary small{display:block;color:#65758b;margin-top:.2rem}.m04-lesson-loop-body{display:grid;gap:1rem;padding:0 1rem 1rem}.m04-lesson-loop-body>section{padding:1rem;background:#f7f9fc;border-radius:10px}.m04-lesson-question{border:0;padding:0;margin:.75rem 0}.m04-lesson-question legend{font-weight:600;margin-bottom:.45rem}.m04-lesson-question label,.m04-independent-question label{display:flex;gap:.5rem;padding:.35rem 0;cursor:pointer}.m04-lesson-check,.m04-lesson-task-button,.m04-independent-submit{margin-top:.5rem}.m04-lesson-loop textarea,.m04-independent-lab textarea{width:100%;box-sizing:border-box;padding:.65rem;border:1px solid #b8c5d4;border-radius:8px}.m04-lesson-feedback{padding:.7rem;border-radius:8px}.m04-lesson-feedback.is-pass,.m04-independent-feedback.is-pass{background:#e8f7ef;color:#155d3d}.m04-lesson-feedback.is-hint,.m04-independent-feedback.is-hint{background:#fff7df;color:#755400}.m04-independent-lab{margin-top:1.5rem;padding:1.25rem;border:2px solid #8aa9d6;border-radius:14px;background:#f5f9ff}.m04-independent-question{border:0;margin:1rem 0;padding:0}.m04-independent-question legend{font-weight:600}.m04-independent-feedback{margin-top:1rem;padding:1rem;border-radius:10px}.m04-independent-feedback ul{margin-bottom:0}@media(max-width:600px){.m04-lesson-loop-body{padding:.75rem}.m04-lesson-question label,.m04-independent-question label{align-items:flex-start}}

.m04-shared-console { margin: 0 0 24px; border: 1px solid #cbd5e1; background: #fff; color: #172b43; }
.m04-shared-console header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; background: #f1f5f9; }
.m04-shared-console header p { margin: 0 0 4px; color: #526579; font-size: 10px; font-weight: 800; }
.m04-shared-console header h2 { margin: 0; font-size: 17px; }
.m04-console-context { color: #42566b; font-size: 12px; }
.m04-console-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid #cbd5e1; }
.m04-console-tabs button { min-height: 38px; padding: 7px 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #465b70; font: inherit; cursor: pointer; }
.m04-console-tabs button.is-active { border-bottom-color: #16806b; color: #126653; font-weight: 700; }
.m04-console-workspace { padding: 16px 18px; }
.m04-console-view h3 { margin: 0 0 6px; font-size: 15px; }
.m04-console-view p { margin: 0; color: #506176; font-size: 13px; }
.m04-ti-workspace { display: grid; gap: 22px; }
.m04-ti-workspace section { min-width: 0; }
.m04-ti-heading, .m04-ti-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m04-ti-heading h4 { margin: 0 0 10px; font-size: 14px; }
.m04-ti-report-list, .m04-ti-ioc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 10px; }
.m04-ti-report, .m04-ti-ioc { border: 1px solid #d4dde6; padding: 12px; background: #fff; }
.m04-ti-report h4 { margin: 0 0 8px; font-size: 13px; }
.m04-ti-report dl { display: grid; grid-template-columns: minmax(90px, .7fr) 1.5fr; gap: 4px 8px; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.m04-ti-report dt { color: #526579; font-weight: 700; }
.m04-ti-report dd { margin: 0; }
.m04-ti-report p, .m04-ti-ioc p { margin: 8px 0; font-size: 12px; overflow-wrap: anywhere; }
.m04-ti-ioc > div:first-child { display: grid; gap: 3px; overflow-wrap: anywhere; }
.m04-ti-ioc > div:first-child span, .m04-ti-ioc small { color: #526579; font-size: 11px; }
.m04-ti-ioc dl { display: grid; grid-template-columns: minmax(80px, .7fr) 1.5fr; gap: 3px 8px; margin: 8px 0; font-size: 11px; overflow-wrap: anywhere; }
.m04-ti-ioc dt { color: #526579; font-weight: 700; }
.m04-ti-ioc dd { margin: 0; }
.m04-ti-actions { justify-content: flex-start; margin-top: 10px; }
.m04-ti-workspace form { display: grid; gap: 10px; max-width: 600px; margin-top: 12px; padding: 14px; border: 1px solid #cbd5e1; }
.m04-ti-workspace form h5 { margin: 0; }
.m04-ti-workspace form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.m04-ti-workspace form input, .m04-ti-workspace form select, .m04-ti-workspace form textarea { box-sizing: border-box; width: 100%; min-height: 38px; padding: 7px; border: 1px solid #aebdca; font: inherit; }
.m04-ti-workspace form textarea { min-height: 72px; resize: vertical; }
.m04-ti-workspace form [role="alert"] { color: #a32323; }
.m04-rules-workspace { display: grid; gap: 18px; }
.m04-rules-workspace form { display: grid; gap: 9px; max-width: 900px; }
.m04-rules-workspace label { font-size: 12px; font-weight: 700; }
.m04-rules-workspace textarea, .m04-rules-workspace input, .m04-rules-workspace select { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px; border: 1px solid #aebdca; font: inherit; }
.m04-rules-workspace textarea { font-family: ui-monospace, monospace; resize: vertical; }
.m04-rules-workspace form > div:first-of-type { display: flex; gap: 8px; }
.m04-rules-workspace [role="status"] { margin: 0; font-size: 12px; }
.m04-query-results { max-width: 100%; overflow: auto; }
.m04-query-results table { border-collapse: collapse; font-size: 12px; }
.m04-query-results td { padding: 5px 8px; border: 1px solid #d4dde6; white-space: nowrap; }
.m04-rules-workspace ul { display: grid; gap: 8px; margin: 8px 0; padding-left: 20px; }
.m04-rules-workspace li code { margin: 0 8px; }

/* Module 4 workspaces inside the mounted Module 3 console (m03e-console). */
.m04-console-extra { color: #172b43; font-size: 13px; }
.m04-console-extra h4, .m04-console-extra h5 { margin: 14px 0 8px; color: #1e3a5f; }
.m04-console-extra button { margin: 4px 6px 4px 0; padding: 7px 11px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #1e3a5f; font: 700 12px Inter, sans-serif; cursor: pointer; }
.m04-console-extra button:hover:not(:disabled) { border-color: #f97316; }
.m04-console-extra button:disabled { opacity: .5; cursor: not-allowed; }
.m04-console-extra [data-m04-low-risk-automation] label { display: grid; gap: 4px; max-width: 600px; margin: 8px 0; font-size: 12px; font-weight: 700; }
.m04-console-extra [data-m04-low-risk-automation] input, .m04-console-extra [data-m04-low-risk-automation] select, .m04-console-extra [data-m04-low-risk-automation] textarea { box-sizing: border-box; width: 100%; min-height: 36px; padding: 7px; border: 1px solid #aebdca; border-radius: 6px; font: inherit; }
.m04-console-extra [data-m04-approval-requests] { margin-top: 16px; padding-top: 12px; border-top: 1px solid #dbe3ed; }
.m04-console-extra [role="alert"] { color: #a32323; }
.m04-save-query { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #dbe3ed; border-radius: 7px; background: #f8fafc; font-size: 12px; }
.m04-save-query label { display: grid; gap: 3px; font-weight: 700; color: #334155; }
.m04-save-query input { min-width: 220px; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }
.m04-save-query button { padding: 7px 11px; border: 1px solid #f97316; border-radius: 7px; background: #f97316; color: #fff; font: 700 12px Inter, sans-serif; cursor: pointer; }
.m04-save-query p { flex-basis: 100%; margin: 0; color: #a32323; }
.m04-alert-events { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.m04-alert-events button { padding: 4px 8px; border: 1px solid #dbe3ed; border-radius: 999px; background: #fff; color: #1e3a5f; font: 11px ui-monospace, Consolas, monospace; cursor: pointer; }
.m04-alert-review { display: grid; gap: 6px; }
.m04-alert-review label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.m04-alert-review textarea { box-sizing: border-box; width: 100%; padding: 7px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }
.m04-alert-review button { justify-self: start; padding: 7px 11px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #1e3a5f; font: 700 12px Inter, sans-serif; cursor: pointer; }

/* Keep a submitted practice debrief accessible from its docked console header. */
.m03e-console header .m02e-learn-tip:not(.is-collapsed) .m02e-tip-body { display:block; }

/* Grouping comparison (Guided Lab reference). Solid border = spray, dashed = benign/background. */
.m04-gc { margin: 14px 0; }
.m04-gc-body { padding: 14px 4px 4px; }
.m04-gc-title { margin: 0 0 8px; color: #1e3a5f; font-size: 17px; }
.m04-gc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.m04-gc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.m04-gc-col { min-width: 0; padding: 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; }
.m04-gc-col.is-current { border-style: dashed; border-color: #94a3b8; }
.m04-gc-col.is-proposed { border: 2px solid #1e3a5f; }
.m04-gc-colhead { margin: 0 0 10px; color: #1e3a5f; font: 700 14px/1.4 Inter, sans-serif; }
.m04-gc-colhead small { display: block; margin-top: 3px; color: #64748b; font-size: 11px; font-weight: 500; }
.m04-gc-badge { display: inline-block; margin-right: 6px; padding: 2px 7px; color: #fff; background: #1e3a5f; border-radius: 6px; font-size: 10px; letter-spacing: .1em; }
.is-current .m04-gc-badge { background: #64748b; }
.m04-gc-groups, .m04-gc-chips { margin: 0; padding: 0; list-style: none; }
.m04-gc-groups { display: grid; gap: 8px; }
.m04-gc-group { padding: 8px 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.m04-gc-group.is-alert { border: 2px solid #c2410c; }
.m04-gc-group-head { margin: 0 0 6px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; color: #1e3a5f; font: 700 12px/1.4 Inter, sans-serif; overflow-wrap: anywhere; }
.m04-gc-group-head span { color: #475569; font-weight: 600; }
.m04-gc-group.is-alert .m04-gc-group-head span { color: #c2410c; }
.m04-gc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.m04-gc-chip { max-width: 100%; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 3px 8px; color: #172033; background: #fff7ed; border: 2px solid #c2410c; border-radius: 8px; font: 600 11px/1.4 Inter, sans-serif; overflow-wrap: anywhere; }
.m04-gc-chip.is-retry, .m04-gc-chip.is-noise { background: #f1f5f9; border: 2px dashed #64748b; }
.m04-gc-mark { font-weight: 800; }
.m04-gc-tag { color: #475569; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.m04-gc-outcome { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid #e2e8f0; color: #334155; font: 12px/1.6 Inter, sans-serif; }
.m04-gc-key { margin: 12px 0 0; color: #64748b; font: 11px/1.6 Inter, sans-serif; }
@media (max-width: 760px) { .m04-gc-cols { grid-template-columns: minmax(0, 1fr); } }

/* Indicator verdicts (Threat Intelligence tab): one card per indicator, same field styling as the IOC forms. */
.m04-ti-verdicts { margin-top: 22px; }
.m04-ti-verdicts > p { margin: 0 0 10px; font-size: 12px; max-width: 70ch; }
.m04-ti-verdict-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.m04-ti-verdict { border: 1px solid #d4dde6; padding: 12px; background: #fff; min-width: 0; }
.m04-ti-verdict > div:first-child { display: grid; gap: 3px; overflow-wrap: anywhere; }
.m04-ti-verdict > div:first-child span { color: #526579; font-size: 11px; }
.m04-ti-verdict p { margin: 8px 0; font-size: 12px; overflow-wrap: anywhere; }
.m04-ti-verdict form { display: grid; gap: 10px; margin-top: 10px; }
.m04-ti-verdict form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.m04-ti-verdict form select, .m04-ti-verdict form textarea { box-sizing: border-box; width: 100%; min-height: 38px; padding: 7px; border: 1px solid #aebdca; font: inherit; }
.m04-ti-verdict form textarea { min-height: 72px; resize: vertical; }
.m04-ti-verdict form [role="alert"] { color: #a32323; margin: 0; }
.m04-ti-verdict-recorded { padding: 8px; background: #f1f5f9; border-left: 3px solid #526579; }
.m04-ti-verdict-feedback { padding: 8px; border-left: 3px solid #526579; background: #f8fafc; }
.m04-ti-verdict-feedback.is-good { border-left-color: #1b7a3d; background: #eef8f1; }
.m04-ti-verdict-feedback.is-close { border-left-color: #a56a00; background: #fff8e8; }
.m04-ti-verdict-feedback.is-wrong { border-left-color: #a32323; background: #fdeeee; }
.m04-ti-verdict-hints { margin: 8px 0 0; padding-left: 18px; font-size: 12px; }
