/*
 * SWG Academy — frontend styles
 * Namespace: .swg-quiz-*  (SWG brand: #38A8D8 accent on a light palette)
 */

.swg-quiz-app {
	--swguiq-accent: #38A8D8;
	--swguiq-accent-dark: #2388b3;
	--swguiq-accent-deep: #1a6a90;
	--swguiq-ink: #1d1d1f;
	--swguiq-muted: #6c757d;
	--swguiq-line: #e4e8ee;
	--swguiq-line-strong: #cfd7e1;
	--swguiq-panel: #ffffff;
	--swguiq-panel-alt: #fbfcfe;
	--swguiq-bg: #f4f7fb;
	--swguiq-good: #1f8b4c;
	--swguiq-bad:  #b32d3a;
	--swguiq-warn-bg: #fff8e1;
	--swguiq-warn-border: #f0cf6e;

	/* Shadow + gradient tokens to match admin SaaS treatment. */
	--swguiq-shadow:    0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
	--swguiq-shadow-md: 0 2px 6px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.05);
	--swguiq-shadow-lg: 0 10px 28px rgba(16, 24, 40, 0.10), 0 3px 8px rgba(16, 24, 40, 0.05);
	--swguiq-accent-gradient: linear-gradient(135deg, #38A8D8 0%, #2388b3 100%);
	--swguiq-accent-gradient-light: linear-gradient(135deg, #5BBDE5 0%, #38A8D8 100%);
	--swguiq-accent-gradient-deep: linear-gradient(135deg, #2388b3 0%, #1a6a90 100%);
	--swguiq-hero-gradient: linear-gradient(135deg, #0f1c2d 0%, #183048 42%, #1f557c 100%);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
	color: var(--swguiq-ink);
	line-height: 1.55;
	max-width: 900px;
	/* v2.7.17 — top margin trimmed from 24px to 8px per Frontend top-spacing rule
	   (web-development/saas-admin-pattern.md). Plugin contributes <=16px above
	   first visible element; theme controls everything above. Horizontal auto
	   margin preserved for the centered 900px column. */
	margin: 8px auto 24px;
	background: transparent;
	padding: 0;
}

.swg-quiz-app * { box-sizing: border-box; }

.swg-quiz-app a {
	color: var(--swguiq-accent-dark);
	text-decoration: underline;
}

/* Buttons that happen to be anchors must override the app-wide link underline.
   Specificity note: ".swg-quiz-app a" is (0,0,1,1) and beats ".swg-quiz-btn"
   at (0,0,1,0), so the .swg-quiz-btn text-decoration rule was silently losing. */
.swg-quiz-app a.swg-quiz-btn,
.swg-quiz-app .swg-quiz-btn {
	text-decoration: none;
	color: inherit;
}
.swg-quiz-app a.swg-quiz-btn:hover,
.swg-quiz-app .swg-quiz-btn:hover {
	text-decoration: none;
}
.swg-quiz-app .swg-quiz-btn--primary,
.swg-quiz-app a.swg-quiz-btn--primary,
.swg-quiz-app a.swg-quiz-btn--primary:hover,
.swg-quiz-app .swg-quiz-btn--primary:hover {
	color: #ffffff;
}
.swg-quiz-app .swg-quiz-btn--secondary,
.swg-quiz-app a.swg-quiz-btn--secondary,
.swg-quiz-app a.swg-quiz-btn--secondary:hover,
.swg-quiz-app .swg-quiz-btn--secondary:hover {
	color: var(--swguiq-accent-deep);
}
.swg-quiz-app .swg-quiz-btn--ghost,
.swg-quiz-app a.swg-quiz-btn--ghost,
.swg-quiz-app a.swg-quiz-btn--ghost:hover,
.swg-quiz-app .swg-quiz-btn--ghost:hover {
	color: var(--swguiq-ink);
}

.swg-quiz-card {
	background: var(--swguiq-panel);
	border: 1px solid var(--swguiq-line);
	border-radius: 14px;
	padding: 24px 28px;
	margin: 16px 0;
	box-shadow: var(--swguiq-shadow);
}

.swg-quiz-h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: -0.02em; line-height: 1.15; }
.swg-quiz-h2 { font-size: 20px; margin: 24px 0 10px; letter-spacing: -0.01em; }
.swg-quiz-h3 { font-size: 17px; margin: 0; }

.swg-quiz-lede { font-size: 16px; color: #3d4148; margin: 0 0 20px; }
.swg-quiz-muted { color: var(--swguiq-muted); font-size: 14px; }

.swg-quiz-notice {
	padding: 12px 16px;
	border-radius: 8px;
	margin: 16px 0;
	background: var(--swguiq-warn-bg);
	border: 1px solid var(--swguiq-warn-border);
}

/* Locked / not-found / nothing-here screens — never a dead end. Always offer
   a labeled next step (resume the blocking module, go to the first module,
   or at minimum back to the course list). */
.swg-quiz-app .swg-quiz-locked {
	background: var(--swguiq-panel);
	border: 1px solid var(--swguiq-line);
	border-radius: 16px;
	padding: 36px 36px;
	box-shadow: var(--swguiq-shadow-md);
	text-align: center;
	max-width: 640px;
	margin: 24px auto;
	position: relative;
	overflow: hidden;
}
.swg-quiz-app .swg-quiz-locked::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: linear-gradient(90deg, #f59e0b, #b45309);
}

.swg-quiz-app .swg-quiz-locked-eyebrow {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(245, 158, 11, 0.14);
	color: #92580a;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0 0 10px;
}

.swg-quiz-app .swg-quiz-locked .swg-quiz-h2 {
	font-size: 22px;
	margin: 0 0 8px;
	color: var(--swguiq-ink);
}

.swg-quiz-app .swg-quiz-locked .swg-quiz-lede {
	font-size: 15px;
	margin: 0 auto 6px;
	max-width: 480px;
	color: #3d4148;
}

.swg-quiz-app .swg-quiz-locked-sub {
	font-size: 13px;
	color: var(--swguiq-muted);
	margin: 0 0 16px;
}

.swg-quiz-app .swg-quiz-locked-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 20px;
}

@media ( max-width: 640px ) {
	.swg-quiz-app .swg-quiz-locked { padding: 24px 20px; }
	.swg-quiz-app .swg-quiz-locked-actions { flex-direction: column; }
	.swg-quiz-app .swg-quiz-locked-actions .swg-quiz-btn { width: 100%; justify-content: center; }
}
.swg-quiz-notice strong { display: inline-block; margin-right: 6px; }
.swg-quiz-notice--warn { background: var(--swguiq-warn-bg); border-color: var(--swguiq-warn-border); }

/* ------------------------------------------------------------- start form */

.swg-quiz-start .swg-quiz-card {
	max-width: 560px;
	margin: 0 auto;
	box-shadow: var(--swguiq-shadow-md);
	position: relative;
	overflow: hidden;
}
.swg-quiz-start .swg-quiz-card::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--swguiq-accent-gradient);
}
.swg-quiz-start .swg-quiz-h2 { font-size: 22px; margin: 4px 0 12px; }

.swg-quiz-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 14px 0;
}

.swg-quiz-field label {
	font-weight: 600;
	font-size: 14px;
}

.swg-quiz-field input[type="text"],
.swg-quiz-field input[type="email"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--swguiq-line);
	border-radius: 6px;
	font-size: 16px;   /* 16px avoids iOS zoom on focus */
	background: #fff;
	color: var(--swguiq-ink);
}

.swg-quiz-field input:focus-visible {
	outline: 2px solid var(--swguiq-accent);
	outline-offset: 2px;
	border-color: var(--swguiq-accent);
}

.swg-quiz-consent label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.45;
	cursor: pointer;
}

.swg-quiz-consent input[type="checkbox"] {
	/* Align the checkbox to the first line of label text via line-height
	   math, not a magic offset that breaks on different fonts. */
	margin: 0;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	transform: translateY(2px);
	accent-color: var(--swguiq-accent);
	cursor: pointer;
}

