/* NCLEX Test Engine — styled to match the existing A10 quiz look. */
.nclex-app { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.5; color: #1f2933; }
.nclex-app *, .nclex-app *::before, .nclex-app *::after { box-sizing: border-box; }
.nclex-title { margin: 0 0 12px; }

.nclex-header { font-size: 17px; padding: 6px 0 12px; border-bottom: 1px solid #e3e6ea; margin-bottom: 18px; }

.nclex-stem { background: #f0f2f4; border: 1px solid #e3e6ea; border-radius: 10px; padding: 20px 26px; margin: 0 0 22px; }
.nclex-stem p:last-child { margin-bottom: 0; }

.nclex-options { display: flex; flex-direction: column; gap: 12px; margin: 0 8px 20px; }
.nclex-option { display: flex; align-items: flex-start; gap: 14px; background: #f0f2f4; border: 2px solid #f0f2f4; border-radius: 10px; padding: 16px 22px; cursor: pointer; margin: 0; transition: background .12s, border-color .12s; }
.nclex-option:hover { background: #e8ebee; border-color: #e8ebee; }
.nclex-option input { margin: 5px 0 0; width: 18px; height: 18px; flex: 0 0 18px; accent-color: #1a73e8; cursor: pointer; }
.nclex-option.is-selected { background: #e8f1fd; border-color: #1a73e8; }
.nclex-option.is-correct { background: #e6f6ea; border-color: #43b35a; }
.nclex-option.is-incorrect { background: #fdeaea; border-color: #e33b3b; }
.nclex-option input:disabled { cursor: default; }
.nclex-option-text p:last-child { margin-bottom: 0; }

.nclex-actions { display: flex; align-items: center; gap: 12px; margin: 8px 0 28px; }
.nclex-spacer { flex: 1; }
.nclex-btn { font: inherit; font-size: 18px; border: 0; border-radius: 999px; padding: 12px 36px; cursor: pointer; transition: filter .12s; }
.nclex-btn:hover { filter: brightness(0.95); }
.nclex-btn:disabled { opacity: .6; cursor: default; }
.nclex-btn-primary { background: #d9972c; color: #fff; }
.nclex-btn-secondary { background: #e3e6ea; color: #1f2933; }
.nclex-btn-finish { background: #1a73e8; color: #fff; }

.nclex-feedback { margin: 0 8px; }
.nclex-verdict { display: inline-block; font-weight: 700; padding: 6px 14px; border-radius: 6px; margin-bottom: 12px; }
.nclex-verdict.is-correct { background: #e6f6ea; color: #1d7a33; }
.nclex-verdict.is-incorrect { background: #fdeaea; color: #b42323; }
.nclex-rationale { background: #fffbea; border-left: 4px solid #d9972c; border-radius: 6px; padding: 14px 18px; margin-bottom: 18px; }
.nclex-rationale > strong { display: block; margin-bottom: 6px; }
.nclex-rationale p:last-child { margin-bottom: 0; }
.nclex-hint, .nclex-error { color: #b42323; margin: 0 0 12px; }
.nclex-loading { color: #6b7280; }

.nclex-nav-wrap { margin-top: 8px; }
.nclex-nav { display: flex; flex-wrap: wrap; gap: 10px; background: #f0f2f4; border: 1px solid #e3e6ea; border-radius: 10px; padding: 26px 12px 14px; }
.nclex-nav-item { position: relative; width: 46px; height: 46px; background: #fff; border: 1px solid #d9dde2; border-radius: 6px; font: inherit; font-size: 17px; color: #1f2933; cursor: pointer; padding: 0; }
.nclex-nav-item.is-current { border: 2px solid #1a73e8; color: #1a73e8; }
.nclex-nav-item.is-answered { background: #dbe6f5; border-color: #dbe6f5; }
.nclex-nav-item.is-correct { background: #43b35a; border-color: #43b35a; color: #fff; }
.nclex-nav-item.is-incorrect { background: #e33b3b; border-color: #e33b3b; color: #fff; }
.nclex-nav-mark { position: absolute; top: -20px; left: 0; right: 0; font-size: 14px; font-weight: 700; line-height: 1; }
.nclex-nav-item.is-correct .nclex-nav-mark { color: #43b35a; }
.nclex-nav-item.is-incorrect .nclex-nav-mark { color: #e33b3b; }
.nclex-legend { display: flex; gap: 22px; margin: 10px 8px 0; font-size: 16px; }
.nclex-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.nclex-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 3px; }
.nclex-swatch.is-correct { background: #43b35a; }
.nclex-swatch.is-incorrect { background: #e33b3b; }

.nclex-results h3 { margin: 0 0 12px; }
.nclex-results h4 { margin: 24px 0 10px; font-size: 16px; color: #4b5563; }
.nclex-score { display: flex; align-items: baseline; gap: 14px; background: #f0f2f4; border-radius: 10px; padding: 18px 26px; }
.nclex-score-pct { font-size: 40px; font-weight: 700; }
.nclex-score-detail { color: #6b7280; }
.nclex-bar-row { display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 15px; }
.nclex-bar { height: 12px; background: #e3e6ea; border-radius: 999px; overflow: hidden; }
.nclex-bar-fill { height: 100%; background: #43b35a; }
.nclex-bar-val { color: #6b7280; min-width: 40px; text-align: right; }

@media (max-width: 600px) {
	.nclex-app { font-size: 16px; }
	.nclex-stem { padding: 16px 18px; }
	.nclex-option { padding: 14px 16px; }
	.nclex-btn { padding: 11px 26px; font-size: 16px; }
	.nclex-bar-row { grid-template-columns: 1fr; gap: 4px; }
	.nclex-bar-val { text-align: left; }
}

/* ---------- v0.2: partial credit, exhibits, NGN item types ---------- */
.nclex-points { float: right; color: #6b7280; font-size: 15px; }
.nclex-case-label { font-size: 15px; color: #4b5563; margin: -8px 0 14px; }
.nclex-option.is-missed { border-color: #43b35a; border-style: dashed; }
.nclex-verdict.is-partial { background: #fff4d6; color: #8a5a00; }
.nclex-nav-item.is-partial { background: #f0b429; border-color: #f0b429; color: #fff; }
.nclex-nav-item.is-partial .nclex-nav-mark { color: #f0b429; }
.nclex-nav-item.is-case::after { content: ''; position: absolute; bottom: 3px; left: 50%; width: 14px; height: 2px; margin-left: -7px; background: currentColor; opacity: .5; }
.nclex-swatch.is-partial { background: #f0b429; }
.nclex-pick-hint { color: #4b5563; font-size: 15px; margin: 0 8px 10px; }

/* exhibits + split layout */
.nclex-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.nclex-exhibits { background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; overflow: hidden; font-size: 15.5px; }
.nclex-opening { padding: 14px 18px; background: #f0f2f4; border-bottom: 1px solid #e3e6ea; }
.nclex-opening p:last-child { margin-bottom: 0; }
.nclex-tabs { display: flex; flex-wrap: wrap; background: #e8ebee; border-bottom: 1px solid #d9dde2; }
.nclex-tab { font: inherit; font-size: 14px; font-weight: 600; background: transparent; border: 0; border-right: 1px solid #d9dde2; padding: 10px 14px; cursor: pointer; color: #4b5563; }
.nclex-tab.is-active { background: #fff; color: #1f2933; }
.nclex-tab-pane { display: none; padding: 16px 18px; max-height: 70vh; overflow: auto; }
.nclex-tab-pane.is-active { display: block; }
.nclex-tab-pane table, .nclex-passage table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 15px; }
.nclex-tab-pane th, .nclex-tab-pane td, .nclex-passage th, .nclex-passage td { border: 1px solid #d9dde2; padding: 6px 10px; text-align: left; vertical-align: top; }
.nclex-tab-pane th, .nclex-passage th { background: #f0f2f4; }
.nclex-split .nclex-stem { padding: 16px 20px; }

/* passages (highlight / cloze / fill) */
.nclex-passage { background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; padding: 18px 22px; margin: 0 0 20px; }
.nclex-passage p:last-child { margin-bottom: 0; }
.nclex-hl { cursor: pointer; border-radius: 3px; padding: 1px 2px; box-shadow: inset 0 -2px 0 #c7d2fe; }
.nclex-hl:hover { background: #eef2ff; }
.nclex-hl.is-selected { background: #ffe66d; box-shadow: none; }
.nclex-highlight.is-locked .nclex-hl { cursor: default; }
.nclex-hl.is-correct { background: #b7ebc3; }
.nclex-hl.is-incorrect { background: #f8b4b4; text-decoration: line-through; }
.nclex-hl.is-missed { background: transparent; box-shadow: inset 0 -3px 0 #43b35a; outline: 2px dashed #43b35a; outline-offset: 1px; }

.nclex-blank { display: inline-block; margin: 2px 2px; }
.nclex-blank select { font: inherit; font-size: 16px; padding: 4px 8px; border: 2px solid #1a73e8; border-radius: 6px; background: #fff; max-width: 100%; }
.nclex-blank.is-correct select { border-color: #43b35a; background: #e6f6ea; }
.nclex-blank.is-incorrect select { border-color: #e33b3b; background: #fdeaea; }
.nclex-blank-key { color: #1d7a33; font-weight: 600; margin-left: 6px; }

.nclex-fill { display: flex; align-items: center; gap: 10px; margin: 0 8px 20px; flex-wrap: wrap; }
.nclex-fill-input { font: inherit; font-size: 18px; padding: 10px 14px; border: 2px solid #d9dde2; border-radius: 8px; width: 180px; }
.nclex-fill-input:focus { border-color: #1a73e8; outline: none; }
.nclex-fill.is-correct .nclex-fill-input { border-color: #43b35a; background: #e6f6ea; }
.nclex-fill.is-incorrect .nclex-fill-input { border-color: #e33b3b; background: #fdeaea; }
.nclex-fill-key { color: #1d7a33; font-weight: 600; }

/* matrix */
.nclex-table-wrap { overflow-x: auto; margin: 0 0 20px; }
.nclex-matrix { border-collapse: collapse; width: 100%; font-size: 16px; }
.nclex-matrix th, .nclex-matrix td { border: 1px solid #d9dde2; padding: 10px 12px; }
.nclex-matrix th { background: #f0f2f4; text-align: center; font-size: 15px; }
.nclex-matrix th:first-child { text-align: left; }
.nclex-matrix-cell { text-align: center; }
.nclex-matrix-cell label { display: block; cursor: pointer; }
.nclex-matrix-cell input { width: 20px; height: 20px; accent-color: #1a73e8; cursor: pointer; }
.nclex-matrix-cell.is-correct { background: #e6f6ea; }
.nclex-matrix-cell.is-incorrect { background: #fdeaea; }
.nclex-matrix-cell.is-missed { background: #fff; box-shadow: inset 0 0 0 2px #43b35a; }

/* ordering */
.nclex-ordering { list-style: none; counter-reset: ord; margin: 0 8px 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nclex-ordering li { counter-increment: ord; display: flex; align-items: center; gap: 12px; background: #f0f2f4; border: 2px solid #f0f2f4; border-radius: 10px; padding: 12px 16px; cursor: grab; }
.nclex-ordering li::before { content: counter(ord); font-weight: 700; color: #6b7280; min-width: 20px; }
.nclex-ordering li.is-dragging { opacity: .4; }
.nclex-ordering .nclex-handle { color: #9ca3af; user-select: none; }
.nclex-order-text { flex: 1; }
.nclex-order-btns button { font: inherit; font-size: 12px; background: #fff; border: 1px solid #d9dde2; border-radius: 4px; padding: 4px 8px; cursor: pointer; margin-left: 4px; }
.nclex-ordering.is-locked li { cursor: default; }
.nclex-ordering li.is-correct { background: #e6f6ea; border-color: #43b35a; }
.nclex-ordering li.is-incorrect { background: #fdeaea; border-color: #e33b3b; }
.nclex-order-key { font-size: 14px; color: #b42323; white-space: nowrap; }

/* bowtie */
.nclex-bowtie { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 0 0 20px; align-items: start; }
.nclex-bt-head { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: #4b5563; text-align: center; margin-bottom: 8px; }
.nclex-bt-condition { padding-top: 46px; }
.nclex-bt-slot { min-height: 64px; border: 2px dashed #9ca3af; border-radius: 10px; background: #fff; padding: 10px 12px; margin-bottom: 10px; font-size: 15px; color: #9ca3af; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.nclex-bt-slot.is-filled { border-style: solid; border-color: #1a73e8; background: #e8f1fd; color: #1f2933; }
.nclex-bt-slot.is-target { border-color: #d9972c; background: #fffbea; }
.nclex-bt-slot.is-over { background: #fff4d6; }
.nclex-bt-slot.is-correct { border-color: #43b35a; background: #e6f6ea; color: #1f2933; }
.nclex-bt-slot.is-incorrect { border-color: #e33b3b; background: #fdeaea; color: #1f2933; }
.nclex-bt-bank { margin-top: 14px; border-top: 1px solid #e3e6ea; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.nclex-bt-chip { background: #f0f2f4; border: 1px solid #d9dde2; border-radius: 8px; padding: 8px 10px; font-size: 14.5px; cursor: grab; }
.nclex-bt-chip.is-used { opacity: .35; cursor: default; }
.nclex-bt-chip.is-active { border-color: #d9972c; background: #fffbea; }
.nclex-bt-chip.is-key { border-color: #43b35a; background: #e6f6ea; opacity: 1; }
.nclex-bt-condition .nclex-bt-slot { min-height: 72px; }

@media (max-width: 760px) {
	.nclex-split { grid-template-columns: 1fr; }
	.nclex-tab-pane { max-height: 50vh; }
	.nclex-bowtie { grid-template-columns: 1fr; }
	.nclex-bt-condition { padding-top: 0; order: -1; }
}

.nclex-split.is-wide-item { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 900px) { .nclex-split.is-wide-item { grid-template-columns: 1fr; } }
.nclex-bowtie { grid-template-columns: 1.1fr 1fr 1.1fr; }
