/**
 * Notesmedia Study Cards - frontend styles.
 *
 * All selectors are prefixed .nm-sc- to avoid collisions with Blocksy /
 * Greenshift. Uses CSS custom properties so themes can retheme easily.
 */

.nm-sc-card {
	--nm-sc-fg: #1f2733;
	--nm-sc-muted: #6b7480;
	--nm-sc-border: #e3e7ec;
	--nm-sc-bg: #ffffff;
	--nm-sc-accent: #2563eb;
	--nm-sc-chip-bg: #f1f4f8;
	--nm-sc-radius: 10px;

	color: var(--nm-sc-fg);
	background: var(--nm-sc-bg);
	border: 1px solid var(--nm-sc-border);
	border-radius: var(--nm-sc-radius);
	padding: 1.25rem 1.4rem;
	line-height: 1.55;
	font-size: 1rem;
	max-width: 100%;
	box-sizing: border-box;
}

.nm-sc-card * {
	box-sizing: border-box;
}

.nm-sc-card-header {
	margin: 0 0 .5rem;
}

.nm-sc-title {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.25;
}

/* Chips */
.nm-sc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin: .35rem 0;
}

.nm-sc-chip {
	display: inline-block;
	padding: .18rem .6rem;
	font-size: .8125rem;
	line-height: 1.4;
	background: var(--nm-sc-chip-bg);
	color: var(--nm-sc-fg);
	border: 1px solid var(--nm-sc-border);
	border-radius: 999px;
	text-decoration: none;
}

a.nm-sc-chip:hover,
a.nm-sc-chip:focus {
	border-color: var(--nm-sc-accent);
	color: var(--nm-sc-accent);
}

.nm-sc-meta-chips {
	margin-bottom: .9rem;
}

.nm-sc-priority-high {
	/* v1.6.0: amber "high-yield", not red — matches the library/queue and the
	   product rule that high priority must never read as an error/danger. */
	background: #fff2e4;
	border-color: #f0c089;
	color: #9a5412;
}

.nm-sc-priority-medium {
	background: #fff6e6;
	border-color: #f2d091;
	color: #8a5a00;
}

.nm-sc-priority-optional {
	background: #eef5ee;
	border-color: #bcd8bc;
	color: #2f6b34;
}

.nm-sc-trigger-link {
	border-style: dashed;
}

/* Sections */
.nm-sc-section {
	margin: 1.1rem 0 0;
	padding-top: .9rem;
	border-top: 1px solid var(--nm-sc-border);
}

.nm-sc-section:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.nm-sc-section-title {
	margin: 0 0 .5rem;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: .01em;
}

/* Bullet lists */
.nm-sc-list,
.nm-sc-sublist {
	margin: 0;
	padding-left: 1.25rem;
}

.nm-sc-list > li {
	margin: .2rem 0;
}

.nm-sc-sublist {
	margin: .2rem 0 .35rem;
	list-style: circle;
}

/* Diagram */
.nm-sc-diagram {
	margin: .5rem 0 1rem;
}

.nm-sc-diagram-img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

/* Audio */
.nm-sc-audio {
	margin: .75rem 0 1rem;
	padding: .65rem .8rem;
	background: var(--nm-sc-chip-bg);
	border: 1px solid var(--nm-sc-border);
	border-radius: 8px;
}

.nm-sc-audio-label {
	font-weight: 700;
	font-size: .9rem;
}

.nm-sc-audio-meta {
	color: var(--nm-sc-muted);
	font-size: .85rem;
}

.nm-sc-muted {
	color: var(--nm-sc-muted);
	font-size: .875rem;
}

/* ------------------------------------------------------------------ */
/* Audio Card Player (section-synchronised)                            */
/* ------------------------------------------------------------------ */
.nm-sc-audio-player {
	margin: .75rem 0 1.1rem;
	padding: .85rem 1rem;
	background: var(--nm-sc-chip-bg);
	border: 1px solid var(--nm-sc-border);
	border-radius: 12px;
}

.nm-sc-audio-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: .6rem;
}

.nm-sc-audio-heading {
	font-weight: 700;
	font-size: .95rem;
	letter-spacing: .01em;
}

.nm-sc-audio-active {
	color: var(--nm-sc-accent);
	font-size: .85rem;
	font-weight: 600;
	text-align: right;
}

/* Progressive enhancement: custom transport + chips are hidden until JS marks
   the player as enhanced; the native <audio> is the no-JS fallback. */
.nm-sc-audio-controls,
.nm-sc-audio-player .nm-sc-cue-chips,
.nm-sc-audio-active {
	display: none;
}

.nm-sc-audio-player.is-enhanced .nm-sc-audio-controls {
	display: flex;
}

.nm-sc-audio-player.is-enhanced .nm-sc-cue-chips {
	display: flex;
}

.nm-sc-audio-player.is-enhanced .nm-sc-audio-active {
	display: inline;
}

.nm-sc-audio-player.is-enhanced .nm-sc-audio-el {
	display: none;
}

.nm-sc-audio-el {
	display: block;
	width: 100%;
	margin-top: .25rem;
}

.nm-sc-audio-controls {
	align-items: center;
	gap: .7rem;
}