.swg-quiz-actions {
	/* Full-width submit matches the width of the inputs above it so the
	   form reads as a single confident column. `.swg-quiz-btn` is
	   `display: inline-flex` by default, which without this wrapper makes
	   the button collapse to its text width + sit flush-left. */
	display: flex;
	margin: 24px 0 6px;
}
.swg-quiz-start .swg-quiz-actions .swg-quiz-btn,
.swg-quiz-start .swg-quiz-actions button[type="submit"] {
	width: 100%;
	min-height: 48px;
	font-size: 16px;
	justify-content: center;
}

/* Admin "Test as admin — skip email" preview affordance. Shared block style
   moved out of inline PHP styles so it can be themed and responsive. */
.swg-quiz-admin-preview {
	background: #fff7e0;
	border: 1px solid #f0cf6e;
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0 0 18px;
}
.swg-quiz-admin-preview .swg-quiz-muted {
	margin: 4px 0 10px;
}

/* Honeypot: visually hidden, still submittable by bots. */
.swg-quiz-honeypot {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.swg-quiz-feedback {
	margin-top: 14px;
	min-height: 0;
	font-size: 14px;
}

.swg-quiz-feedback--error {
	color: var(--swguiq-bad);
	padding: 12px 14px;
	background: rgba( 179, 45, 58, 0.10 );
	border: 1px solid rgba( 179, 45, 58, 0.35 );
	border-left: 4px solid var(--swguiq-bad);
	border-radius: 6px;
	font-weight: 500;
	font-size: 15px;
	line-height: 1.45;
}

.swg-quiz-feedback--success {
	color: var(--swguiq-good);
	padding: 8px 12px;
	background: rgba( 31, 139, 76, 0.08 );
	border-radius: 6px;
}

/* ---------------------------------------------------------------- buttons */

.swg-quiz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;          /* >= 44x44 target per a11y rule */
	min-height: 44px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.005em;
	cursor: pointer;
	background: transparent;
	color: var(--swguiq-ink);
	text-decoration: none;
	transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
	will-change: transform;
}

.swg-quiz-btn:focus-visible {
	outline: 2px solid var(--swguiq-accent);
	outline-offset: 2px;
}

/* Primary button — explicit `.swg-quiz-app` prefix on every state so theme-level
   `a:hover` / `button:hover` overrides (common in Twenty Twenty-X defaults and
   many page-builder themes that force `background: transparent` on hovered
   anchors) cannot strip our gradient and leave just white text floating. */
.swg-quiz-app .swg-quiz-btn--primary,
.swg-quiz-app a.swg-quiz-btn--primary {
	background: var(--swguiq-accent-gradient);
	color: #fff;
	box-shadow: 0 1px 2px rgba(35, 136, 179, 0.20), 0 4px 12px rgba(56, 168, 216, 0.28);
}
.swg-quiz-app .swg-quiz-btn--primary:hover,
.swg-quiz-app a.swg-quiz-btn--primary:hover,
.swg-quiz-app .swg-quiz-btn--primary:focus,
.swg-quiz-app a.swg-quiz-btn--primary:focus {
	background: var(--swguiq-accent-gradient-light);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(35, 136, 179, 0.22), 0 8px 20px rgba(91, 189, 229, 0.40);
	color: #fff;
}
.swg-quiz-app .swg-quiz-btn--primary:active,
.swg-quiz-app a.swg-quiz-btn--primary:active {
	background: var(--swguiq-accent-gradient-deep);
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(35, 136, 179, 0.25);
	color: #fff;
}
.swg-quiz-app .swg-quiz-btn--primary:disabled {
	background: #cbd3da;
	color: #6b7380;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.swg-quiz-app .swg-quiz-btn--secondary,
.swg-quiz-app a.swg-quiz-btn--secondary {
	border-color: rgba(56, 168, 216, 0.35);
	color: var(--swguiq-accent-deep);
	background: rgba(56, 168, 216, 0.08);
}
.swg-quiz-app .swg-quiz-btn--secondary:hover,
.swg-quiz-app a.swg-quiz-btn--secondary:hover,
.swg-quiz-app .swg-quiz-btn--secondary:focus,
.swg-quiz-app a.swg-quiz-btn--secondary:focus {
	background: rgba(56, 168, 216, 0.18);
	border-color: var(--swguiq-accent);
	color: var(--swguiq-accent-deep);
	transform: translateY(-1px);
}

.swg-quiz-app .swg-quiz-btn--ghost,
.swg-quiz-app a.swg-quiz-btn--ghost {
	border-color: var(--swguiq-line-strong);
	color: var(--swguiq-ink);
	background: var(--swguiq-panel);
	box-shadow: var(--swguiq-shadow);
}
.swg-quiz-app .swg-quiz-btn--ghost:hover,
.swg-quiz-app a.swg-quiz-btn--ghost:hover,
.swg-quiz-app .swg-quiz-btn--ghost:focus,
.swg-quiz-app a.swg-quiz-btn--ghost:focus {
	background: var(--swguiq-panel-alt);
	border-color: var(--swguiq-muted);
	color: var(--swguiq-ink);
	transform: translateY(-1px);
}

.swg-quiz-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--swguiq-accent-dark);
	text-decoration: underline;
	cursor: pointer;
	font-size: 14px;
}

/* --------------------------------------------------------- module viewer */

.swg-quiz-module-header {
	margin: 0 0 22px;
	padding: 26px 28px 22px;
	background: var(--swguiq-hero-gradient);
	color: #fff;
	border-radius: 16px;
	box-shadow: var(--swguiq-shadow-lg);
	position: relative;
	overflow: hidden;
}
.swg-quiz-module-header::after {
	content: "";
	position: absolute;
	inset: auto -120px -120px auto;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(56,168,216,0.32) 0%, transparent 62%);
	pointer-events: none;
}
.swg-quiz-module-header > * { position: relative; z-index: 1; }
.swg-quiz-module-header .swg-quiz-h1 { color: #fff; margin: 4px 0 8px; }
.swg-quiz-module-header .swg-quiz-muted { color: rgba(255,255,255,0.75); }
.swg-quiz-module-header .swg-quiz-start-cta { margin-top: 18px; }
.swg-quiz-module-header .swg-quiz-start-cta .swg-quiz-btn--primary {
	/* 16px/40% glow was producing a visible halo that clipped against the
	   hero card's overflow:hidden, making the button look like it bled
	   into the card's right edge. Softened to 10px/28% — enough glow to
	   keep the primary action prominent without the bloom. */
	box-shadow: 0 2px 6px rgba(0,0,0,0.22), 0 4px 10px rgba(56,168,216,0.28);
}
.swg-quiz-module-header .swg-quiz-module-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 4px;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(56,168,216,0.22);
	color: #cce8f6;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.swg-quiz-module-intro {
	background: rgba(255,255,255,0.10);
	border: 1px solid rgba(255,255,255,0.18);
	border-radius: 10px;
	padding: 14px 18px;
	color: rgba(255,255,255,0.92);
	margin-top: 14px;
	backdrop-filter: blur(4px);
}
.swg-quiz-module-intro a { color: #bfe1f4; text-decoration: underline; }

.swg-quiz-skip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin: 0 0 20px;
	padding: 14px 18px;
	border: 1px solid rgba(56, 168, 216, 0.32);
	background: linear-gradient(135deg, rgba(56, 168, 216, 0.08) 0%, rgba(35, 136, 179, 0.04) 100%);
	border-radius: 12px;
}
.swg-quiz-skip .swg-quiz-btn { margin: 0; }
.swg-quiz-skip-note {
	margin: 0;
	font-size: 13px;
	color: var(--swguiq-muted);
	flex: 1 1 240px;
	min-width: 0;
}

.swg-quiz-section-list {
	list-style: none;
	padding: 0;
	margin: 14px 0;
	counter-reset: swguiq-sections;
}

