/* All new styling is assessment-owned. Lobby/result geometry comes from O80. */
.imc-shl[data-oa-ambient="imc"] { --oa-ambient-rgb: 19,126,136; --oa-ambient-light: 144,210,218; }
.imc-shl .imc-lobby-error, .imc-shl .imc-noscript { margin: 24px auto; padding: 16px; max-width: 680px; font-size: 14px; line-height: 1.7; text-align: center; }
.imc-shl .imc-lobby-error { color: #963f31; }
.imc-shl .imc-exam { padding: 24px clamp(16px, 3vw, 40px) 24px; gap: 16px; grid-template-rows: auto 1fr auto; }
.imc-shl .imc-centre { padding: 0; justify-content: center; }
.imc-shl .imc-workspace { width: min(100%, 1000px); text-align: center; }
.imc-shl .imc-task-title { margin: 4px 0 8px; color: var(--oa-ink); font-size: 20px; font-weight: 500; letter-spacing: -.025em; }
.imc-shl .imc-task-instruction { max-width: 750px; margin: 0 auto 14px; color: var(--oa-muted); font-size: 13px; line-height: 1.65; }
.imc-shl .imc-stage { width: 100%; }
.imc-shl .imc-figures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 1.8vw, 22px); max-width: 850px; margin: 0 auto 8px; }
.imc-shl figure { margin: 0; }
.imc-shl .imc-history-figure figcaption { color: var(--oa-muted); font-size: 11px; line-height: 1.5; }
.imc-shl .imc-history-figure svg { display: block; width: 100%; max-width: 144px; margin: auto; }
.imc-shl .imc-target { max-width: 238px; margin: 2px auto 0; }
.imc-shl .imc-target-grid { max-width: 310px; margin-block: 15px; }
.imc-shl .imc-target figcaption { font-size: 13px; font-weight: 500; color: var(--oa-accent); }
.imc-shl .imc-target svg { display: block; width: 100%; overflow: visible; }
.imc-shl svg text { font-family: inherit; user-select: none; }
.imc-shl svg [role="button"] { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.imc-shl svg [role="button"]:focus { outline: none; }
.imc-shl svg [role="button"]:focus-visible > :first-child { stroke: #4263ff; stroke-width: 3; filter: drop-shadow(0 0 2px #4263ff80); }
.imc-shl svg [role="button"]:hover > :first-child { stroke: #4263ff; stroke-width: 2.5; }
.imc-shl .imc-state-legend { display: flex; gap: 20px; justify-content: center; margin-top: 0; font-size: 11px; color: var(--oa-muted); }
.imc-shl .imc-state-legend span { display: inline-flex; gap: 7px; align-items: center; }
.imc-shl .imc-swatch { display: inline-block; width: 15px; height: 15px; border: 1px solid #62768a; border-radius: 2px; background: white; }
.imc-shl .imc-swatch-1 { background: #152b43; }
.imc-shl .imc-swatch-2 { background: repeating-linear-gradient(135deg, #e6eef4 0 3px, #586d82 3px 4px, #e6eef4 4px 7px); }
.imc-shl .imc-keyboard, .imc-shl .imc-track-note { color: var(--oa-muted); font-size: 11px; line-height: 1.6; margin: 8px 0 0; }
.imc-shl .imc-node-canvas { max-width: 680px; margin: auto; }
.imc-shl .imc-node-canvas svg { display: block; width: 100%; }
.imc-shl .imc-locked-prefix { margin: 0 0 2px; color: var(--oa-muted); font-size: 13px; line-height: 1.5; }
.imc-shl .imc-selected-path { margin: 2px 0 0; min-height: 20px; color: var(--oa-accent); font-size: 13px; }
.imc-shl .imc-actions { padding-top: 0; gap: 3px; }
.imc-shl .imc-edit-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.imc-shl .imc-edit-actions .oa-exam-action { min-width: 170px; }
.imc-shl .imc-edit-actions button:disabled { opacity: .45; cursor: default; }
.imc-shl .imc-review-prompt { font-size: 14px; line-height: 1.7; margin: 18px 0; color: var(--oa-muted); }
.imc-shl .imc-review-diagrams { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.imc-shl .imc-review-diagrams figure { min-width: 0; text-align: center; }
.imc-shl .imc-review-diagrams figcaption { font-size: 12px; color: var(--oa-muted); margin-bottom: 10px; }
.imc-shl .imc-review-diagrams svg { width: 100%; max-height: 230px; }
.imc-shl .imc-unsubmitted { min-height: 140px; display: grid; place-items: center; padding: 20px; font-size: 13px; line-height: 1.7; color: var(--oa-muted); }
.imc-shl .oa-answer-details dd { overflow-wrap: anywhere; }
@media (max-height: 760px) and (min-width: 621px) {
    .imc-shl .imc-exam { padding-top: 18px; gap: 10px; }
    .imc-shl .imc-history-figure svg { max-width: 110px; }
    .imc-shl .imc-target { max-width: 188px; }
    .imc-shl .imc-target-grid { max-width: 270px; margin-block: 8px; }
    .imc-shl .imc-node-canvas { max-width: 530px; }
}
@media (max-width: 620px) {
    .imc-shl.oa-standard .oa-lobby h1 span { white-space: normal; }
    .imc-shl .imc-exam { padding: 18px 16px 24px; gap: 18px; }
    .imc-shl .imc-task-title { font-size: 18px; }
    .imc-shl .imc-task-instruction { font-size: 12px; margin-bottom: 18px; }
    .imc-shl .imc-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 430px; gap: 12px 4px; }
    .imc-shl .imc-history-figure:nth-child(4) { grid-column: 1; margin-left: 50%; margin-right: -50%; }
    .imc-shl .imc-history-figure:nth-child(5) { grid-column: 2; margin-left: 50%; margin-right: -50%; }
    .imc-shl .imc-history-figure svg { max-width: 124px; }
    .imc-shl .imc-target { margin-top: 18px; max-width: 260px; }
    .imc-shl .imc-target-grid { max-width: 320px; margin-block: 26px; }
    .imc-shl .imc-node-canvas { max-width: 410px; }
    .imc-shl .imc-edit-actions { width: 100%; gap: 8px; }
    .imc-shl .imc-edit-actions button { flex: 1; padding-inline: 14px; }
    .imc-shl .imc-edit-actions .oa-exam-action { flex-basis: 100%; }
    .imc-shl .imc-review-diagrams { grid-template-columns: 1fr; gap: 20px; }
    .imc-shl .imc-review-diagrams svg { max-height: 270px; }
    .imc-shl .imc-state-legend { gap: 15px; }
}

.imc-shl [hidden] { display: none !important; }
.imc-shl [data-imc-results] { display: contents; }
.imc-shl .imc-edit-actions { margin-top: 16px; }
.imc-shl .imc-locked-prefix, .imc-shl .imc-selected-path { font-size: 15px; }
.imc-shl .imc-node-canvas svg text { font-size: 19px; }
.imc-shl .imc-centre { min-height: 0; }
.imc-shl .imc-exam { grid-template-rows: auto minmax(0, 1fr) auto; }
@media (min-width: 621px) and (max-height: 820px) {
 .imc-shl .imc-history-figure svg { max-width: 96px; }
 .imc-shl .imc-target { max-width: 150px; }
 .imc-shl .imc-task-instruction { margin-bottom: 8px; }
 .imc-shl .imc-edit-actions { margin-top: 10px; }
}

@media (min-width: 621px) {
 .imc-shl .imc-node-canvas { max-width: clamp(280px, calc((100dvh - 620px) * 1.75), 600px); }
}
@media (min-width: 621px) and (max-height: 820px) {
 .imc-shl .imc-exam { padding-block: 16px; }
 .imc-shl.oa-standard .imc-exam h1 { font-size: 24px; margin-bottom: 8px; }
 .imc-shl .oa-exam-count { margin-bottom: 8px; }
 .imc-shl .oa-exam-timer { margin-top: 8px; }
}