.nm-sc-audio-btn {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: var(--nm-sc-accent);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.nm-sc-audio-btn:focus-visible {
	outline: 2px solid var(--nm-sc-accent);
	outline-offset: 2px;
}

/* Play / pause icon drawn from a single element (no image dependency). */
.nm-sc-audio-icon {
	display: inline-block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 8px 0 8px 13px;
	border-color: transparent transparent transparent #fff;
	margin-left: 2px;
}

.nm-sc-audio-player.is-playing .nm-sc-audio-icon {
	width: 12px;
	height: 14px;
	border: 0;
	margin-left: 0;
	background: linear-gradient(to right, #fff 0 33%, transparent 33% 66%, #fff 66% 100%);
}

.nm-sc-audio-progress {
	flex: 1 1 auto;
	height: 8px;
	background: var(--nm-sc-border);
	border-radius: 999px;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.nm-sc-audio-progress:focus-visible {
	outline: 2px solid var(--nm-sc-accent);
	outline-offset: 2px;
}

.nm-sc-audio-progress-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: var(--nm-sc-accent);
	border-radius: 999px;
}

.nm-sc-audio-time {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
	font-size: .8125rem;
	color: var(--nm-sc-muted);
	white-space: nowrap;
}

.nm-sc-cue-chips {
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: .7rem;
}

.nm-sc-cue-chip {
	border: 1px solid var(--nm-sc-border);
	background: #fff;
	color: var(--nm-sc-fg);
	border-radius: 999px;
	padding: .2rem .65rem;
	font-size: .8125rem;
	cursor: pointer;
	line-height: 1.4;
}

.nm-sc-cue-chip:hover,
.nm-sc-cue-chip:focus-visible {
	border-color: var(--nm-sc-accent);
	color: var(--nm-sc-accent);
}

.nm-sc-cue-chip.is-active {
	background: var(--nm-sc-accent);
	border-color: var(--nm-sc-accent);
	color: #fff;
}

.nm-sc-audio-player .nm-sc-audio-meta {
	margin: .6rem 0 0;
}

/* Active section highlight while the matching cue plays. */
.nm-sc-section.is-active {
	position: relative;
	background: rgba(37, 99, 235, .06);
	border-radius: 8px;
	box-shadow: inset 3px 0 0 0 var(--nm-sc-accent);
	padding-left: .85rem;
	transition: background-color .25s ease;
}

@media (prefers-reduced-motion: reduce) {
	.nm-sc-audio-progress-fill,
	.nm-sc-section.is-active {
		transition: none;
	}
}

/* Must-solve */
.nm-sc-mustsolve-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-sc-mustsolve-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .5rem 0;
	border-bottom: 1px dashed var(--nm-sc-border);
}

.nm-sc-mustsolve-item:last-child {
	border-bottom: 0;
}

.nm-sc-mustsolve-label {
	flex: 1 1 60%;
}

.nm-sc-practice-btn {
	display: inline-block;
	padding: .3rem .75rem;
	font-size: .8125rem;
	border-radius: 6px;
	text-decoration: none;
	border: 1px solid var(--nm-sc-accent);
	color: var(--nm-sc-accent);
	background: transparent;
	white-space: nowrap;
}

a.nm-sc-practice-btn:hover,
a.nm-sc-practice-btn:focus {
	background: var(--nm-sc-accent);
	color: #fff;
}

.nm-sc-practice-placeholder {
	border-color: var(--nm-sc-border);
	color: var(--nm-sc-muted);
	cursor: not-allowed;
}

/* Practice placeholder panel (v1.11.0) — distinct from .nm-sc-practice-placeholder
   above (that class stays scoped to the disabled per-item must-solve button). */
.nm-sc-practice-panel .nm-sc-practice-btn {
	margin: 0;
}

.nm-sc-practice-planned {
	margin: 0;
	padding: .5rem .75rem;
	border: 1px dashed var(--nm-sc-border);
	border-radius: 8px;
	color: var(--nm-sc-muted);
	font-size: .9rem;
}

/* External video */
.nm-sc-video-caption {
	margin: .1rem 0 .5rem;
	font-weight: 600;
}

.nm-sc-video-embed {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	border-radius: 8px;
	overflow: hidden;
	background: #000;
}

.nm-sc-video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.nm-sc-video-note {
	margin-top: .4rem;
	font-style: italic;
}

/* Locked */
.nm-sc-locked {
	text-align: center;
}

.nm-sc-locked-msg {
	margin: 0;
	color: var(--nm-sc-muted);
}

/* List shortcode */
.nm-sc-card-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nm-sc-list-item {
	padding: .5rem 0;
	border-bottom: 1px solid var(--nm-sc-border, #e3e7ec);
}

.nm-sc-list-link {
	font-weight: 600;
	text-decoration: none;
}

.nm-sc-list-meta {
	display: block;
	color: #6b7480;
	font-size: .85rem;
}

/* Grid shortcode */
.nm-sc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.nm-sc-grid-tile {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1rem;
	border: 1px solid #e3e7ec;
	border-radius: 10px;
	text-decoration: none;
	color: #1f2733;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.nm-sc-grid-tile:hover,
.nm-sc-grid-tile:focus {
	border-color: #2563eb;
	box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}

.nm-sc-grid-title {
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
}

.nm-sc-grid-excerpt {
	color: #6b7480;
	font-size: .875rem;
}

/* Audio script (collapsible transcript) */
.nm-sc-details {
	cursor: pointer;
}

.nm-sc-details-summary {
	cursor: pointer;
	user-select: none;
	list-style: none;
}

.nm-sc-details-summary::-webkit-details-marker {
	display: none;
}

.nm-sc-details-summary::before {
	content: '▶ ';
	font-size: .75rem;
	color: var(--nm-sc-muted);
}

.nm-sc-details[open] .nm-sc-details-summary::before {
	content: '▼ ';
}

.nm-sc-audio-script-body {
	margin-top: .6rem;
	padding-top: .6rem;
	border-top: 1px dashed var(--nm-sc-border);
}

.nm-sc-audio-script-body p {
	margin: 0 0 .6rem;
	line-height: 1.6;
	color: var(--nm-sc-muted);
}

@media (max-width: 480px) {
	.nm-sc-card {
		padding: 1rem;
	}
	.nm-sc-mustsolve-item {
		align-items: flex-start;
	}
}

/* ------------------------------------------------------------------ */
/* Study progress controls (v1.2.0)                                    */
/* ------------------------------------------------------------------ */
.nm-sc-progress {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .75rem;
	margin: .25rem 0 1rem;
	padding: .6rem .75rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: 10px;
	background: #fafbfc;
}

.nm-sc-progress-caption {
	font-size: .85rem;
	color: var(--nm-sc-muted, #6b7480);
}

.nm-sc-progress-status-wrap {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
}

.nm-sc-progress-chip {
	display: inline-block;
	padding: .15rem .6rem;
	border-radius: 999px;
	font-size: .8125rem;
	font-weight: 600;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	background: #eef1f5;
	color: #333;
}

/* Subtle, accessible status colours. */
.nm-sc-status-not_started  { background: #eef1f5; color: #4a5361; border-color: #dbe0e7; }
.nm-sc-status-reviewed     { background: #eaf3fb; color: #1f5c99; border-color: #bcd9f2; }
.nm-sc-status-needs_review { background: #fff4e5; color: #8a5a00; border-color: #f2d091; }
.nm-sc-status-mastered     { background: #e9f6ec; color: #2f6b34; border-color: #bcd8bc; }
.nm-sc-status-skipped      { background: #f0f0f0; color: #6b7480; border-color: #ddd; }

.nm-sc-progress-actions {
	display: inline-flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.nm-sc-progress-btn {
	padding: .28rem .7rem;
	font-size: .8125rem;
	border-radius: 6px;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	background: #fff;
	color: var(--nm-sc-fg, #1f2733);
	cursor: pointer;
	line-height: 1.3;
}

.nm-sc-progress-btn:hover,
.nm-sc-progress-btn:focus-visible {
	border-color: var(--nm-sc-accent, #2563eb);
	color: var(--nm-sc-accent, #2563eb);
}

.nm-sc-progress-btn.is-active {
	background: var(--nm-sc-accent, #2563eb);
	border-color: var(--nm-sc-accent, #2563eb);
	color: #fff;
}

.nm-sc-progress.is-busy {
	opacity: .7;
}

.nm-sc-progress-msg {
	font-size: .8rem;
	color: var(--nm-sc-muted, #6b7480);
}

.nm-sc-progress-msg.is-ok { color: #2f6b34; }
.nm-sc-progress-msg.is-error { color: #a01919; }

.nm-sc-progress-guest {
	background: transparent;
	border-style: dashed;
}

.nm-sc-progress-login {
	font-size: .85rem;
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Card Library + Review Queue (v1.2.0)                                */
/* ------------------------------------------------------------------ */
.nm-sc-lib-filters {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	margin-bottom: 1.25rem;
	padding: .85rem;
	border: 1px solid #e3e7ec;
	border-radius: 10px;
	background: #fafbfc;
}

.nm-sc-lib-filter {
	margin: 0;
}

.nm-sc-lib-filters input[type="search"],
.nm-sc-lib-filters select {
	max-width: 100%;
}

.nm-sc-lib-checks {
	display: inline-flex;
	flex-wrap: wrap;
	gap: .5rem .9rem;
	align-items: center;
}

.nm-sc-lib-check {
	font-size: .85rem;
	white-space: nowrap;
}

.nm-sc-lib-actions {
	display: inline-flex;
	gap: .5rem;
	align-items: center;
	margin-left: auto;
}

.nm-sc-lib-apply {
	padding: .35rem .9rem;
	border: 1px solid var(--nm-sc-accent, #2563eb);
	background: var(--nm-sc-accent, #2563eb);
	color: #fff;
	border-radius: 6px;
	cursor: pointer;
}

.nm-sc-lib-reset {
	font-size: .85rem;
	text-decoration: none;
	color: var(--nm-sc-muted, #6b7480);
}

.nm-sc-lib-item .nm-sc-chips {
	margin: .1rem 0;
}

.nm-sc-lib-indicators {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.nm-sc-ind {
	font-size: .72rem;
	font-weight: 600;
	padding: .1rem .5rem;
	border-radius: 4px;
	background: #eef1f5;
	color: #4a5361;
}

.nm-sc-ind-audio { background: #eaf3fb; color: #1f5c99; }
.nm-sc-ind-audio-soon { background: #f4f5f7; color: #8a8f98; }
.nm-sc-ind-practice { background: #f3eefb; color: #5b3a99; }
.nm-sc-ind-diagram { background: #eef7ee; color: #2f6b34; }

.nm-sc-lib-locked {
	opacity: .65;
	cursor: default;
}

.nm-sc-lib-lock {
	font-size: .75rem;
	color: var(--nm-sc-muted, #6b7480);
}

.nm-sc-library-empty {
	padding: 1.5rem;
	text-align: center;
	color: var(--nm-sc-muted, #6b7480);
	border: 1px dashed #e3e7ec;
	border-radius: 10px;
}

.nm-sc-lib-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem;
	justify-content: center;
	margin-top: 1.5rem;
}

.nm-sc-page {
	padding: .3rem .6rem;
	border: 1px solid #e3e7ec;
	border-radius: 6px;
	text-decoration: none;
	color: var(--nm-sc-fg, #1f2733);
	font-size: .85rem;
}

.nm-sc-page.is-current {
	background: var(--nm-sc-accent, #2563eb);
	border-color: var(--nm-sc-accent, #2563eb);
	color: #fff;
}

.nm-sc-page-gap { padding: .3rem .2rem; color: #999; }

.nm-sc-review-queue {
	display: flex;
	flex-direction: column;
	gap: .85rem;
}

.nm-sc-queue-item {
	border: 1px solid #e3e7ec;
	border-radius: 10px;
	padding: .85rem 1rem;
	background: #fff;
	transition: opacity .3s ease, transform .3s ease;
}

.nm-sc-queue-item.is-removing {
	opacity: 0;
	transform: translateY(-6px);
}

.nm-sc-queue-item .nm-sc-lib-title {
	font-weight: 700;
	font-size: 1.05rem;
}

.nm-sc-queue-item .nm-sc-progress {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.nm-sc-lib-actions { margin-left: 0; }
	.nm-sc-progress { gap: .4rem; }
}

/* v1.4.0 — subtle card-type chip */
.nm-sc-chip-type {
	background: #eef1fb;
	border-color: #cdd7f5;
	color: #33408a;
}

/* ================================================================== */
/* v1.4.1 — Study Card UI polish (CSS-only; appended last so source   */
/* order wins over .nm-sc-section:first-of-type and base .nm-sc-section)*/
/* Behaviour, markup and access are unchanged; this is visual only.    */
/* ================================================================== */
.nm-sc-card {
	--nm-sc-hy-bg: #eaf1fe;
	--nm-sc-hy-border: #cfe0fb;
	--nm-sc-hy-rail: #2563eb;
	--nm-sc-trap-bg: #fff6e8;
	--nm-sc-trap-line: #e3a944;
	--nm-sc-trap-ink: #8a5a00;
	--nm-sc-wrong-bg: #fdeee9;
	--nm-sc-wrong-line: #d98a68;
	--nm-sc-wrong-ink: #9c3a1f;
}

/* --- Shared boxed-section shell (high-yield / trap / wrong) --- */
.nm-sc-section[data-nm-sc-section="why-this-matters"],
.nm-sc-section[data-nm-sc-section="remember-3-things"],
.nm-sc-section[data-nm-sc-section="common-traps"],
.nm-sc-section[data-nm-sc-section="common-wrong-answer-patterns"],
.nm-sc-section[data-nm-sc-section="wrong-option-patterns"] {
	margin-top: 1rem;
	padding: .85rem 1rem .9rem;
	border: 1px solid var(--nm-sc-border);
	border-radius: 10px;
	border-top: 0;
}
/* keep the section title flush at the top of a box */
.nm-sc-section[data-nm-sc-section="why-this-matters"] .nm-sc-section-title,
.nm-sc-section[data-nm-sc-section="remember-3-things"] .nm-sc-section-title,
.nm-sc-section[data-nm-sc-section="common-traps"] .nm-sc-section-title,
.nm-sc-section[data-nm-sc-section="common-wrong-answer-patterns"] .nm-sc-section-title,
.nm-sc-section[data-nm-sc-section="wrong-option-patterns"] .nm-sc-section-title {
	margin-top: 0;
}

/* --- High-yield: why this matters + remember 3 things --- */
.nm-sc-section[data-nm-sc-section="why-this-matters"],
.nm-sc-section[data-nm-sc-section="remember-3-things"] {
	background: var(--nm-sc-hy-bg);
	border-color: var(--nm-sc-hy-border);
	border-left: 3px solid var(--nm-sc-hy-rail);
}
/* ★ on Remember 3 Things only */
.nm-sc-section[data-nm-sc-section="remember-3-things"] .nm-sc-section-title::before {
	content: "\2605\00a0";
	color: var(--nm-sc-hy-rail);
}

/* --- Common traps (amber, cautionary not alarming) --- */
.nm-sc-section[data-nm-sc-section="common-traps"] {
	background: var(--nm-sc-trap-bg);
	border-color: var(--nm-sc-trap-line);
	border-left: 3px solid var(--nm-sc-trap-line);
}
.nm-sc-section[data-nm-sc-section="common-traps"] .nm-sc-section-title {
	color: var(--nm-sc-trap-ink);
}
.nm-sc-section[data-nm-sc-section="common-traps"] .nm-sc-section-title::before {
	content: "\26a0\00a0";
}

/* --- Wrong-answer patterns (distinct terracotta; not an error red) --- */
.nm-sc-section[data-nm-sc-section="common-wrong-answer-patterns"],
.nm-sc-section[data-nm-sc-section="wrong-option-patterns"] {
	background: var(--nm-sc-wrong-bg);
	border-color: var(--nm-sc-wrong-line);
	border-left: 3px solid var(--nm-sc-wrong-line);
}
.nm-sc-section[data-nm-sc-section="common-wrong-answer-patterns"] .nm-sc-section-title,
.nm-sc-section[data-nm-sc-section="wrong-option-patterns"] .nm-sc-section-title {
	color: var(--nm-sc-wrong-ink);
}

/* --- Formula block (monospace, boxed lines) --- */
.nm-sc-section[data-nm-sc-section="formula"] .nm-sc-list {
	list-style: none;
	padding-left: 0;
}
.nm-sc-section[data-nm-sc-section="formula"] .nm-sc-list > li {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: .98rem;
	background: #f7f9fc;
	border: 1px solid #dde5f0;
	border-radius: 8px;
	padding: .4rem .6rem;
	margin: .28rem 0;
	max-width: 100%;
	overflow-x: auto;          /* long formulae scroll only when necessary */
}

/* --- Exam-style clue words (chip cloud from the existing <ul>) --- */
.nm-sc-section[data-nm-sc-section="exam-style-clue-words"] .nm-sc-list {
	list-style: none;
	padding-left: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}
.nm-sc-section[data-nm-sc-section="exam-style-clue-words"] .nm-sc-list > li {
	margin: 0;
	background: #eef2f7;
	border: 1px solid #dbe1ea;
	color: #3d4657;
	border-radius: 999px;
	padding: .16rem .55rem;
	font-size: .82rem;
	line-height: 1.4;
}

/* --- Sequence steps (numbered process style) --- */
.nm-sc-section[data-nm-sc-section="sequence-steps"] .nm-sc-list {
	list-style: none;
	padding-left: 0;
	counter-reset: nm-sc-step;
}
.nm-sc-section[data-nm-sc-section="sequence-steps"] .nm-sc-list > li {
	position: relative;
	padding-left: 2.1rem;
	margin: .35rem 0;
	counter-increment: nm-sc-step;
	min-height: 1.5rem;
}
.nm-sc-section[data-nm-sc-section="sequence-steps"] .nm-sc-list > li::before {
	content: counter(nm-sc-step);
	position: absolute;
	left: 0;
	top: .05rem;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--nm-sc-hy-bg, #eaf1fe);
	color: #1c4fd8;
	font-size: .78rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* nested sub-steps keep the normal circle list, no numbering */
.nm-sc-section[data-nm-sc-section="sequence-steps"] .nm-sc-sublist { counter-reset: none; }
.nm-sc-section[data-nm-sc-section="sequence-steps"] .nm-sc-sublist > li { padding-left: 0; }
.nm-sc-section[data-nm-sc-section="sequence-steps"] .nm-sc-sublist > li::before { content: none; }

/* --- Mobile: wrapping + no horizontal overflow (verified @375px) --- */
@media (max-width: 560px) {
	.nm-sc-card { overflow-wrap: anywhere; }
	.nm-sc-chips { gap: .35rem; }
	.nm-sc-progress-actions { flex-wrap: wrap; }
	.nm-sc-progress-btn { min-height: 40px; }
	.nm-sc-cue-chips { gap: .35rem; }
	.nm-sc-audio-time { font-size: .78rem; }
}
@media (max-width: 380px) {
	/* keep the audio player compact on very small screens */
	.nm-sc-audio-time { display: none; }
}

/* ================================================================== */
/* v1.5.1 — Card Library UI polish (CSS-first; appended last so source */
/* order wins ties with the earlier v1.2.0 library rules).             */
/*                                                                     */
/* Everything below is scoped under .nm-sc-library so it never leaks   */
/* onto the single Study Card page or bare theme elements. No new      */
/* colours are invented — it reuses the existing token palette.        */
/* High priority is intentionally NOT red inside the library.          */
/* ================================================================== */
.nm-sc-library {
	--nm-sc-lib-panel-bg: #fafbfc;
	--nm-sc-lib-panel-border: var(--nm-sc-border, #e3e7ec);
	--nm-sc-lib-focus: var(--nm-sc-accent, #2563eb);
	--nm-sc-lib-control-h: 40px;           /* minimum tap-target height */
	--nm-sc-lib-radius: 8px;
	/* Non-red "high priority": urgent amber, distinct from medium. */
	--nm-sc-lib-high-bg: #fff2e4;
	--nm-sc-lib-high-border: #f0c089;
	--nm-sc-lib-high-fg: #9a5412;
	color: var(--nm-sc-fg, #1f2733);
}

/* --- Filter panel ------------------------------------------------- */
.nm-sc-library .nm-sc-lib-filters {
	gap: .6rem .75rem;
	padding: .9rem 1rem;
	border-color: var(--nm-sc-lib-panel-border);
	border-radius: var(--nm-sc-radius, 10px);
	background: var(--nm-sc-lib-panel-bg);
}

/* Search: the primary control — give it room and a subtle magnifier. */
.nm-sc-library .nm-sc-lib-search {
	position: relative;
	flex: 1 1 220px;
	min-width: 180px;
}
.nm-sc-library .nm-sc-lib-search input[type="search"] {
	width: 100%;
	min-height: var(--nm-sc-lib-control-h);
	padding: .4rem .7rem .4rem 2rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-lib-radius);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: .55rem center;
	background-size: 15px 15px;
	font-size: .9rem;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-library .nm-sc-lib-search input[type="search"]::placeholder {
	color: var(--nm-sc-muted, #6b7480);
}

/* Selects: consistent height, custom chevron, accent focus ring. */
.nm-sc-library .nm-sc-lib-filter select {
	min-height: var(--nm-sc-lib-control-h);
	max-width: 100%;
	padding: .4rem 2rem .4rem .7rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-lib-radius);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7480' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .55rem center;
	background-size: 14px 14px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	font-size: .9rem;
	color: var(--nm-sc-fg, #1f2733);
	cursor: pointer;
}

/* One shared, high-contrast focus ring for every panel control. */
.nm-sc-library .nm-sc-lib-search input[type="search"]:focus,
.nm-sc-library .nm-sc-lib-filter select:focus,
.nm-sc-library .nm-sc-lib-apply:focus-visible,
.nm-sc-library .nm-sc-lib-reset:focus-visible {
	outline: 2px solid var(--nm-sc-lib-focus);
	outline-offset: 1px;
	border-color: var(--nm-sc-lib-focus);
}

/* Checkbox filters: comfortable hit area, aligned. */
.nm-sc-library .nm-sc-lib-checks {
	gap: .4rem .9rem;
}
.nm-sc-library .nm-sc-lib-check {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	min-height: var(--nm-sc-lib-control-h);
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-library .nm-sc-lib-check input {
	width: 16px;
	height: 16px;
	accent-color: var(--nm-sc-accent, #2563eb);
}

/* Apply (primary) + Reset (secondary) buttons. */
.nm-sc-library .nm-sc-lib-apply {
	min-height: var(--nm-sc-lib-control-h);
	padding: .4rem 1.1rem;
	border-radius: var(--nm-sc-lib-radius);
	font-weight: 600;
	transition: background-color .15s ease, box-shadow .15s ease;
}
.nm-sc-library .nm-sc-lib-apply:hover {
	box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
.nm-sc-library .nm-sc-lib-reset {
	display: inline-flex;
	align-items: center;
	min-height: var(--nm-sc-lib-control-h);
	padding: .4rem .8rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-lib-radius);
	background: #fff;
	transition: border-color .15s ease, color .15s ease;
}
.nm-sc-library .nm-sc-lib-reset:hover {
	border-color: var(--nm-sc-accent, #2563eb);
	color: var(--nm-sc-accent, #2563eb);
}

/* --- Card grid + items -------------------------------------------- */
.nm-sc-library .nm-sc-library-grid {
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1rem;
}
.nm-sc-library .nm-sc-lib-item {
	position: relative;
	height: 100%;
	gap: .55rem;
}
/* Push the status chip to the bottom so cards in a row line up. */
.nm-sc-library .nm-sc-lib-item .nm-sc-grid-excerpt {
	margin-bottom: .1rem;
}
.nm-sc-library .nm-sc-lib-item .nm-sc-progress-chip {
	align-self: flex-start;
	margin-top: auto;
}
/* Clear keyboard focus ring on the whole card link. */
.nm-sc-library .nm-sc-lib-item:focus-visible {
	outline: 2px solid var(--nm-sc-lib-focus);
	outline-offset: 2px;
}

/* Locked stub: unmistakably inert, with a small lock glyph. */
.nm-sc-library .nm-sc-lib-locked {
	background: #fafbfc;
	border-style: dashed;
}
.nm-sc-library .nm-sc-lib-lock::before {
	content: '\01F512'; /* lock */
	margin-right: .3rem;
	font-size: .8rem;
}

/* --- Chips inside items ------------------------------------------- */
.nm-sc-library .nm-sc-lib-item .nm-sc-chips {
	gap: .35rem;
}
/* High priority WITHOUT red — urgent amber + heavier weight so the
   signal is not carried by colour alone (the label text also says so). */
.nm-sc-library .nm-sc-priority-high {
	background: var(--nm-sc-lib-high-bg);
	border-color: var(--nm-sc-lib-high-border);
	color: var(--nm-sc-lib-high-fg);
	font-weight: 700;
}

/* --- Indicators (audio / practice / diagram) ---------------------- */
.nm-sc-library .nm-sc-lib-indicators {
	gap: .35rem;
}
.nm-sc-library .nm-sc-ind {
	line-height: 1.5;
}

/* --- Empty state -------------------------------------------------- */
.nm-sc-library .nm-sc-library-empty {
	padding: 2rem 1.5rem;
	font-size: .95rem;
	background: #fafbfc;
}

/* --- Pagination --------------------------------------------------- */
.nm-sc-library .nm-sc-lib-pagination {
	gap: .35rem;
	margin-top: 1.75rem;
}
.nm-sc-library .nm-sc-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--nm-sc-lib-control-h);
	min-height: var(--nm-sc-lib-control-h);
	padding: .3rem .7rem;
	border-radius: var(--nm-sc-lib-radius);
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.nm-sc-library a.nm-sc-page:hover {
	border-color: var(--nm-sc-accent, #2563eb);
	color: var(--nm-sc-accent, #2563eb);
}
.nm-sc-library a.nm-sc-page:focus-visible {
	outline: 2px solid var(--nm-sc-lib-focus);
	outline-offset: 1px;
}

/* --- Responsive --------------------------------------------------- */
@media (max-width: 720px) {
	.nm-sc-library .nm-sc-library-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}
}
@media (max-width: 560px) {
	/* Stack the filter panel: each control on its own full-width row. */
	.nm-sc-library .nm-sc-lib-filters {
		flex-direction: column;
		align-items: stretch;
	}
	.nm-sc-library .nm-sc-lib-search,
	.nm-sc-library .nm-sc-lib-filter,
	.nm-sc-library .nm-sc-lib-filter select {
		width: 100%;
		max-width: none;
	}
	/* In the column layout the main axis is vertical, so the search's
	   flex-grow (set for the horizontal row) must be cancelled or the
	   wrapper stretches to fill the panel height. */
	.nm-sc-library .nm-sc-lib-search {
		flex: 0 0 auto;
	}
	.nm-sc-library .nm-sc-lib-actions {
		margin-left: 0;
		justify-content: flex-start;
	}
}
@media (max-width: 380px) {
	/* Single column; let long titles/chips wrap rather than overflow. */
	.nm-sc-library .nm-sc-library-grid {
		grid-template-columns: 1fr;
	}
	.nm-sc-library .nm-sc-lib-item {
		overflow-wrap: anywhere;
	}
	.nm-sc-library .nm-sc-lib-item .nm-sc-chips {
		gap: .3rem;
	}
}

/* --- Reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.nm-sc-library .nm-sc-lib-item,
	.nm-sc-library .nm-sc-lib-apply,
	.nm-sc-library .nm-sc-lib-reset,
	.nm-sc-library .nm-sc-page {
		transition: none;
	}
}

/* ================================================================== */
/* v1.5.2 — Review Queue UI polish (CSS-first; appended last).         */
/*                                                                     */
/* Scoped under .nm-sc-review-queue. A calm "return to study" surface  */
/* — no gamification, streaks, or due dates. High priority is amber,   */
/* never red (mirrors the library). Reuses existing chip/indicator/    */
/* progress styling; only queue-specific structure is added here.      */
/* ================================================================== */
.nm-sc-review-queue {
	--nm-sc-rq-focus: var(--nm-sc-accent, #2563eb);
	--nm-sc-rq-control-h: 40px;              /* minimum tap-target height */
	/* Non-red "high priority" (matches the library treatment). */
	--nm-sc-rq-high-bg: #fff2e4;
	--nm-sc-rq-high-border: #f0c089;
	--nm-sc-rq-high-fg: #9a5412;
	gap: .75rem;
}

/* Optional intro line above the queue. */
.nm-sc-review-queue .nm-sc-queue-intro {
	margin: 0 0 .25rem;
	color: var(--nm-sc-muted, #6b7480);
	font-size: .95rem;
}

/* Queue item card. */
.nm-sc-review-queue .nm-sc-queue-item {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: .9rem 1rem;
	border-radius: var(--nm-sc-radius, 10px);
}
.nm-sc-review-queue .nm-sc-queue-item:hover {
	border-color: var(--nm-sc-accent, #2563eb);
	box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}
/* Gentle indication of the active card (no outline — controls have
   their own focus rings, so an extra outline here would double up). */
.nm-sc-review-queue .nm-sc-queue-item:focus-within {
	border-color: var(--nm-sc-accent, #2563eb);
}

/* Title link. */
.nm-sc-review-queue .nm-sc-lib-link {
	text-decoration: none;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-review-queue .nm-sc-lib-link:hover .nm-sc-lib-title,
.nm-sc-review-queue .nm-sc-lib-link:focus-visible .nm-sc-lib-title {
	color: var(--nm-sc-accent, #2563eb);
}
.nm-sc-review-queue .nm-sc-queue-item .nm-sc-lib-title {
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
}

/* Chips + indicators spacing. */
.nm-sc-review-queue .nm-sc-chips,
.nm-sc-review-queue .nm-sc-lib-indicators {
	gap: .35rem;
}

/* High priority WITHOUT red. */
.nm-sc-review-queue .nm-sc-priority-high {
	background: var(--nm-sc-rq-high-bg);
	border-color: var(--nm-sc-rq-high-border);
	color: var(--nm-sc-rq-high-fg);
	font-weight: 700;
}

/* Progress controls sit tight to the card. */
.nm-sc-review-queue .nm-sc-queue-item .nm-sc-progress {
	margin: 0;
}

/* Open-card CTA. */
.nm-sc-review-queue .nm-sc-queue-open {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	min-height: var(--nm-sc-rq-control-h);
	font-weight: 600;
	font-size: .9rem;
	text-decoration: none;
	color: var(--nm-sc-accent, #2563eb);
}
.nm-sc-review-queue .nm-sc-queue-open:hover {
	text-decoration: underline;
}
.nm-sc-review-queue .nm-sc-queue-open:focus-visible {
	outline: 2px solid var(--nm-sc-rq-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Empty state + "Browse the Card Library" link. */
.nm-sc-review-queue .nm-sc-queue-empty {
	background: #fafbfc;
}
.nm-sc-review-queue .nm-sc-queue-empty-msg {
	margin: 0 0 .5rem;
}
.nm-sc-review-queue .nm-sc-queue-browse {
	display: inline-flex;
	align-items: center;
	min-height: var(--nm-sc-rq-control-h);
	padding: .35rem .9rem;
	border: 1px solid var(--nm-sc-accent, #2563eb);
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	color: var(--nm-sc-accent, #2563eb);
}
.nm-sc-review-queue .nm-sc-queue-browse:hover {
	background: var(--nm-sc-accent, #2563eb);
	color: #fff;
}
.nm-sc-review-queue .nm-sc-queue-browse:focus-visible {
	outline: 2px solid var(--nm-sc-rq-focus);
	outline-offset: 2px;
}

/* Footer "back to library" link below a populated queue. */
.nm-sc-review-queue .nm-sc-queue-footer {
	margin: .35rem 0 0;
}

/* Mobile: single column, wrapping, comfortable targets, no overflow. */
@media (max-width: 560px) {
	.nm-sc-review-queue .nm-sc-queue-item {
		overflow-wrap: anywhere;
	}
}

/* Respect reduced motion (queue items animate out when marked done). */
@media (prefers-reduced-motion: reduce) {
	.nm-sc-review-queue .nm-sc-queue-item {
		transition: none;
	}
}

/* ================================================================== */
/* v1.5.3 — Library results count + active-filter summary (appended).  */
/*                                                                     */
/* A quiet status line between the filter panel and the card grid:     */
/* "Showing N of M cards", the active-filter chips, and a Reset link.   */
/* Scoped under .nm-sc-library. Read-only — no query/AJAX behaviour.    */
/* ================================================================== */
.nm-sc-library .nm-sc-lib-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .6rem;
	margin: 0 0 1rem;
	font-size: .9rem;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-library .nm-sc-lib-count {
	font-weight: 600;
	color: var(--nm-sc-fg, #1f2733);
}

/* Active-filter chip cluster. */
.nm-sc-library .nm-sc-lib-active {
	display: inline-flex;
	flex-wrap: wrap;
	gap: .35rem;
}
.nm-sc-library .nm-sc-lib-active-chip {
	display: inline-flex;
	align-items: center;
	padding: .1rem .55rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: 999px;
	background: var(--nm-sc-library-muted, #f7f9fc);
	color: var(--nm-sc-fg, #1f2733);
	font-size: .82rem;
	line-height: 1.5;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Shortcode-locked filters read as context, not something to clear. */
.nm-sc-library .nm-sc-lib-active-chip.is-locked {
	background: transparent;
	color: var(--nm-sc-muted, #6b7480);
	border-style: dashed;
}

/* Reset link — pushed to the end on wide rows, wraps under on mobile. */
.nm-sc-library .nm-sc-lib-summary-reset {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 .4rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--nm-sc-accent, #2563eb);
	white-space: nowrap;
}
.nm-sc-library .nm-sc-lib-summary-reset:hover {
	text-decoration: underline;
}
.nm-sc-library .nm-sc-lib-summary-reset:focus-visible {
	outline: 2px solid var(--nm-sc-accent, #2563eb);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (max-width: 560px) {
	.nm-sc-library .nm-sc-lib-summary {
		gap: .5rem;
	}
	/* Give the reset link a comfortable tap target and its own row. */
	.nm-sc-library .nm-sc-lib-summary-reset {
		margin-left: 0;
		min-height: 40px;
		flex-basis: 100%;
	}
	.nm-sc-library .nm-sc-lib-active-chip {
		white-space: normal;
	}
}

/* ================================================================== */
/* v1.6.0 — Access adapter: locked title-stub (appended last).         */
/*                                                                     */
/* The card-detail locked panel and the library locked tile show only  */
/* safe metadata (title, chips, "audio available") plus upgrade/login  */
/* CTAs. Calm and clearly interactive — never "broken". Neutral/amber  */
/* palette; no red. Content gating is enforced server-side.            */
/* ================================================================== */
.nm-sc-locked-stub {
	text-align: left;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-radius, 10px);
	background: var(--nm-sc-library-muted, #f7f9fc);
	padding: 1.1rem 1.25rem;
}
.nm-sc-locked-badge {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .12rem .55rem;
	border-radius: 999px;
	background: #fff2e4;                 /* amber — "locked", never red */
	color: #9a5412;
	border: 1px solid #f0c089;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .02em;
}
.nm-sc-locked-badge::before {
	content: "\1F512";                   /* padlock glyph (decorative) */
	font-size: .85em;
}
.nm-sc-locked-title {
	margin: .55rem 0 .5rem;
	font-size: 1.25rem;
	line-height: 1.3;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-locked-stub .nm-sc-meta-chips {
	margin: 0 0 .5rem;
}
.nm-sc-locked-indicators {
	margin: 0 0 .6rem;
}
.nm-sc-locked-msg {
	margin: 0 0 .9rem;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-locked-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin: 0;
}
.nm-sc-locked-cta,
.nm-sc-lib-lock-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: .35rem 1rem;
	border-radius: 8px;
	background: var(--nm-sc-accent, #2563eb);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.nm-sc-locked-cta:hover,
.nm-sc-lib-lock-cta:hover {
	filter: brightness(0.94);
}
.nm-sc-locked-login {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: .35rem .5rem;
	color: var(--nm-sc-accent, #2563eb);
	font-weight: 600;
	text-decoration: none;
}
.nm-sc-locked-login:hover {
	text-decoration: underline;
}
.nm-sc-locked-cta:focus-visible,
.nm-sc-locked-login:focus-visible,
.nm-sc-lib-lock-cta:focus-visible {
	outline: 2px solid var(--nm-sc-accent, #2563eb);
	outline-offset: 2px;
}

/* Library locked tile: keep the lock label muted; CTA compact. */
.nm-sc-library .nm-sc-lib-lock-cta {
	margin-top: .5rem;
	min-height: 36px;
	padding: .25rem .8rem;
	font-size: .85rem;
}

@media (max-width: 560px) {
	.nm-sc-locked-actions {
		gap: .5rem;
	}
	.nm-sc-locked-cta {
		flex: 1 1 auto;                  /* full-width primary CTA on mobile */
	}
}

/* ================================================================== */
/* v1.8.0 — Study Dashboard (appended last).                           */
/*                                                                     */
/* Calm, WordPress-native widget grid. Reuses chip/indicator/status    */
/* tokens. High priority stays amber (global). Access-aware card chips  */
/* show safe metadata only. Mobile: single column, no overflow.        */
/* ================================================================== */
.nm-sc-dashboard {
	--nm-sc-dash-accent: var(--nm-sc-accent, #2563eb);
	max-width: 1040px;
}
.nm-sc-dash-plan {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem;
	padding: .75rem 1rem;
	margin: 0 0 1rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-radius, 10px);
	background: var(--nm-sc-library-muted, #f7f9fc);
	font-size: .95rem;
}
.nm-sc-dash-plan-line {
	font-weight: 600;
	color: var(--nm-sc-fg, #1f2733);
}

/* Responsive widget grid. */
.nm-sc-dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
}
.nm-sc-dash-widget {
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-radius, 10px);
	background: #fff;
	padding: 1rem 1.1rem;
}
.nm-sc-dash-title {
	margin: 0 0 .7rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-dash-lead {
	margin: 0 0 .7rem;
	color: var(--nm-sc-muted, #6b7480);
	font-size: .92rem;
}
.nm-sc-dash-empty {
	margin: 0;
	color: var(--nm-sc-muted, #6b7480);
	font-size: .92rem;
}

/* Card chips inside widgets. */
.nm-sc-dash-cards {
	display: flex;
	flex-direction: column;
	gap: .55rem;
}
.nm-sc-dash-card {
	display: block;
	padding: .6rem .7rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	color: var(--nm-sc-fg, #1f2733);
}
a.nm-sc-dash-card:hover {
	border-color: var(--nm-sc-dash-accent);
	box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}
a.nm-sc-dash-card:focus-visible {
	outline: 2px solid var(--nm-sc-dash-accent);
	outline-offset: 2px;
}
.nm-sc-dash-card-locked {
	background: var(--nm-sc-library-muted, #f7f9fc);
	border-style: dashed;
}
.nm-sc-dash-card-title {
	display: block;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: .3rem;
}
.nm-sc-dash-card .nm-sc-chips {
	gap: .3rem;
	margin-bottom: .25rem;
}
.nm-sc-dash-card-meta {
	display: inline-flex;
	flex-wrap: wrap;
	gap: .3rem;
	align-items: center;
}

/* Progress stat pills. */
.nm-sc-dash-stats {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}
.nm-sc-dash-stat {
	display: inline-flex;
	align-items: baseline;
	gap: .25rem;
	padding: .25rem .6rem;
	border-radius: 999px;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	background: var(--nm-sc-library-muted, #f7f9fc);
	font-size: .82rem;
}
.nm-sc-dash-stat strong {
	font-size: 1rem;
}

/* CTAs. */
.nm-sc-dash-ctas {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
}
.nm-sc-dash-cta,
.nm-sc-dash-more {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: .35rem 1rem;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	background: var(--nm-sc-dash-accent);
	color: #fff;
}
.nm-sc-dash-cta-alt {
	background: #fff;
	color: var(--nm-sc-dash-accent);
	border: 1px solid var(--nm-sc-dash-accent);
}
.nm-sc-dash-cta-link,
.nm-sc-dash-more {
	background: transparent;
	color: var(--nm-sc-dash-accent);
	padding-left: .25rem;
	padding-right: .25rem;
}
.nm-sc-dash-more:hover,
.nm-sc-dash-cta-link:hover {
	text-decoration: underline;
}
.nm-sc-dash-cta:focus-visible,
.nm-sc-dash-more:focus-visible {
	outline: 2px solid var(--nm-sc-dash-accent);
	outline-offset: 2px;
}

@media (max-width: 560px) {
	.nm-sc-dash-grid {
		grid-template-columns: 1fr;
	}
	.nm-sc-dash-card {
		overflow-wrap: anywhere;
	}
}

@media (prefers-reduced-motion: reduce) {
	a.nm-sc-dash-card {
		transition: none;
	}
}

/* ================================================================== */
/* v1.8.1 — Dashboard access / empty-state polish (appended last).     */
/* ================================================================== */
/* Plan badge in the status banner. */
.nm-sc-dash-plan-badge {
	display: inline-flex;
	align-items: center;
	padding: .12rem .6rem;
	border-radius: 999px;
	background: var(--nm-sc-accent, #2563eb);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.nm-sc-dash-plan-cta {
	margin-left: auto;
}

/* Calmer, centered empty states. */
.nm-sc-dash-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .55rem;
	padding: .2rem 0;
}
.nm-sc-dash-empty-msg {
	margin: 0;
	color: var(--nm-sc-muted, #6b7480);
	font-size: .92rem;
	line-height: 1.5;
}

/* Subtle "unlock with a plan" nudge under access-gated widget lists. */
.nm-sc-dash-nudge {
	margin: .6rem 0 0;
	font-size: .85rem;
}
.nm-sc-dash-nudge a {
	color: var(--nm-sc-accent, #2563eb);
	text-decoration: none;
	font-weight: 600;
}
.nm-sc-dash-nudge a:hover {
	text-decoration: underline;
}

@media (max-width: 560px) {
	.nm-sc-dash-plan {
		flex-direction: column;
		align-items: flex-start;
	}
	.nm-sc-dash-plan-cta {
		margin-left: 0;
	}
	.nm-sc-dash-widget {
		padding: .9rem 1rem;
	}
}

/* ================================================================== */
/* v1.9.0 — Learning Path Engine (appended last).                      */
/*                                                                     */
/* Access-aware, leak-safe path surfaces. Reuses chip/status tokens.   */
/* High priority stays amber (global). Locked path/card = safe stubs.   */
/* Mobile: single column, no overflow.                                 */
/* ================================================================== */
.nm-sc-lp {
	--nm-sc-lp-accent: var(--nm-sc-accent, #2563eb);
	max-width: 760px;
}
.nm-sc-lp-widget,
.nm-sc-lp-overview {
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: var(--nm-sc-radius, 10px);
	background: #fff;
	padding: 1.1rem 1.25rem;
	margin: 0 0 1rem;
}
.nm-sc-lp-title {
	margin: 0 0 .5rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-lp-desc {
	margin: 0 0 .75rem;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-lp-empty,
.nm-sc-lp-msg {
	margin: .3rem 0;
	color: var(--nm-sc-muted, #6b7480);
}

/* Progress bar. */
.nm-sc-lp-progress {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .75rem;
	margin: .3rem 0 .5rem;
}
.nm-sc-lp-bar {
	flex: 1 1 180px;
	height: 8px;
	border-radius: 999px;
	background: var(--nm-sc-border, #e3e7ec);
	overflow: hidden;
}
.nm-sc-lp-bar > span {
	display: block;
	height: 100%;
	background: var(--nm-sc-lp-accent);
	border-radius: 999px;
}
.nm-sc-lp-progress-label,
.nm-sc-lp-stats {
	font-size: .88rem;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-lp-stats {
	margin: 0 0 .6rem;
}

/* Next / resume CTA. */
.nm-sc-lp-next {
	margin: .5rem 0 0;
}
.nm-sc-lp-next-label {
	font-weight: 600;
	color: var(--nm-sc-fg, #1f2733);
	margin-right: .25rem;
}
.nm-sc-lp-cta {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: .35rem 1rem;
	border-radius: 8px;
	background: var(--nm-sc-lp-accent);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.nm-sc-lp-cta:focus-visible {
	outline: 2px solid var(--nm-sc-lp-accent);
	outline-offset: 2px;
}

/* Day grouping + items. */
.nm-sc-lp-day {
	margin: 1rem 0 .5rem;
	font-size: .95rem;
	font-weight: 700;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-lp-items {
	display: flex;
	flex-direction: column;
	gap: .55rem;
}
.nm-sc-lp-item {
	display: block;
	padding: .6rem .75rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	color: var(--nm-sc-fg, #1f2733);
}
a.nm-sc-lp-item:hover {
	border-color: var(--nm-sc-lp-accent);
	box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}
a.nm-sc-lp-item:focus-visible {
	outline: 2px solid var(--nm-sc-lp-accent);
	outline-offset: 2px;
}
.nm-sc-lp-item-locked,
.nm-sc-lp-placeholder {
	background: var(--nm-sc-library-muted, #f7f9fc);
	border-style: dashed;
}
.nm-sc-lp-item-title {
	display: block;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: .3rem;
}
.nm-sc-lp-item .nm-sc-chips {
	gap: .3rem;
	margin-bottom: .25rem;
}
.nm-sc-lp-item-meta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem;
	font-size: .82rem;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-lp-req-review {
	background: #eef2ff;
	border-color: #c7d2fe;
	color: #3730a3;
}
.nm-sc-lp-req-optional {
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-lp-item-note {
	display: block;
	margin-top: .25rem;
	font-size: .85rem;
	color: var(--nm-sc-muted, #6b7480);
}

/* Locked path stub. */
.nm-sc-lp-locked .nm-sc-locked-badge {
	margin-bottom: .5rem;
}

@media (max-width: 560px) {
	.nm-sc-lp-item {
		overflow-wrap: anywhere;
	}
	.nm-sc-lp-progress {
		gap: .4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	a.nm-sc-lp-item {
		transition: none;
	}
}

/* ================================================================== */
/* v1.10.0 — Dashboard Learning Path widget (appended last).           */
/*                                                                     */
/* Summary-only surface inside [nm_study_dashboard]. Reuses the .nm-sc-lp-bar */
/* progress-bar token, the shared .nm-sc-dash-card chip, and the       */
/* .nm-sc-locked-badge token. Never lists a full day-by-day item set — */
/* that stays in [nm_learning_path]. Mobile: no overflow.              */
/* ================================================================== */
.nm-sc-dash-path-active,
.nm-sc-dash-path-locked {
	display: block;
}
.nm-sc-dash-path-title {
	margin: 0 0 .5rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--nm-sc-fg, #1f2733);
}
.nm-sc-dash-path-progress {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .65rem;
	margin: 0 0 .5rem;
}
.nm-sc-dash-path-progress .nm-sc-lp-bar {
	flex: 1 1 160px;
}
.nm-sc-dash-path-percent {
	font-size: .85rem;
	font-weight: 600;
	color: var(--nm-sc-muted, #6b7480);
	white-space: nowrap;
}
.nm-sc-dash-path-stats {
	margin: 0 0 .7rem;
	font-size: .85rem;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-dash-path-today {
	margin: 0 0 .6rem;
}
.nm-sc-dash-path-today-label {
	display: block;
	margin-bottom: .4rem;
	font-size: .82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--nm-sc-muted, #6b7480);
}
.nm-sc-dash-path-today-empty,
.nm-sc-dash-path-done {
	margin: 0 0 .6rem;
	color: var(--nm-sc-muted, #6b7480);
	font-size: .9rem;
}
.nm-sc-dash-path-resume {
	margin: 0;
}

/* Locked path stub. */
.nm-sc-dash-path-locked .nm-sc-locked-badge {
	margin-bottom: .5rem;
	display: inline-flex;
}

/* Multi-path compact selector. */
.nm-sc-dash-path-list {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}
.nm-sc-dash-path-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .3rem .6rem;
	padding: .55rem .7rem;
	border: 1px solid var(--nm-sc-border, #e3e7ec);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	color: var(--nm-sc-fg, #1f2733);
}
a.nm-sc-dash-path-item:hover {
	border-color: var(--nm-sc-dash-accent, var(--nm-sc-accent, #2563eb));
	box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}
a.nm-sc-dash-path-item:focus-visible {
	outline: 2px solid var(--nm-sc-dash-accent, var(--nm-sc-accent, #2563eb));
	outline-offset: 2px;
}
.nm-sc-dash-path-item-title {
	font-weight: 600;
}
.nm-sc-dash-path-item-meta {
	font-size: .82rem;
	color: var(--nm-sc-muted, #6b7480);
	white-space: nowrap;
}
.nm-sc-dash-path-more {
	margin: 0;
	font-size: .82rem;
	color: var(--nm-sc-muted, #6b7480);
}

@media (max-width: 560px) {
	.nm-sc-dash-path-item {
		flex-direction: column;
		align-items: flex-start;
		overflow-wrap: anywhere;
	}
	.nm-sc-dash-path-item-meta {
		white-space: normal;
	}
	.nm-sc-dash-path-percent {
		white-space: normal;
	}
}

/* =======================================================================
 * v1.14.0 — Figures, attribution and visual recognition
 * Editorial: hairline frames, captions as fine print, credit always visible.
 * ==================================================================== */

.nm-sc-figures {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin: 18px 0;
}
.nm-sc-figure {
	margin: 0;
	border: 1px solid #e3e8ef;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}
.nm-sc-figure__img {
	display: block;
	width: 100%;
	height: auto;
	background: #f7f9fc;
}
.nm-sc-figure svg { display: block; width: 100%; height: auto; }
.nm-sc-figure__cap {
	padding: 9px 12px;
	border-top: 1px solid #e3e8ef;
	font-size: 12.5px;
	line-height: 1.5;
	color: #46566a;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.nm-sc-figure__caption { color: #16202b; }
.nm-sc-figure__credit { font-size: 11.5px; opacity: .8; }

/* A single figure should not stretch across the full grid width. */
.nm-sc-figures:has(.nm-sc-figure:only-child) { grid-template-columns: minmax(0, 520px); }

/* ---- Visual recognition panel ---------------------------------------- */
.nm-sc-recognition {
	border: 1px solid #e3e8ef;
	border-left: 3px solid #2563eb;
	border-radius: 0 4px 4px 0;
	background: #f7f9fc;
	padding: 14px 18px;
	margin: 18px 0;
}
.nm-sc-recognition__h {
	margin: 0 0 6px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #1e40af;
}
.nm-sc-recognition__h:not(:first-child) { margin-top: 14px; }
.nm-sc-recognition ul { margin: 0; padding-left: 1.15em; }
.nm-sc-recognition li { font-size: 14.5px; line-height: 1.6; color: #16202b; margin: 0 0 3px; }
.nm-sc-recognition__cues li { font-weight: 500; }

@media (max-width: 560px) {
	.nm-sc-figures { grid-template-columns: 1fr; }
}

/* Reserved figure slot: image still to be sourced under a proper licence. */
.nm-sc-figure--pending .nm-sc-figure__pending {
	display: flex; align-items: center; justify-content: center;
	min-height: 130px; padding: 20px;
	background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 10px, #eef2f8 10px, #eef2f8 20px);
	color: #46566a; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
}