.swg-quiz-section {
	background: #fff;
	border: 1px solid var(--swguiq-line);
	border-radius: 14px;
	padding: 20px 22px 20px 26px;
	margin: 14px 0;
	counter-increment: swguiq-sections;
	position: relative;
	box-shadow: var(--swguiq-shadow);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.swg-quiz-section:hover { box-shadow: var(--swguiq-shadow-md); }

.swg-quiz-section::before {
	content: counter(swguiq-sections);
	position: absolute;
	top: 18px;
	left: -14px;
	background: var(--swguiq-accent);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--swguiq-bg);
}

.swg-quiz-section.is-read { border-color: #bdebd4; }
.swg-quiz-section.is-read::before { background: var(--swguiq-good); }

.swg-quiz-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.swg-quiz-section-body {
	margin: 10px 0;
	color: #2a2d33;
}
.swg-quiz-section-body img { max-width: 100%; height: auto; }

/* Action row: clean card footer. Top border + padding anchor the button
   so it reads as a deliberate call-to-action, not a floating UI part.
   Right-aligned per convention (Stripe / GitHub / Notion card patterns).
   Muted "You marked this read." confirmation also sits right-aligned —
   it doubles as the read-state badge in this row's slot. */
.swg-quiz-section-actions {
	margin-top: 18px;
	padding: 16px 12px 0;
	border-top: 1px solid var(--swguiq-line);
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	min-height: 44px;
}

.swg-quiz-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
}
.swg-quiz-badge--on    { background: rgba(31,139,76,.12);  color: var(--swguiq-good); }
.swg-quiz-badge--muted { background: #eef1f3; color: var(--swguiq-muted); }

.swg-quiz-exam-cta {
	background: linear-gradient(135deg, #ffffff 0%, #f4f9fd 100%);
	border: 1px solid var(--swguiq-line);
	border-radius: 14px;
	padding: 28px 24px;
	margin: 24px 0;
	text-align: center;
	box-shadow: var(--swguiq-shadow);
	position: relative;
	overflow: hidden;
}
.swg-quiz-exam-cta::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--swguiq-accent-gradient);
}
.swg-quiz-exam-cta .swg-quiz-btn--primary { font-size: 16px; padding: 13px 28px; min-height: 50px; }
.swg-quiz-exam-cta p { margin: 14px 0 0; }

/* ── Module-viewer nav row (Previous | Back to course | Next) ──
   Three-column grid so the center button sits perfectly centered regardless
   of whether left or right is populated. On a first module Previous is hidden
   but the home + next still render in their correct slots; on the last module
   Next is hidden. Mirrors the wizard's .swg-quiz-wiz-nav geometry so every
   course surface speaks the same navigation vocabulary. */
/* Top module action bar — sits above content, consolidates Previous /
   Main course / Skip to exam / Next into one row so the learner never has
   to scroll past the lessons to navigate. Shares the gradient + border
   treatment with the (legacy) .swg-quiz-skip container so the visual
   vocabulary matches across course surfaces. Mobile: stacks into two rows
   (left group then right group) with each button full-width. */
.swg-quiz-module-topnav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 22px;
	padding: 12px 14px;
	border: 1px solid rgba(56, 168, 216, 0.32);
	background: linear-gradient(135deg, rgba(56, 168, 216, 0.08) 0%, rgba(35, 136, 179, 0.04) 100%);
	border-radius: 12px;
}
.swg-quiz-module-topnav-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.swg-quiz-module-topnav-group--right {
	justify-content: flex-end;
	margin-left: auto;
}
.swg-quiz-module-nav-btn {
	min-height: 40px;
	font-size: 14px;
	padding: 9px 16px;
	white-space: nowrap;
}

@media ( max-width: 640px ) {
	.swg-quiz-module-topnav {
		flex-direction: column;
		align-items: stretch;
	}
	.swg-quiz-module-topnav-group {
		width: 100%;
		justify-content: center;
	}
	.swg-quiz-module-topnav-group--right { margin-left: 0; }
	.swg-quiz-module-nav-btn { flex: 1 1 auto; justify-content: center; }
}

.swg-quiz-module-footer {
	margin: 20px 0 8px;
	padding-top: 18px;
	border-top: 1px solid var(--swguiq-line);
	text-align: center;
}

/* ---------------------------------------------------------- exam runner */

.swg-quiz-exam-host { margin-top: 16px; }

.swg-quiz-exam-chrome {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding: 14px 18px;
	background: var(--swguiq-panel);
	border: 1px solid var(--swguiq-line);
	border-radius: 12px;
	box-shadow: var(--swguiq-shadow);
	margin-bottom: 18px;
}

.swg-quiz-exam-progress {
	font-size: 12px;
	color: var(--swguiq-muted);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.10em;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(56, 168, 216, 0.10);
	color: var(--swguiq-accent-deep);
}

.swg-quiz-exam-loading {
	padding: 40px 10px; color: var(--swguiq-muted); text-align: center; font-size: 15px;
}

.swg-quiz-exam-body.is-saving { opacity: 0.7; pointer-events: none; }

.swg-quiz-question-list { list-style: decimal; padding-left: 32px; margin: 0; }

.swg-quiz-question {
	background: #fff;
	border: 1px solid var(--swguiq-line);
	border-radius: 14px;
	padding: 20px 22px;
	margin: 14px 0;
	box-shadow: var(--swguiq-shadow);
}
.swg-quiz-question.is-correct { border-color: #bdebd4; background: #f2fbf6; }
.swg-quiz-question.is-wrong   { border-color: #f2c0c7; background: #fef4f5; }

.swg-quiz-question-text {
	font-weight: 600; margin-bottom: 12px; color: var(--swguiq-ink);
}

.swg-quiz-options {
	list-style: none; padding: 0; margin: 10px 0 0;
	display: flex; flex-direction: column; gap: 8px;
}

.swg-quiz-option label {
	display: flex; gap: 12px; align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid var(--swguiq-line); border-radius: 10px;
	background: var(--swguiq-panel-alt); cursor: pointer;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.swg-quiz-option label:hover {
	border-color: var(--swguiq-accent);
	background: rgba(56, 168, 216, 0.05);
	box-shadow: var(--swguiq-shadow);
}
.swg-quiz-option label:has(input:checked) {
	border-color: var(--swguiq-accent);
	background: rgba(56, 168, 216, 0.10);
	box-shadow: 0 0 0 3px rgba(56, 168, 216, 0.15);
}

.swg-quiz-option input[type="radio"] {
	margin-top: 3px; width: 18px; height: 18px;
	accent-color: var(--swguiq-accent);
}

.swg-quiz-options.is-review .swg-quiz-option {
	padding: 10px 12px; border: 1px solid var(--swguiq-line); border-radius: 8px;
	background: #fff;
	display: flex; align-items: flex-start; gap: 10px;
}
.swg-quiz-options.is-review .swg-quiz-option.is-correct { border-color: #bdebd4; background: #f2fbf6; }
.swg-quiz-options.is-review .swg-quiz-option.is-wrong   { border-color: #f2c0c7; background: #fef4f5; }

.swg-quiz-mark { font-weight: 700; width: 20px; text-align: center; }
.swg-quiz-options.is-review .swg-quiz-option.is-correct .swg-quiz-mark { color: var(--swguiq-good); }
.swg-quiz-options.is-review .swg-quiz-option.is-wrong   .swg-quiz-mark { color: var(--swguiq-bad); }

.swg-quiz-exp {
	margin-top: 12px; padding: 12px 14px;
	border-radius: 8px; background: #f6f8fb;
	border-left: 3px solid var(--swguiq-accent);
	font-size: 14px;
}
.swg-quiz-exp.is-correct { background: #eefaf2; border-left-color: var(--swguiq-good); }
.swg-quiz-exp.is-wrong   { background: #fbeef0; border-left-color: var(--swguiq-bad); }

.swg-quiz-exam-nav {
	display: flex; justify-content: space-between; gap: 10px;
	margin: 20px 0 10px;
}

/* -------------------------------------------------------- results/review */

.swg-quiz-results {
	background: var(--swguiq-panel);
	border: 1px solid var(--swguiq-line);
	border-radius: 16px;
	padding: 32px 28px;
	text-align: center;
	box-shadow: var(--swguiq-shadow-md);
	position: relative;
	overflow: hidden;
}
.swg-quiz-results::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--swguiq-accent-gradient);
}

.swg-quiz-score {
	padding: 28px 0 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.swg-quiz-score-pct {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	font-size: 44px;
	font-weight: 800;
	color: var(--swguiq-accent-deep);
	letter-spacing: -0.03em;
	line-height: 1;
	/* Score ring: filled to the percentage via custom property. */
	background:
		radial-gradient(circle, var(--swguiq-panel) 0 63%, transparent 63%),
		conic-gradient(var(--swguiq-accent) 0 var(--swg-score, 100%), rgba(56,168,216,0.15) 0 100%);
	box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.06);
}
.swg-quiz-score-pct::after {
	content: "";
	position: absolute;
	inset: 8px;
	border-radius: 50%;
	border: 1px solid rgba(56, 168, 216, 0.18);
	pointer-events: none;
}

.swg-quiz-score-raw {
	font-size: 15px;
	color: var(--swguiq-muted);
	margin-top: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.swg-quiz-score-pass { margin-top: 14px; }

.swg-quiz-badge--bad { background: rgba(179,45,58,.12); color: var(--swguiq-bad); }

.swg-quiz-badge {
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* "PASS" / "Not yet" headline badge on results. */
.swg-quiz-badge--on:empty, .swg-quiz-badge--bad:empty { display: none; }

.swg-quiz-results .swg-quiz-h2 { font-size: 24px; margin: 0 0 4px; }
.swg-quiz-results .swg-quiz-h3 { font-size: 15px; color: var(--swguiq-muted); margin-top: 20px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.swg-quiz-results .swg-quiz-exam-nav { justify-content: center; flex-wrap: wrap; margin-top: 26px; }

.swg-quiz-cat-table {
	margin: 10px auto 0; border-collapse: collapse;
	width: 100%; max-width: 560px;
	font-size: 14px;
}
.swg-quiz-cat-table th,
.swg-quiz-cat-table td {
	padding: 8px 12px; text-align: left;
	border-bottom: 1px solid var(--swguiq-line);
}
.swg-quiz-cat-table th { background: #f7f8fa; font-weight: 600; }

.swg-quiz-review .swg-quiz-question.is-correct,
.swg-quiz-review .swg-quiz-question.is-wrong { padding: 20px; }

.swg-quiz-review-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	padding: 10px 14px;
	margin: 0 0 14px;
	background: #f7f8fa;
	border: 1px solid var(--swguiq-line);
	border-radius: 8px;
	font-size: 14px;
}

.swg-quiz-review-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.swg-quiz-review-filter select {
	padding: 4px 8px;
}

.swg-quiz-review-empty {
	padding: 24px;
	text-align: center;
	background: #f7f8fa;
	border: 1px dashed var(--swguiq-line);
	border-radius: 8px;
}

.swg-quiz-question-cat {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 4px 0 8px;
}

/* -------------------------------------------------------------- wizard */

/* =========================================================================
   v3.0.0 — Banded course chrome.
   Replaces the v2.x outline-card layout with a soft-surface band carrying
   a 4px cyan-accent left border. Each visual value below is a fallback for
   the matching CSS custom property emitted by Aesthetics_Renderer; admin
   tweaks in Settings → Aesthetics override these defaults at the cascade
   layer above (inline <style> in <head>).

   Defaults reflect the agency-recommended preset:
     density   = Standard (--swguiq-aes-chrome-pad: 18px 24px)
     spacing   = Comfortable (--swguiq-aes-space-above/below)
     back btn  = Soft pill (the baseline rule below; other 2 styles
                  override via Aesthetics_Renderer build_css())
     radius    = Soft (10px)
     accent    = #38A8D8 (--swguiq-accent / --swguiq-accent-soft)
   ========================================================================= */

.swg-quiz-wizard .swg-quiz-wiz-chrome {
	background: var(--swguiq-panel-alt, #fbfcfe);
	border-left: 4px solid var(--swguiq-accent, #38A8D8);
	border-radius: 0 var(--swguiq-aes-radius, 10px) var(--swguiq-aes-radius, 10px) 0;
	box-shadow: var(--swguiq-shadow);
	padding: var(--swguiq-aes-chrome-pad, 18px 24px);
	margin-top: var(--swguiq-aes-space-above, 16px);
	margin-bottom: var(--swguiq-aes-space-below, 20px);
}

.swg-quiz-wizard .swg-quiz-wiz-chrome-inner {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 20px;
	align-items: center;
}

.swg-quiz-wizard .swg-quiz-wiz-chrome-text {
	min-width: 0;
}

.swg-quiz-wizard .swg-quiz-wiz-eyebrow-line {
	font-size: var(--swguiq-aes-eyebrow-size, 11px);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--swguiq-accent-dark);
	margin-bottom: 4px;
	line-height: 1.3;
}

.swg-quiz-wizard .swg-quiz-wiz-lesson-line {
	font-size: var(--swguiq-aes-lesson-size, 17px);
	font-weight: 700;
	color: var(--swguiq-ink);
	margin-bottom: 10px;
	line-height: 1.3;
}
.swg-quiz-wizard .swg-quiz-wiz-module-num {
	color: var(--swguiq-muted);
	font-weight: 600;
	margin-right: 4px;
}
.swg-quiz-wizard .swg-quiz-wiz-sep {
	color: var(--swguiq-muted);
}

/* Visible progress track + cyan fill. v2.x had a 3px gray line with no
   visible track — the v3.0.0 fix makes the track a faint accent-soft tint
   so even at 0% it reads as "you've started" rather than "broken bar." */
.swg-quiz-wizard .swg-quiz-wiz-chrome .swg-quiz-wiz-bar {
	height: 5px;
	background: var(--swguiq-accent-soft, rgba(56, 168, 216, 0.18));
	border-radius: 99px;
	overflow: hidden;
	max-width: 380px;
}
.swg-quiz-wizard .swg-quiz-wiz-chrome .swg-quiz-wiz-bar i {
	display: block;
	height: 100%;
	background: var(--swguiq-accent-gradient, linear-gradient(90deg, #38A8D8, #1d6588));
	border-radius: 99px;
}

/* Back button — soft pill baseline (Aesthetics_Renderer overrides for
   text-link or bold-button variants). */
.swg-quiz-wizard .swg-quiz-wiz-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--swguiq-accent-soft, rgba(56, 168, 216, 0.12));
	color: var(--swguiq-accent-dark);
	padding: 9px 14px;
	border-radius: 99px;
	border: 1px solid rgba(56, 168, 216, 0.30);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}
.swg-quiz-wizard .swg-quiz-wiz-back:hover {
	background: var(--swguiq-accent, #38A8D8);
	color: #ffffff;
	text-decoration: none;
}
.swg-quiz-wizard .swg-quiz-wiz-back-icon {
	display: inline-block;
	flex-shrink: 0;
}

/* Mobile: stack the chrome (text above the back button) at 600px width. */
@media (max-width: 600px) {
	.swg-quiz-wizard .swg-quiz-wiz-chrome-inner {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.swg-quiz-wizard .swg-quiz-wiz-back {
		justify-self: start;
	}
}

/* ───────── Step card ───────── */

.swg-quiz-wizard .swg-quiz-wiz-step {
	background: var(--swguiq-panel);
	border: 1px solid var(--swguiq-line);
	border-radius: 14px;
	padding: 28px 32px;
	box-shadow: var(--swguiq-shadow);
	margin-bottom: 18px;
	min-height: 280px;
}

.swg-quiz-wizard .swg-quiz-wiz-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 6px;
	padding: 4px 12px;
	background: rgba(56, 168, 216, 0.10);
	color: var(--swguiq-accent-deep);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	border-radius: 999px;
}
.swg-quiz-wizard .swg-quiz-wiz-eyebrow .swg-quiz-chip {
	background: #ffffff;
	border: 1px solid rgba(56,168,216,0.25);
	color: var(--swguiq-accent-deep);
	font-size: 10.5px;
	padding: 1px 8px;
	letter-spacing: 0.06em;
}

.swg-quiz-wizard .swg-quiz-wiz-step .swg-quiz-h1 {
	font-size: 28px;
	margin: 4px 0 18px;
	letter-spacing: -0.02em;
}

.swg-quiz-wizard .swg-quiz-wiz-step--question .swg-quiz-question-text {
	font-size: 19px;
	font-weight: 600;
	color: var(--swguiq-ink);
	margin-bottom: 16px;
	line-height: 1.4;
}

.swg-quiz-wizard .swg-quiz-wiz-form-feedback {
	margin-top: 12px;
	min-height: 0;
	font-size: 14px;
}
.swg-quiz-wizard .swg-quiz-wiz-form-feedback.swg-quiz-feedback--error {
	color: var(--swguiq-bad);
	padding: 8px 12px;
	background: rgba(179, 45, 58, 0.08);
	border-radius: 6px;
}

.swg-quiz-wizard .swg-quiz-wiz-complete-body {
	margin-top: 8px;
}
.swg-quiz-wizard .swg-quiz-wiz-complete-loading {
	padding: 40px 20px;
	text-align: center;
	color: var(--swguiq-muted);
	font-size: 15px;
}

/* ───────── Step nav ───────── */

.swg-quiz-wizard .swg-quiz-wiz-nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 16px;
	align-items: center;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--swguiq-line);
}
.swg-quiz-wizard .swg-quiz-wiz-nav-left   { justify-self: start; }
.swg-quiz-wizard .swg-quiz-wiz-nav-center { justify-self: center; }
.swg-quiz-wizard .swg-quiz-wiz-nav-right  { justify-self: end; }

/* Every nav button — Previous / Skip / Next — shares the same height, font size,
   and padding so the trio sits on a single horizontal baseline. The earlier
   "shrink the Skip ghost button" override left Skip at 36px next to a 44px Next,
   which made the row look misaligned on step 1 where Previous is hidden. */
.swg-quiz-wizard .swg-quiz-wiz-nav .swg-quiz-btn {
	min-height: 44px;
	font-size: 15px;
	padding: 11px 22px;
}

@media ( max-width: 640px ) {
	.swg-quiz-wizard .swg-quiz-wiz-step { padding: 20px 18px; min-height: 0; }
	.swg-quiz-wizard .swg-quiz-wiz-step .swg-quiz-h1 { font-size: 22px; }
	.swg-quiz-wizard .swg-quiz-wiz-nav {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.swg-quiz-wizard .swg-quiz-wiz-nav-left,
	.swg-quiz-wizard .swg-quiz-wiz-nav-center,
	.swg-quiz-wizard .swg-quiz-wiz-nav-right { justify-self: stretch; }
	.swg-quiz-wizard .swg-quiz-wiz-nav .swg-quiz-btn { width: 100%; justify-content: center; }
}

.swg-quiz-wiz-progress {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--swguiq-muted);
	text-transform: uppercase;
	letter-spacing: 0.10em;
	min-width: 0;
}

.swg-quiz-wiz-progress span { color: var(--swguiq-ink); font-weight: 700; }

.swg-quiz-wiz-bar {
	height: 8px;
	background: rgba(56, 168, 216, 0.08);
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.04);
}

.swg-quiz-wiz-bar i {
	display: block;
	height: 100%;
	background: var(--swguiq-accent-gradient);
	border-radius: 999px;
	box-shadow: 0 0 8px rgba(56, 168, 216, 0.35);
	transition: width .4s cubic-bezier(0.22, 1, 0.36, 1);
}

.swg-quiz-wiz-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--swguiq-line);
}

.swg-quiz-start-cta {
	text-align: left;
}

.swg-quiz-start-cta .swg-quiz-btn { font-size: 16px; padding: 12px 22px; min-height: 48px; }

/* ----------------------------------------------------------- dashboard */

.swg-quiz-dashboard { max-width: 1000px; }

.swg-quiz-dashboard-header {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	margin: 0 0 22px;
	padding: 24px 28px;
	background: var(--swguiq-hero-gradient);
	color: #fff;
	border-radius: 16px;
	box-shadow: var(--swguiq-shadow-lg);
	position: relative;
	overflow: hidden;
}
.swg-quiz-dashboard-header::after {
	content: "";
	position: absolute;
	inset: auto -100px -100px auto;
	width: 300px; height: 300px;
	background: radial-gradient(circle, rgba(56,168,216,0.30) 0%, transparent 62%);
	pointer-events: none;
}
.swg-quiz-dashboard-header > * { position: relative; z-index: 1; }
.swg-quiz-dashboard-header .swg-quiz-h1 { color: #fff; margin: 0; font-size: 26px; }
.swg-quiz-dashboard-header .swg-quiz-muted { color: rgba(255,255,255,0.75); margin: 4px 0 0; }
.swg-quiz-dashboard-header .swg-quiz-link {
	color: rgba(255,255,255,0.9);
	background: rgba(255,255,255,0.10);
	border: 1px solid rgba(255,255,255,0.18);
	padding: 8px 14px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
}
.swg-quiz-dashboard-header .swg-quiz-link:hover { background: rgba(255,255,255,0.16); color: #fff; }

.swg-quiz-dash-section { margin: 26px 0; }

.swg-quiz-module-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
	gap: 16px;
}

.swg-quiz-module-card {
	background: #fff;
	border: 1px solid var(--swguiq-line);
	border-radius: 14px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-shadow: var(--swguiq-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	position: relative;
	overflow: hidden;
}
.swg-quiz-module-card::before {
	content: "";
	position: absolute;
	top: 0; left: 0; bottom: 0;
	width: 4px;
	background: var(--swguiq-line-strong);
	border-top-left-radius: 14px;
	border-bottom-left-radius: 14px;
}
.swg-quiz-module-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--swguiq-shadow-md);
	border-color: var(--swguiq-line-strong);
}
.swg-quiz-module-card.swg-quiz-status--done { border-left: 0; }
.swg-quiz-module-card.swg-quiz-status--done::before { background: var(--swguiq-good); }
.swg-quiz-module-card.swg-quiz-status--prog { border-left: 0; }
.swg-quiz-module-card.swg-quiz-status--prog::before { background: var(--swguiq-accent-gradient); }
.swg-quiz-module-card.swg-quiz-status--idle { border-left: 0; }

.swg-quiz-module-card-eyebrow {
	font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--swguiq-muted); font-weight: 700;
}

.swg-quiz-module-card-title { margin: 0; font-size: 17px; color: var(--swguiq-ink); line-height: 1.3; }

.swg-quiz-module-card-meta {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
	font-size: 13px;
}

.swg-quiz-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px; border-radius: 999px;
	font-size: 11.5px; font-weight: 700; line-height: 1.5;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: #eef2f7; color: var(--swguiq-muted);
}
.swg-quiz-status-pill.swg-quiz-status--done { background: rgba(31,139,76,.14);  color: var(--swguiq-good); }
.swg-quiz-status-pill.swg-quiz-status--prog { background: rgba(56,168,216,.16); color: var(--swguiq-accent-deep); }

/* Tile-card pattern: single primary CTA fills the card footer. Netflix,
   Udemy, Spotify, Stripe app grids all do this — eliminates the "floating
   small button with a halo clipped by overflow:hidden" artifact where a
   text-width inline-flex button's drop shadow (12px blur) bled to the
   right edge of each 300px module tile. Full-width also gives the shadow
   a clean anchor and reads as a deliberate footer, not a floating part. */
.swg-quiz-module-card-actions {
	margin-top: auto;
	display: flex;
}
.swg-quiz-module-card-actions .swg-quiz-btn {
	width: 100%;
	justify-content: center;
}
/* Tone the primary-button glow down inside module tiles — the card already
   carries its own shadow, and stacking a 12px/28% glow on top of a 300px-
   wide tile created visible bloom clipped by the tile's overflow:hidden. */
.swg-quiz-module-card .swg-quiz-btn--primary {
	box-shadow: 0 1px 2px rgba(35, 136, 179, 0.18), 0 2px 6px rgba(56, 168, 216, 0.18);
}
.swg-quiz-module-card .swg-quiz-btn--primary:hover {
	box-shadow: 0 2px 4px rgba(35, 136, 179, 0.22), 0 4px 10px rgba(56, 168, 216, 0.28);
}

.swg-quiz-dashboard-footer {
	margin: 30px 0 8px;
	padding-top: 18px;
	border-top: 1px solid var(--swguiq-line);
}

/* ------------------------------------------------------------ mobile */

@media ( max-width: 640px ) {
	.swg-quiz-app { margin: 0; padding: 12px; }
	.swg-quiz-card,
	.swg-quiz-section,
	.swg-quiz-exam-cta { padding: 16px; }
	.swg-quiz-module-header { padding: 22px 20px 18px; border-radius: 12px; }
	.swg-quiz-module-intro { padding: 12px 14px; }
	.swg-quiz-dashboard-header { padding: 18px 20px; flex-direction: column; align-items: flex-start; }
	.swg-quiz-section::before { position: static; margin-right: 6px; box-shadow: none; }
	.swg-quiz-h1 { font-size: 26px; }
	.swg-quiz-score-pct { width: 130px; height: 130px; font-size: 36px; }
	.swg-quiz-question-list { padding-left: 24px; }
	.swg-quiz-exam-nav { flex-direction: column; }
	.swg-quiz-exam-nav .swg-quiz-btn { width: 100%; justify-content: center; }
	.swg-quiz-skip { flex-direction: column; align-items: stretch; }
}

/* ═════════════════════════════════════════════════════════════════════════
   LESSON CONTENT TYPOGRAPHY + COMPONENTS
   These styles cover the rich HTML inside .swg-quiz-section-body — the
   patterns used by the seed course's lessons (.mock, .card.good/.bad,
   .tag, .callout, .takeaway, .kv, .stepper, .chiprow, .grid2, .grid3, etc.).
   All rules scoped so they can't leak outside the learner view.
   ═════════════════════════════════════════════════════════════════════════ */

.swg-quiz-app .swg-quiz-section-body { font-size: 15px; color: #2a2d33; }
.swg-quiz-app .swg-quiz-section-body p { margin: 10px 0; }
/* Zero first/last child margins so body copy doesn't fight the card's
   own padding — regardless of whether the content opens with a <p>,
   <h2>, list, callout, or mock block. */
.swg-quiz-app .swg-quiz-section-body > *:first-child { margin-top: 0; }
.swg-quiz-app .swg-quiz-section-body > *:last-child  { margin-bottom: 0; }
.swg-quiz-app .swg-quiz-section-body .lead { font-size: 17px; color: #1d1d1f; margin: 0 0 14px; line-height: 1.45; }
.swg-quiz-app .swg-quiz-section-body h2 { font-size: 20px; margin: 22px 0 8px; letter-spacing: -0.01em; }
.swg-quiz-app .swg-quiz-section-body h3 { font-size: 16px; margin: 18px 0 6px; }
.swg-quiz-app .swg-quiz-section-body h4 { font-size: 14px; margin: 14px 0 6px; }
.swg-quiz-app .swg-quiz-section-body ul,
.swg-quiz-app .swg-quiz-section-body ol { margin: 8px 0 12px; padding-left: 22px; }
.swg-quiz-app .swg-quiz-section-body li { margin: 4px 0; }

/* Callouts and takeaways — ambient wrappers around an idea. */
.swg-quiz-app .swg-quiz-section-body .callout {
	background: #f2f8fc;
	border: 1px solid #c4e2f1;
	border-left: 3px solid var(--swguiq-accent);
	padding: 12px 16px;
	border-radius: 10px;
	margin: 14px 0;
}
.swg-quiz-app .swg-quiz-section-body .callout b { color: var(--swguiq-accent-deep); }

.swg-quiz-app .swg-quiz-section-body .takeaway {
	background: linear-gradient(90deg, rgba(56,168,216,0.08), rgba(31,139,76,0.06));
	border: 1px solid #c4e2f1;
	border-radius: 10px;
	padding: 12px 14px;
	margin-top: 14px;
	color: #1a3a52;
}
.swg-quiz-app .swg-quiz-section-body .takeaway b { color: var(--swguiq-accent-deep); }

/* Good / bad example cards — light theme, colored border. */
.swg-quiz-app .swg-quiz-section-body .card {
	background: #ffffff;
	border: 1px solid var(--swguiq-line);
	border-radius: 12px;
	padding: 14px;
	box-shadow: var(--swguiq-shadow);
}
.swg-quiz-app .swg-quiz-section-body .card.good {
	border-color: #bfe2c6;
	background: linear-gradient(180deg, rgba(31,139,76,0.04), transparent 30%), #ffffff;
}
.swg-quiz-app .swg-quiz-section-body .card.bad {
	border-color: #f2c0c7;
	background: linear-gradient(180deg, rgba(179,45,58,0.04), transparent 30%), #ffffff;
}
.swg-quiz-app .swg-quiz-section-body .card.tip {
	border-color: #c4e2f1;
	background: linear-gradient(180deg, rgba(56,168,216,0.05), transparent 30%), #ffffff;
}
.swg-quiz-app .swg-quiz-section-body .card h4 { margin: 0 0 6px; }

/* Tag chips for labeling good/bad/tip cards. */
.swg-quiz-app .swg-quiz-section-body .tag {
	font-size: 11px;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
	display: inline-block;
	margin-bottom: 8px;
	border: 1px solid transparent;
}
.swg-quiz-app .swg-quiz-section-body .tag.good { background: #e9f7ee; color: #1f8b4c; border-color: #bfe2c6; }
.swg-quiz-app .swg-quiz-section-body .tag.bad  { background: #fbecef; color: #b32d3a; border-color: #f2c0c7; }
.swg-quiz-app .swg-quiz-section-body .tag.tip  { background: #eaf4fb; color: var(--swguiq-accent-deep); border-color: #c4e2f1; }

/* Key-value blocks (compact labeled facts). */
.swg-quiz-app .swg-quiz-section-body .kv {
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 6px 14px;
	font-size: 14px;
	color: #3a3d44;
	margin: 10px 0;
}
.swg-quiz-app .swg-quiz-section-body .kv b { color: var(--swguiq-ink); }

/* Grids. */
.swg-quiz-app .swg-quiz-section-body .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.swg-quiz-app .swg-quiz-section-body .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 12px 0; }
.swg-quiz-app .swg-quiz-section-body .row2  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Chip rows (small inline tags). */
.swg-quiz-app .swg-quiz-section-body .chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.swg-quiz-app .swg-quiz-section-body .chiprow .c,
.swg-quiz-app .swg-quiz-section-body .chip {
	background: #eef2f7;
	border: 1px solid var(--swguiq-line);
	color: #2a2d33;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 12px;
}

/* Stepper (progress steps). */
.swg-quiz-app .swg-quiz-section-body .stepper { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.swg-quiz-app .swg-quiz-section-body .stepper .step { flex: 1; height: 6px; background: #e7eaf0; border-radius: 999px; }
.swg-quiz-app .swg-quiz-section-body .stepper .step.done { background: var(--swguiq-good); }
.swg-quiz-app .swg-quiz-section-body .stepper .step.curr { background: var(--swguiq-accent); }

/* Tables used in lessons. */
.swg-quiz-app .swg-quiz-section-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.swg-quiz-app .swg-quiz-section-body th,
.swg-quiz-app .swg-quiz-section-body td { border: 1px solid var(--swguiq-line); padding: 8px 10px; text-align: left; }
.swg-quiz-app .swg-quiz-section-body th { background: #f6f8fb; color: var(--swguiq-ink); font-weight: 600; }

/* Code + preformatted. */
.swg-quiz-app .swg-quiz-section-body code,
.swg-quiz-app .swg-quiz-section-body kbd {
	background: #f4f6fa;
	border: 1px solid var(--swguiq-line);
	padding: 1px 6px;
	border-radius: 5px;
	font-size: 13px;
	color: #2a2d33;
}
.swg-quiz-app .swg-quiz-section-body pre {
	background: #0b0d12;
	border: 1px solid #1a1f2d;
	color: #c7d1e8;
	padding: 14px;
	border-radius: 10px;
	overflow-x: auto;
}
.swg-quiz-app .swg-quiz-section-body pre code { background: transparent; border: 0; color: inherit; padding: 0; }

/* Lesson chips — the "5 min" / "Orientation" labels above each lesson body. */
.swg-quiz-app .swg-quiz-section-body .swg-quiz-chips { margin: 0 0 10px; }
.swg-quiz-app .swg-quiz-section-body .swg-quiz-chip {
	display: inline-block;
	background: #eef2f7;
	border: 1px solid var(--swguiq-line);
	color: var(--swguiq-muted);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-right: 6px;
}

/* ────── Mock UI previews ──────
   .mock blocks represent actual app screens. Converted from dark-screenshot
   aesthetic to light theme so the mocks sit naturally inside the light
   lesson-page surround instead of creating a hard dark "hole" that visually
   pulled attention away from the lesson copy. Inline styles inside .mock
   are preserved by wp_kses + safe_style_css. `overflow: hidden` keeps any
   theme button shadows from bleeding outside the card. */
.swg-quiz-app .swg-quiz-section-body .mock {
	background: #f7f9fc;
	border: 1px solid #d9dfe8;
	border-radius: 10px;
	/* 14px was too tight — content pressed against the mock's border,
	   which read as "amateur screenshot crop" in a UX course. 18px/20px
	   gives every child (tree diagrams, button previews, form rows, chip
	   rows) proper breathing room from the edges. */
	padding: 18px 20px;
	color: #2a2d33;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	margin: 10px 0;
	overflow: hidden;
	position: relative;
}
.swg-quiz-app .swg-quiz-section-body .mock b { color: #1d1d1f; }
.swg-quiz-app .swg-quiz-section-body .mock .input {
	display: block;
	width: 100%;
	padding: 9px 10px;
	border-radius: 8px;
	border: 1px solid #cfd7e1;
	background: #ffffff;
	color: #1d1d1f;
	margin: 4px 0 10px;
	font-size: 14px;
	box-shadow: none;
	outline: none;
}
.swg-quiz-app .swg-quiz-section-body .mock .input.err { border-color: #e05260; background: #fff4f6; }
.swg-quiz-app .swg-quiz-section-body .mock .label { font-size: 12px; color: #6c757d; display: block; margin-top: 6px; }
.swg-quiz-app .swg-quiz-section-body .mock .btn {
	display: inline-block;
	padding: 9px 14px;
	border-radius: 8px;
	border: 0;
	background: #38a8d8;
	color: #0b1f2b;
	font-weight: 600;
	cursor: default;
	font-size: 14px;
	text-decoration: none;
	/* Defenses against theme-level button styling leaking into the mock preview.
	   Many WP themes (2024 defaults included) put box-shadow/outline/transform
	   on every <button>, which spills outside the mock card. */
	box-shadow: none;
	outline: none;
	text-shadow: none;
	transform: none;
	line-height: 1.2;
	letter-spacing: 0;
	min-height: 0;
	min-width: 0;
	margin: 0;
	text-transform: none;
}
.swg-quiz-app .swg-quiz-section-body .mock .btn:hover,
.swg-quiz-app .swg-quiz-section-body .mock .btn:focus,
.swg-quiz-app .swg-quiz-section-body .mock .btn:active {
	/* Mocks are screenshots, not interactive — freeze all hover/focus state. */
	background: #38a8d8;
	color: #0b1f2b;
	box-shadow: none;
	outline: none;
	transform: none;
}
.swg-quiz-app .swg-quiz-section-body .mock .btn.secondary,
.swg-quiz-app .swg-quiz-section-body .mock .btn.secondary:hover,
.swg-quiz-app .swg-quiz-section-body .mock .btn.secondary:focus { background: #e6ecf3; color: #2a2d33; border: 1px solid #cfd7e1; }
.swg-quiz-app .swg-quiz-section-body .mock .btn.danger,
.swg-quiz-app .swg-quiz-section-body .mock .btn.danger:hover,
.swg-quiz-app .swg-quiz-section-body .mock .btn.danger:focus { background: #d93848; color: #ffffff; }
.swg-quiz-app .swg-quiz-section-body .mock .row { display: flex; gap: 8px; align-items: center; margin: 12px 6px 4px; flex-wrap: wrap; }
/* Defensive reset — themes sometimes style every <input>/<button>/<label> globally. */
.swg-quiz-app .swg-quiz-section-body .mock input,
.swg-quiz-app .swg-quiz-section-body .mock button,
.swg-quiz-app .swg-quiz-section-body .mock select,
.swg-quiz-app .swg-quiz-section-body .mock textarea {
	font-family: inherit;
	letter-spacing: 0;
	text-transform: none;
	max-width: 100%;
}
.swg-quiz-app .swg-quiz-section-body .mock input:focus,
.swg-quiz-app .swg-quiz-section-body .mock input:focus-visible {
	outline: none;
	box-shadow: none;
}
.swg-quiz-app .swg-quiz-section-body .mock .toast {
	border-radius: 8px;
	padding: 8px 12px;
	background: #e8f5ed;
	color: #1f6b45;
	border: 1px solid #b6ddc6;
	font-size: 13px;
}
.swg-quiz-app .swg-quiz-section-body .mock .toast.err { background: #fdeef1; color: #a21f33; border-color: #eab3bd; }
.swg-quiz-app .swg-quiz-section-body .mock .skeleton {
	height: 10px;
	background: linear-gradient(90deg, #eef2f7, #c8d2e0, #eef2f7);
	background-size: 200% 100%;
	border-radius: 6px;
	margin: 6px 0;
	animation: swguiqSk 1.2s infinite linear;
}
@keyframes swguiqSk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.swg-quiz-app .swg-quiz-section-body .mock .bar {
	height: 8px;
	background: #e6ecf3;
	border-radius: 999px;
	overflow: hidden;
}
.swg-quiz-app .swg-quiz-section-body .mock .bar i { display: block; height: 100%; background: #38a8d8; width: 62%; }
.swg-quiz-app .swg-quiz-section-body .mock .small { font-size: 12px; color: #6c757d; }
.swg-quiz-app .swg-quiz-section-body .mock .chiprow .c {
	background: #eef2f7;
	border: 1px solid #dfe5ed;
	color: #2a2d33;
}

/* Responsive overrides for rich content. */
@media ( max-width: 640px ) {
	.swg-quiz-app .swg-quiz-section-body .grid2,
	.swg-quiz-app .swg-quiz-section-body .grid3,
	.swg-quiz-app .swg-quiz-section-body .row2 { grid-template-columns: 1fr; }
	.swg-quiz-app .swg-quiz-section-body .kv { grid-template-columns: 1fr; }
}

/* =====================================================================
   v2.6.2 (Phase 3 of SWG What's Wrong merge) — live_bug_flag question
   type chrome + sandbox styles. The sandbox CSS is intentionally scoped
   under .swgww-sandbox-pc-* (NOT .swg-quiz-*) so it reads to the learner
   as a separate "app being inspected" instead of an Academy UI surface.
   The plugin's own toolbar / panel / history all use .swg-quiz-lbf-*.
   ===================================================================== */

.swg-quiz-app .swg-quiz-question--live-bug-flag {
	background: #ffffff;
	border: 1px solid #e1e5ea;
	border-radius: 6px;
	padding: 16px;
	margin-bottom: 20px;
}

.swg-quiz-app .swg-quiz-lbf-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 12px 0 16px 0;
	padding: 8px 12px;
	background: #f7f9fa;
	border: 1px solid #e1e5ea;
	border-radius: 4px;
}
.swg-quiz-app .swg-quiz-lbf-mode-toggle.is-active {
	background: #1d6588;
	color: #ffffff;
	border-color: #1d6588;
}
.swg-quiz-app .swg-quiz-lbf-status {
	flex: 1 1 auto;
	color: #6b7280;
	font-size: 13px;
}
.swg-quiz-app .swg-quiz-lbf-count {
	color: #1d6588;
	font-weight: 700;
	font-size: 13px;
}

.swg-quiz-app .swg-quiz-lbf-sandbox-frame {
	border: 2px solid #38A8D8;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 16px;
}

/* When report mode is on, signal it: cursor + thin outline on hover. */
.swg-quiz-app .swgww-sandbox-root.swg-quiz-lbf-mode-on {
	cursor: crosshair;
}
.swg-quiz-app .swgww-sandbox-root.swg-quiz-lbf-mode-on .swg-quiz-lbf-hover {
	outline: 2px solid #d63638 !important;
	outline-offset: 1px;
}

.swg-quiz-app .swg-quiz-lbf-panel {
	background: #f7f9fa;
	border: 1px solid #e1e5ea;
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 12px;
}
.swg-quiz-app .swg-quiz-lbf-panel[hidden] {
	display: none;
}
.swg-quiz-app .swg-quiz-lbf-panel-title {
	margin: 0 0 8px 0;
	color: #1d6588;
	font-size: 15px;
	font-weight: 700;
}
.swg-quiz-app .swg-quiz-lbf-panel-selector {
	margin: 0 0 12px 0;
	font-size: 12px;
	color: #6b7280;
}
.swg-quiz-app .swg-quiz-lbf-panel-selector code {
	background: #ffffff;
	padding: 2px 6px;
	border: 1px solid #e1e5ea;
	border-radius: 3px;
	font-size: 12px;
	color: #1d2327;
}
.swg-quiz-app .swg-quiz-lbf-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.swg-quiz-app .swg-quiz-lbf-form .swg-quiz-lbf-label:last-of-type {
	grid-column: 1 / -1;
}
.swg-quiz-app .swg-quiz-lbf-label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: #1d2327;
	font-size: 13px;
	font-weight: 600;
}
.swg-quiz-app .swg-quiz-lbf-label select,
.swg-quiz-app .swg-quiz-lbf-label textarea {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #e1e5ea;
	border-radius: 3px;
	background: #ffffff;
	color: #1d2327;
	font-size: 14px;
	font-family: inherit;
}
.swg-quiz-app .swg-quiz-lbf-req {
	color: #d63638;
}
.swg-quiz-app .swg-quiz-lbf-actions {
	grid-column: 1 / -1;
	display: flex;
	gap: 8px;
	margin-top: 4px;
}
.swg-quiz-app .swg-quiz-lbf-panel-feedback {
	margin: 12px 0 0 0;
	font-size: 13px;
	min-height: 1.2em;
}
.swg-quiz-app .swg-quiz-lbf-panel-feedback--pending { color: #6b7280; }
.swg-quiz-app .swg-quiz-lbf-panel-feedback--success { color: #10b981; }
.swg-quiz-app .swg-quiz-lbf-panel-feedback--error   { color: #d63638; }

.swg-quiz-app .swg-quiz-lbf-history {
	list-style: none;
	margin: 0;
	padding: 0;
}
.swg-quiz-app .swg-quiz-lbf-history-item {
	background: #f7f9fa;
	border-left: 3px solid #38A8D8;
	padding: 6px 10px;
	margin-bottom: 4px;
	font-size: 13px;
	color: #1d2327;
}
.swg-quiz-app .swg-quiz-lbf-history-item code {
	color: #6b7280;
	font-size: 12px;
}

@media (max-width: 600px) {
	.swg-quiz-app .swg-quiz-lbf-form {
		grid-template-columns: 1fr;
	}
}

/* =====================================================================
   v2.6.2 — Forked Pest Control inspection screen sandbox styles.
   Ported from SWG What's Wrong v1.0.5 candidate.css (.swgww-sandbox-pc-*).
   PB-01, PB-04, PB-11, PB-12 visual bugs intentionally rendered through
   the CSS (low contrast, hover-only row actions, empty photo grid).
   ===================================================================== */

.swgww-sandbox-pc {
	background: #fafbfc;
	color: #222;
	font-family: -apple-system, system-ui, sans-serif;
	font-size: 14px;
	padding: 16px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #ddd;
}
.swgww-sandbox-pc .swgww-sandbox-pc-h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a4d6e;
	display: inline-block;
	margin-right: 12px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-h3 {
	color: #1a4d6e;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px 0;
}
/* PB-11: status pill is decorative bright accent with WHITE text (low contrast). */
.swgww-sandbox-pc .swgww-sandbox-pc-status-pill {
	display: inline-block;
	background: #38A8D8;
	color: #ffffff;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
}
.swgww-sandbox-pc .swgww-sandbox-pc-tech,
.swgww-sandbox-pc .swgww-sandbox-pc-date {
	color: #666;
	font-size: 13px;
	margin-left: 12px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-kpi-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-kpi-tile {
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 14px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-kpi-label {
	display: block;
	color: #666;
	font-size: 12px;
	margin-bottom: 4px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-kpi-number {
	display: block;
	color: #1a4d6e;
	font-size: 22px;
	font-weight: 700;
}
.swgww-sandbox-pc .swgww-sandbox-pc-card {
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 16px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-field-row { margin-bottom: 12px; }
.swgww-sandbox-pc .swgww-sandbox-pc-label {
	display: block;
	color: #444;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 13px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-text { color: #222; margin: 0; }
.swgww-sandbox-pc .swgww-sandbox-pc-select {
	width: 100%;
	padding: 6px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #ffffff;
	color: #222;
}
.swgww-sandbox-pc .swgww-sandbox-pc-table {
	width: 100%;
	border-collapse: collapse;
}
.swgww-sandbox-pc .swgww-sandbox-pc-table th,
.swgww-sandbox-pc .swgww-sandbox-pc-table td {
	padding: 8px;
	border-bottom: 1px solid #eee;
	text-align: left;
}
.swgww-sandbox-pc .swgww-sandbox-pc-table th {
	color: #1a4d6e;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
}
.swgww-sandbox-pc .swgww-sandbox-pc-bulk-row { margin-top: 12px; display: flex; gap: 8px; }
.swgww-sandbox-pc .swgww-sandbox-pc-button {
	padding: 6px 14px;
	border: 1px solid #ccc;
	background: #ffffff;
	color: #222;
	border-radius: 3px;
	cursor: pointer;
}
/* PB-01: Save button is WHITE on BRIGHT ACCENT (#38A8D8). Fails AA. */
.swgww-sandbox-pc .swgww-sandbox-pc-button-primary {
	padding: 8px 18px;
	border: 1px solid #38A8D8;
	background: #38A8D8;
	color: #ffffff;
	border-radius: 3px;
	font-weight: 700;
	cursor: pointer;
}
/* PB-04: Row actions only visible on hover (touch unreachable). */
.swgww-sandbox-pc .row-action {
	color: #1a4d6e;
	cursor: pointer;
	margin-right: 8px;
	text-decoration: underline;
	visibility: hidden;
}
.swgww-sandbox-pc tr:hover .row-action { visibility: visible; }
/* PB-12: Photo grid is empty without any empty-state copy. */
.swgww-sandbox-pc .swgww-sandbox-pc-photo-grid {
	min-height: 80px;
	border: 1px dashed #ccc;
	border-radius: 3px;
	background: #fafbfc;
}
.swgww-sandbox-pc .swgww-sandbox-pc-actions {
	margin-top: 16px;
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
.swgww-sandbox-pc .swgww-sandbox-pc-form { display: flex; gap: 8px; }
