/* Smarty PANCE App — Phase 1 Stylesheet
   Mobile-first (320px–430px zero horizontal scroll), Capacitor-ready, WCAG AA >= 4.5:1 */

:root {
	--sp-navy: #1B3A5C;
	--sp-navy-dark: #132B45;
	--sp-gold: #FFC857;
	--sp-gold-hover: #F6BC42;
	--sp-gold-soft: #FFF6DF;
	--sp-gold-border: #F2BE4B;
	--sp-ink: #0F2440;
	--sp-muted: #5B6B7F;
	--sp-header-sub: #D2DFEE;
	--sp-bg: #F3F5F8;
	--sp-card: #FFFFFF;
	--sp-tint: #E8EEF6;
	--sp-border: #DCE4EE;
	--sp-correct-fg: #15803D;
	--sp-correct-bg: #ECFDF3;
	--sp-correct-border: #86EFAC;
	--sp-wrong-fg: #B91C1C;
	--sp-wrong-bg: #FEF2F2;
	--sp-wrong-border: #FCA5A5;
	--sp-weak: #C2410C;
	--sp-strong: #1D6FB8;
	--sp-radius: 16px;
	--sp-radius-lg: 18px;
	--sp-shadow: 0 2px 10px rgba(15, 36, 64, 0.06), 0 1px 2px rgba(15, 36, 64, 0.04);
	--sp-shadow-lg: 0 12px 32px rgba(15, 36, 64, 0.16);
	--sp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
	background-color: var(--sp-bg);
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}

.sp-app-root {
	width: 100%;
	max-width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	overflow-x: hidden;
}

.sp-shell {
	width: 100%;
	max-width: 480px;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	background-color: var(--sp-bg);
	display: flex;
	flex-direction: column;
	position: relative;
	overflow-x: hidden;
}

@media (min-width: 520px) {
	body {
		background-color: #E2E8F0;
	}
	.sp-shell {
		box-shadow: 0 0 40px rgba(15, 36, 64, 0.12);
	}
}

/* Focus visibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--sp-navy);
	outline-offset: 2px;
}

.sp-header button:focus-visible,
.sp-header a:focus-visible {
	outline-color: var(--sp-gold);
}

/* Boot & Loading */
.sp-boot-screen {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	background: var(--sp-bg);
	color: var(--sp-muted);
	font-size: 0.9375rem;
}

.sp-boot-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid var(--sp-tint);
	border-top-color: var(--sp-navy);
	border-radius: 50%;
	animation: sp-spin 0.75s linear infinite;
}

@keyframes sp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Navy Header Block */
.sp-header {
	background-color: var(--sp-navy);
	color: #FFFFFF;
	padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 18px;
}

.sp-header-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.sp-header-copy {
	min-width: 0;
	flex: 1;
}

.sp-header-eyebrow {
	display: block;
	color: var(--sp-gold);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.sp-header-title {
	margin: 0;
	color: #FFFFFF;
	font-size: 1.5rem; /* 24px */
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.015em;
	overflow-wrap: anywhere;
}

@media (min-width: 375px) {
	.sp-header-title {
		font-size: 1.5625rem; /* 25px */
	}
}

.sp-header-sub {
	margin: 6px 0 0;
	color: var(--sp-header-sub);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.sp-avatar-btn {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border-radius: 999px;
	border: 1.5px solid rgba(255, 200, 87, 0.65);
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	font-family: var(--sp-font);
	font-size: 0.875rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.sp-avatar-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.sp-icon-btn {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border-radius: 12px;
	border: 1px solid var(--sp-border);
	background: var(--sp-card);
	color: var(--sp-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.sp-icon-btn.is-active {
	background: var(--sp-tint);
	border-color: var(--sp-navy);
	color: var(--sp-navy);
}

/* Main Content Area */
.sp-main {
	flex: 1;
	width: 100%;
	padding: 16px 14px calc(84px + env(safe-area-inset-bottom, 0px));
	display: flex;
	flex-direction: column;
	gap: 14px;
}

@media (min-width: 375px) {
	.sp-main {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* Cards */
.sp-card {
	background: var(--sp-card);
	border-radius: var(--sp-radius-lg);
	padding: 16px;
	box-shadow: var(--sp-shadow);
	border: 1px solid rgba(15, 36, 64, 0.05);
	width: 100%;
	min-width: 0;
}

.sp-card-gold {
	background: linear-gradient(180deg, #FFE08D 0%, var(--sp-gold) 100%);
	color: var(--sp-ink);
	border: 1px solid #EAB03A;
}

.sp-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.sp-card-title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-card-kicker {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--sp-ink);
	opacity: 0.82;
	margin-bottom: 2px;
}

/* Buttons & Links */
.sp-btn {
	min-height: 46px;
	padding: 11px 16px;
	border-radius: 12px;
	font-family: var(--sp-font);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	border: 1px solid transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.15s ease, transform 0.06s ease;
	min-width: 0;
	max-width: 100%;
}

.sp-btn:active {
	transform: translateY(1px);
}

.sp-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.sp-btn-block {
	width: 100%;
}

.sp-btn-navy {
	background-color: var(--sp-navy);
	color: #FFFFFF;
}

.sp-btn-navy:hover:not(:disabled) {
	background-color: var(--sp-navy-dark);
}

.sp-btn-gold {
	background-color: var(--sp-gold);
	color: var(--sp-ink);
	border-color: #E8B13D;
}

.sp-btn-gold:hover:not(:disabled) {
	background-color: var(--sp-gold-hover);
}

.sp-btn-secondary {
	background-color: var(--sp-tint);
	color: var(--sp-navy);
	border-color: #CFDAE8;
}

.sp-btn-secondary:hover:not(:disabled) {
	background-color: #DCE6F3;
}

.sp-btn-outline {
	background-color: #FFFFFF;
	color: var(--sp-ink);
	border-color: var(--sp-border);
}

.sp-btn-outline:hover:not(:disabled) {
	background-color: var(--sp-bg);
}

.sp-text-btn {
	min-height: 44px;
	min-width: 44px;
	padding: 6px 10px;
	background: transparent;
	border: none;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	text-decoration: none;
	border-radius: 10px;
}

.sp-text-btn:hover {
	background: var(--sp-tint);
}

/* Badges & Tags */
.sp-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-size: 0.75rem;
	font-weight: 700;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-tag-dark {
	background: rgba(15, 36, 64, 0.12);
	color: var(--sp-ink);
}

.sp-plan-mins {
	white-space: nowrap;
	flex-shrink: 0;
}

.sp-study-result {
	scroll-margin-top: 14px;
}

/* Sign-in / No-Access Screen */
.sp-auth-screen {
	min-height: 100vh;
	min-height: 100dvh;
	padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: linear-gradient(180deg, var(--sp-navy) 0%, #122841 52%, var(--sp-bg) 52%);
}

.sp-auth-card {
	width: 100%;
	max-width: 390px;
	background: var(--sp-card);
	border-radius: 20px;
	padding: 28px 22px 24px;
	box-shadow: var(--sp-shadow-lg);
	text-align: center;
}

.sp-logo-mark {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 18px;
	background: var(--sp-navy);
	color: var(--sp-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 6px 16px rgba(27, 58, 92, 0.24);
}

.sp-logo-mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sp-auth-brand {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--sp-ink);
	letter-spacing: -0.02em;
}

.sp-auth-tagline {
	margin: 6px 0 22px;
	color: var(--sp-muted);
	font-size: 0.9375rem;
	font-weight: 500;
}

.sp-auth-secondary-link {
	margin-top: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 12px;
	color: var(--sp-navy);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sp-auth-form {
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sp-auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sp-auth-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sp-ink);
	letter-spacing: 0.01em;
}

.sp-auth-input {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: var(--sp-ink);
	background: #F8FAFC;
	border: 1.5px solid #D8E0EB;
	border-radius: 12px;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.sp-auth-input::placeholder {
	color: #94A3B8;
}

.sp-auth-input:focus {
	background: #FFFFFF;
	border-color: var(--sp-navy);
	box-shadow: 0 0 0 3px rgba(27, 58, 92, 0.14);
}

.sp-auth-pwd-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.sp-auth-input-pwd {
	padding-right: 48px;
}

.sp-auth-pwd-toggle {
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 10px;
	color: #64748B;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.sp-auth-pwd-toggle.is-visible,
.sp-auth-pwd-toggle:active {
	color: var(--sp-navy);
}

.sp-auth-error {
	padding: 11px 13px;
	border-radius: 11px;
	background: #FEF2F2;
	border: 1px solid #FECACA;
	color: #B91C1C;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
}

.sp-auth-submit {
	margin-top: 4px;
	min-height: 48px;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 700;
}

.sp-auth-submit:disabled {
	opacity: 0.7;
	cursor: default;
}

.sp-auth-forgot {
	margin-top: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 6px 12px;
	color: var(--sp-muted);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.sp-auth-forgot:active {
	color: var(--sp-navy);
}

/* Today's Plan Checklist */
.sp-plan-list {
	list-style: none;
	margin: 12px 0 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-plan-item-btn {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(15, 36, 64, 0.1);
	background: rgba(255, 255, 255, 0.92);
	color: var(--sp-ink);
	font-family: var(--sp-font);
	text-align: left;
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.sp-plan-item-btn.is-done {
	background: rgba(255, 255, 255, 0.68);
}

.sp-plan-check {
	width: 22px;
	height: 22px;
	border-radius: 999px;
	border: 2px solid var(--sp-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	flex-shrink: 0;
}

.sp-plan-item-btn.is-done .sp-plan-check {
	background: var(--sp-correct-fg);
	border-color: var(--sp-correct-fg);
}

.sp-plan-label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-plan-item-btn.is-done .sp-plan-label {
	text-decoration: line-through;
	color: var(--sp-muted);
}

.sp-plan-type {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--sp-navy);
	background: var(--sp-tint);
	padding: 3px 8px;
	border-radius: 999px;
	text-transform: capitalize;
}

/* Weak Systems Bars */
.sp-weak-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sp-weak-row {
	width: 100%;
	min-height: 44px;
	padding: 6px 4px;
	background: none;
	border: none;
	text-align: left;
	font-family: var(--sp-font);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-radius: 10px;
}

.sp-weak-row:hover {
	background: var(--sp-bg);
}

.sp-weak-meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}

.sp-weak-name {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-weak-pct {
	font-size: 0.875rem;
	font-weight: 700;
	flex-shrink: 0;
}

.sp-weak-pct.is-low {
	color: var(--sp-weak);
}

.sp-weak-pct.is-strong {
	color: var(--sp-strong);
}

.sp-bar-track {
	width: 100%;
	height: 8px;
	background: #CBD5E1;
	border-radius: 999px;
	overflow: hidden;
}

.sp-bar-fill {
	height: 100%;
	border-radius: 999px;
	transition: width 0.25s ease;
}

.sp-bar-fill.is-weak {
	background-color: var(--sp-weak);
}

.sp-bar-fill.is-strong {
	background-color: var(--sp-strong);
}

.sp-bar-fill.is-gold {
	background-color: #D97706;
}

.sp-header .sp-bar-fill.is-gold {
	background-color: var(--sp-gold);
}

/* Two-Tile Row on Today */
.sp-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
}

.sp-tile {
	background: var(--sp-card);
	border-radius: var(--sp-radius);
	padding: 14px;
	box-shadow: var(--sp-shadow);
	border: 1px solid rgba(15, 36, 64, 0.05);
	min-height: 96px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	text-align: left;
	font-family: var(--sp-font);
}

button.sp-tile {
	cursor: pointer;
}

button.sp-tile:hover {
	border-color: var(--sp-navy);
}

.sp-tile-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--sp-tint);
	color: var(--sp-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
}

.sp-tile-value {
	font-size: 1.375rem;
	font-weight: 800;
	color: var(--sp-ink);
	line-height: 1.15;
}

.sp-tile-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sp-muted);
	margin-top: 2px;
}

/* Push Opt-In Banner */
.sp-push-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--sp-card);
	border: 1px solid #C9D8EA;
}

.sp-push-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.sp-push-copy {
	min-width: 0;
	flex: 1;
}

.sp-push-copy h3 {
	margin: 0 0 3px;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--sp-ink);
}

.sp-push-copy p {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--sp-muted);
}

/* Search & Form Controls */
.sp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	min-width: 0;
}

.sp-label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sp-ink);
}

.sp-search-wrap {
	position: relative;
	width: 100%;
}

.sp-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--sp-muted);
	pointer-events: none;
	display: flex;
}

.sp-input,
.sp-select,
.sp-textarea {
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1.5px solid #6E8098;
	background: #FFFFFF;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 1rem; /* >=16px prevents iOS Safari zoom on focus */
}

input::placeholder,
textarea::placeholder {
	color: var(--sp-muted);
	opacity: 1;
}

input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.sp-input-search {
	padding-left: 40px;
	padding-right: 40px;
}

.sp-search-clear {
	position: absolute;
	right: 2px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	background: transparent;
	border: none;
	color: var(--sp-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.sp-textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.5;
}

.sp-autocomplete {
	margin-top: 6px;
	background: #FFFFFF;
	border: 1px solid var(--sp-border);
	border-radius: 14px;
	box-shadow: var(--sp-shadow-lg);
	overflow: hidden;
	list-style: none;
	padding: 4px;
}

.sp-autocomplete-btn {
	width: 100%;
	min-height: 44px;
	padding: 9px 12px;
	border: none;
	background: transparent;
	border-radius: 10px;
	text-align: left;
	font-family: var(--sp-font);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sp-autocomplete-btn:hover,
.sp-autocomplete-btn:focus-visible {
	background: var(--sp-tint);
}

.sp-autocomplete-topic {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

/* Chips */
.sp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
}

.sp-chip {
	min-height: 44px;
	padding: 8px 13px;
	border-radius: 999px;
	border: 1px solid #CFDCEB;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-chip.is-active {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
	color: #FFFFFF;
}

.sp-chip-surprise {
	background: var(--sp-gold-soft);
	border-color: var(--sp-gold-border);
	color: var(--sp-ink);
	font-weight: 700;
}

/* Segmented Options (Burst count 5 / 10 / 20) */
.sp-segmented {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.sp-seg-btn {
	min-height: 46px;
	border-radius: 12px;
	border: 1.5px solid var(--sp-border);
	background: #FFFFFF;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 0.9375rem;
	font-weight: 700;
	cursor: pointer;
}

.sp-seg-btn.is-selected {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
	color: #FFFFFF;
}

/* Switch / Checkbox Row */
.sp-toggle-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 8px 0;
}

.sp-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	cursor: pointer;
	min-width: 0;
	flex: 1;
}

.sp-checkbox-input {
	width: 22px;
	height: 22px;
	min-width: 22px;
	accent-color: var(--sp-navy);
	cursor: pointer;
	margin: 0;
}

/* Question Player */
.sp-player-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.sp-player-counter {
	font-size: 0.875rem;
	font-weight: 700;
	color: #FFFFFF;
}

.sp-player-timer {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: var(--sp-gold);
	font-size: 0.8125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.sp-stem {
	font-size: 1rem;
	line-height: 1.55;
	color: var(--sp-ink);
	margin: 0 0 14px;
	overflow-wrap: anywhere;
}

.sp-question-img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 0 0 14px;
	border: 1px solid var(--sp-border);
}

.sp-choices {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.sp-choice-btn {
	width: 100%;
	min-height: 52px;
	padding: 11px 12px;
	border-radius: 14px;
	border: 1.5px solid var(--sp-border);
	background: #FFFFFF;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 0.9375rem;
	line-height: 1.4;
	text-align: left;
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.sp-choice-btn:hover:not(:disabled) {
	border-color: var(--sp-navy);
	background: #F9FBFD;
}

.sp-choice-letter {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-size: 0.8125rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sp-choice-text {
	min-width: 0;
	overflow-wrap: anywhere;
	font-weight: 500;
}

.sp-choice-btn.is-selected {
	border-color: var(--sp-navy);
	background: var(--sp-tint);
}

.sp-choice-btn.is-selected .sp-choice-letter {
	background: var(--sp-navy);
	color: #FFFFFF;
}

.sp-choice-btn.is-correct {
	border-color: var(--sp-correct-fg);
	background: var(--sp-correct-bg);
	color: var(--sp-ink);
}

.sp-choice-btn.is-correct .sp-choice-letter {
	background: var(--sp-correct-fg);
	color: #FFFFFF;
}

.sp-choice-btn.is-wrong {
	border-color: var(--sp-wrong-fg);
	background: var(--sp-wrong-bg);
	color: var(--sp-ink);
}

.sp-choice-btn.is-wrong .sp-choice-letter {
	background: var(--sp-wrong-fg);
	color: #FFFFFF;
}

/* Explanation Box */
.sp-explanation {
	border-radius: var(--sp-radius);
	padding: 15px;
	border: 1px solid var(--sp-border);
	background: #FFFFFF;
}

.sp-explanation.is-correct {
	border-color: var(--sp-correct-border);
	background: var(--sp-correct-bg);
}

.sp-explanation.is-wrong {
	border-color: var(--sp-wrong-border);
	background: #FFFDFD;
}

.sp-result-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	font-size: 0.9375rem;
	font-weight: 800;
	margin-bottom: 10px;
}

.sp-result-banner-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.sp-result-banner.is-correct {
	color: var(--sp-correct-fg);
}

.sp-result-banner.is-wrong {
	color: var(--sp-wrong-fg);
}

.sp-result-next-btn {
	min-height: 44px;
	min-width: 44px;
	padding: 6px 12px;
	border-radius: 10px;
	border: none;
	background: var(--sp-navy);
	color: #FFFFFF;
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
}

.sp-result-next-btn:hover {
	background: var(--sp-navy-dark);
}

/* Rich HTML sanitized output */
.sp-rich-html {
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-rich-html p {
	margin: 0 0 8px;
}

.sp-rich-html p:last-child {
	margin-bottom: 0;
}

.sp-rich-html ul,
.sp-rich-html ol {
	margin: 8px 0;
	padding-left: 20px;
}

.sp-rich-html li {
	margin-bottom: 4px;
}

.sp-rich-html a {
	color: var(--sp-navy);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sp-rich-html a:hover {
	color: var(--sp-navy-dark);
}

.sp-rich-html img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	margin: 8px 0;
}

.sp-rich-html table {
	display: block;
	overflow-x: auto;
	max-width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
	font-size: 0.875rem;
	line-height: 1.45;
	-webkit-overflow-scrolling: touch;
}

.sp-rich-html th,
.sp-rich-html td {
	border: 1px solid #CBD5E1;
	padding: 7px 10px;
	text-align: left;
	vertical-align: top;
}

.sp-rich-html th {
	background: var(--sp-tint);
	color: var(--sp-ink);
	font-weight: 700;
}

.sp-wikilink-term {
	font-weight: 700;
	color: var(--sp-navy);
}

/* Flashcards Deck */
.sp-flashcard-stage {
	perspective: 1000px;
	width: 100%;
}

.sp-flashcard-btn {
	width: 100%;
	min-height: 230px;
	padding: 22px 18px;
	border-radius: var(--sp-radius-lg);
	border: 1.5px solid #D3DFEE;
	background: #FFFFFF;
	box-shadow: var(--sp-shadow);
	color: var(--sp-ink);
	font-family: var(--sp-font);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	cursor: pointer;
	touch-action: pan-y;
}

.sp-flashcard-btn.is-flipped {
	background: #FBFDFF;
	border-color: var(--sp-navy);
}

.sp-flashcard-side {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sp-navy);
	background: var(--sp-tint);
	padding: 4px 10px;
	border-radius: 999px;
}

.sp-flashcard-btn.is-flipped .sp-flashcard-side {
	background: var(--sp-gold);
	color: var(--sp-ink);
}

.sp-flashcard-body {
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.5;
	color: var(--sp-ink);
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-flashcard-hint {
	font-size: 0.75rem;
	color: var(--sp-muted);
	font-weight: 500;
}

/* PEARLS & Blueprint Lines */
.sp-pearls-lines {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.sp-pearl-row {
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--sp-bg);
	border-left: 3.5px solid var(--sp-navy);
	min-width: 0;
}

.sp-pearl-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--sp-navy);
	margin-bottom: 3px;
}

/* Rotation Category Bands & Topic Rows */
.sp-category-card {
	background: var(--sp-card);
	border-radius: var(--sp-radius);
	box-shadow: var(--sp-shadow);
	overflow: hidden;
	border: 1px solid rgba(15, 36, 64, 0.06);
}

.sp-category-band {
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	background: var(--sp-tint);
	border: none;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto 20px;
	align-items: center;
	gap: 8px;
	text-align: left;
	cursor: pointer;
}

.sp-category-name {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-category-count {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sp-navy);
	font-variant-numeric: tabular-nums;
}

.sp-topic-rows {
	display: flex;
	flex-direction: column;
}

.sp-topic-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 14px;
	border-top: 1px solid var(--sp-bg);
}

.sp-topic-title {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-topic-row.is-done .sp-topic-title {
	color: var(--sp-muted);
	text-decoration: line-through;
}

/* End Screen Missed Topics */
.sp-missed-item {
	padding: 12px;
	border-radius: 14px;
	background: var(--sp-bg);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sp-missed-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

/* Modal / Bottom Sheet */
.sp-sheet-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--sp-app-height, 100dvh);
	background: rgba(15, 36, 64, 0.54);
	z-index: 100;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.sp-sheet {
	width: 100%;
	max-width: 480px;
	max-height: 88vh;
	max-height: calc(var(--sp-app-height, 100dvh) - 14px);
	background: var(--sp-card);
	border-radius: 20px 20px 0 0;
	padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: var(--sp-shadow-lg);
}

.sp-sheet-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

/* Alert / Status Banners */
.sp-banner {
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.sp-banner-info {
	background: var(--sp-tint);
	color: var(--sp-ink);
	border: 1px solid #C8D7EA;
}

.sp-banner-error {
	background: var(--sp-wrong-bg);
	color: var(--sp-wrong-fg);
	border: 1px solid var(--sp-wrong-border);
}

.sp-banner-success {
	background: var(--sp-correct-bg);
	color: var(--sp-correct-fg);
	border: 1px solid var(--sp-correct-border);
}

/* Bottom Tab Bar (Today · Study · QBank · Rotation · Ask) */
.sp-tabbar {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 0;
	width: 100%;
	max-width: 480px;
	background: #FFFFFF;
	border-top: 1px solid var(--sp-border);
	padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	z-index: 60;
	box-shadow: 0 -2px 12px rgba(15, 36, 64, 0.06);
}

.sp-tab-btn {
	min-height: 52px;
	min-width: 0;
	padding: 4px 2px;
	border: none;
	background: transparent;
	color: var(--sp-muted);
	font-family: var(--sp-font);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	cursor: pointer;
	border-radius: 10px;
	position: relative;
}

.sp-tab-btn.is-active {
	color: var(--sp-navy);
}

.sp-tab-btn.is-active::before {
	content: '';
	position: absolute;
	top: 0;
	width: 28px;
	height: 3px;
	border-radius: 999px;
	background: var(--sp-gold);
}

.sp-tab-label {
	font-size: 0.6875rem; /* 11px fits cleanly at 320px width across 5 tabs */
	font-weight: 700;
	line-height: 1.1;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Utility */
.sp-muted {
	color: var(--sp-muted);
}

.sp-stack-sm {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-stack-md {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sp-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   Ask Smarty AI Tutor Screen & Contextual Entry Buttons (v1.1.0)
   ========================================================================== */

html.is-ask-active,
body.is-ask-active {
	height: var(--sp-app-height, 100dvh);
	max-height: var(--sp-app-height, 100dvh);
	overflow: hidden;
}

.sp-shell.is-ask-route {
	height: var(--sp-app-height, 100dvh);
	max-height: var(--sp-app-height, 100dvh);
	min-height: 0;
	overflow: hidden;
}

.sp-shell.is-ask-route .sp-tabbar {
	position: relative;
	left: auto;
	bottom: auto;
	transform: none;
	flex-shrink: 0;
}

.sp-shell.is-keyboard-open .sp-tabbar {
	display: none !important;
}

.sp-ask-header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.sp-ask-header {
	flex-shrink: 0;
	padding-bottom: 14px;
}

.sp-shell.is-ask-route.is-keyboard-open .sp-ask-header {
	padding-top: calc(10px + env(safe-area-inset-top, 0px));
	padding-bottom: 10px;
}

.sp-shell.is-ask-route.is-keyboard-open .sp-ask-header .sp-header-sub {
	display: none;
}

.sp-ask-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sp-ask-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1;
}

.sp-ask-header-mascot {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	object-fit: cover;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.14);
	border: 1.5px solid rgba(255, 200, 87, 0.65);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--sp-gold);
}

.sp-ask-title-wrap {
	display: flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
	min-width: 0;
}

.sp-ask-title {
	margin: 0;
	color: #FFFFFF;
	font-size: 1.3125rem;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.015em;
}

@media (min-width: 375px) {
	.sp-ask-title {
		font-size: 1.5rem;
	}
}

.sp-beta-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--sp-gold);
	color: var(--sp-ink);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.3;
	flex-shrink: 0;
}

.sp-new-chat-btn {
	min-height: 44px;
	min-width: 44px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1.5px solid rgba(255, 200, 87, 0.65);
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
}

@media (max-width: 359px) {
	.sp-ask-header-mascot {
		width: 32px;
		height: 32px;
		border-radius: 10px;
	}
	.sp-ask-brand {
		gap: 7px;
	}
	.sp-ask-title {
		font-size: 1.125rem;
	}
	.sp-new-chat-btn {
		padding: 0 9px;
		font-size: 0.75rem;
	}
}

.sp-ask-panre-bar {
	flex-shrink: 0;
	background: var(--sp-gold-soft);
	border-bottom: 1px solid var(--sp-gold-border);
	color: var(--sp-ink);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.35;
	padding: 6px 14px;
	overflow-wrap: anywhere;
}

.sp-shell.is-ask-route.is-keyboard-open .sp-ask-panre-bar {
	padding: 3px 10px;
}

.sp-new-chat-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.2);
}

.sp-new-chat-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Scrollable Ask Message Region */
.sp-ask-main {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 14px 14px 12px;
	display: flex;
	flex-direction: column;
}

@media (min-width: 375px) {
	.sp-ask-main {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* Ask Empty State & Disabled State */
.sp-ask-empty {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	min-width: 0;
}

.sp-ask-empty-top {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.sp-ask-greeting-card {
	background: var(--sp-card);
	border-radius: var(--sp-radius-lg);
	padding: 15px 16px;
	box-shadow: var(--sp-shadow);
	border: 1px solid rgba(15, 36, 64, 0.06);
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.sp-ask-greeting-mascot {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--sp-navy);
	color: var(--sp-gold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sp-ask-greeting-copy {
	min-width: 0;
	flex: 1;
}

.sp-ask-greeting-title {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-ask-greeting-body {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--sp-muted);
	overflow-wrap: anywhere;
}

.sp-ask-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	min-width: 0;
}

.sp-ask-suggestion-chip {
	min-height: 44px;
	padding: 9px 14px;
	border-radius: 20px;
	border: 1px solid #C8D7EA;
	background: #FFFFFF;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(15, 36, 64, 0.05);
	max-width: 100%;
	overflow-wrap: anywhere;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sp-ask-suggestion-chip:hover:not(:disabled) {
	background: var(--sp-tint);
	border-color: var(--sp-navy);
}

.sp-ask-suggestion-chip:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.sp-ask-fineprint {
	margin: 0;
	padding: 4px 4px 2px;
	font-size: 0.75rem;
	line-height: 1.45;
	color: var(--sp-muted);
	text-align: center;
	overflow-wrap: anywhere;
}

/* Message List & Bubbles */
.sp-ask-messages {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	min-width: 0;
	padding-bottom: 4px;
}

.sp-ask-turn-user {
	align-self: flex-end;
	max-width: 86%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
}

.sp-ask-context-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #E2E8F0;
	color: #334155;
	border: 1px solid #CBD5E1;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	padding: 3px 10px;
	border-radius: 999px;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-ask-bubble-user {
	background: var(--sp-navy);
	color: #FFFFFF;
	padding: 11px 14px;
	border-radius: 18px 18px 4px 18px;
	font-size: 0.9375rem;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-word;
	max-width: 100%;
}

.sp-ask-turn-assistant {
	align-self: flex-start;
	width: 100%;
	min-width: 0;
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	gap: 9px;
	align-items: start;
}

.sp-ask-avatar {
	width: 30px;
	height: 30px;
	border-radius: 999px;
	object-fit: cover;
	background: var(--sp-navy);
	color: var(--sp-gold);
	border: 1px solid var(--sp-border);
	flex-shrink: 0;
	margin-top: 2px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sp-ask-assistant-col {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.sp-ask-bubble-assistant {
	background: var(--sp-card);
	color: var(--sp-ink);
	padding: 12px 14px;
	border-radius: 6px 18px 18px 18px;
	box-shadow: var(--sp-shadow);
	border: 1px solid rgba(15, 36, 64, 0.07);
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.sp-ask-bubble-assistant .sp-rich-html {
	font-size: 0.9375rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.sp-ask-bubble-assistant .sp-rich-html a {
	color: #0F766E;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.sp-ask-bubble-assistant .sp-rich-html a:hover {
	color: #115E59;
}

.sp-ask-bubble-notice {
	background: #F8FAFC;
	border: 1px solid #CBD5E1;
	color: #1E293B;
	box-shadow: none;
}

.sp-ask-notice-text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #1E293B;
	overflow-wrap: anywhere;
}

.sp-ask-retry-btn {
	margin-top: 10px;
}

/* Under-reply actions (Copy + Report this answer) */
.sp-ask-reply-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	margin-top: 1px;
}

.sp-ask-action-btn,
.sp-ask-action-link {
	min-height: 44px;
	min-width: 44px;
	padding: 6px 8px;
	background: transparent;
	border: none;
	border-radius: 8px;
	font-family: var(--sp-font);
	font-size: 0.78125rem;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.sp-ask-action-link {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sp-ask-action-btn:hover,
.sp-ask-action-link:hover {
	background: rgba(15, 36, 64, 0.06);
	color: var(--sp-navy);
}

/* Typing indicator */
.sp-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 22px;
	padding: 2px 2px;
}

.sp-typing-dots span {
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--sp-muted);
	display: inline-block;
	animation: sp-typing-bounce 1.2s infinite ease-in-out;
}

.sp-typing-dots span:nth-child(2) {
	animation-delay: 0.16s;
}

.sp-typing-dots span:nth-child(3) {
	animation-delay: 0.32s;
}

@keyframes sp-typing-bounce {
	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.45;
	}
	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-typing-dots span {
		animation: none;
		opacity: 0.75;
	}
	.sp-boot-spinner {
		animation-duration: 1.5s;
	}
}

.sp-typing-status {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--sp-muted);
	line-height: 1.4;
}

/* Composer Input Bar pinned directly above bottom nav */
.sp-ask-composer-bar {
	flex-shrink: 0;
	width: 100%;
	background: #FFFFFF;
	border-top: 1px solid var(--sp-border);
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	z-index: 61;
}

@media (min-width: 375px) {
	.sp-ask-composer-bar {
		padding-left: 14px;
		padding-right: 14px;
	}
}

.sp-ask-composer-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sp-muted);
	padding: 0 4px;
	min-width: 0;
}

.sp-ask-composer-meta:empty {
	display: none;
}

.sp-ask-char-limit {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}

.sp-ask-char-limit.is-near-max {
	color: var(--sp-weak);
}

.sp-ask-composer-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	gap: 8px;
	align-items: end;
	width: 100%;
}

.sp-ask-textarea {
	width: 100%;
	max-width: 100%;
	height: 44px;
	min-height: 44px;
	max-height: 112px;
	padding: 10px 13px;
	border-radius: 18px;
	border: 1.5px solid #6E8098;
	background: var(--sp-bg);
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 1rem; /* >=16px prevents iOS Safari auto-zoom */
	line-height: 1.4;
	resize: none;
	overflow-y: hidden;
	display: block;
}

.sp-ask-textarea:focus {
	background: #FFFFFF;
	border-color: var(--sp-navy);
}

.sp-ask-send-btn {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border-radius: 999px;
	border: none;
	background: var(--sp-navy);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.sp-ask-send-btn:hover:not(:disabled) {
	background: var(--sp-navy-dark);
}

.sp-ask-send-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* "Ask Smarty about this" secondary contextual button */
.sp-ask-about-btn {
	gap: 8px;
}

.sp-btn-mascot {
	width: 22px;
	height: 22px;
	border-radius: 999px;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

/* Toast notification */
.sp-toast {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: calc(136px + env(safe-area-inset-bottom, 0px));
	z-index: 150;
	background: var(--sp-ink);
	color: #FFFFFF;
	padding: 11px 18px;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
	box-shadow: var(--sp-shadow-lg);
	max-width: min(430px, calc(100vw - 28px));
	text-align: center;
	overflow-wrap: anywhere;
	pointer-events: none;
}

/* ==========================================================================
   Multi-Exam Onboarding, Today Focus Chips, My Exams & Bank Selectors (v1.2.0)
   ========================================================================== */

/* Tappable header subline button ("Add your exams" / "Pediatrics EOR · add a date") */
.sp-header-sub-btn {
	margin: 6px 0 0;
	min-height: 44px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 200, 87, 0.55);
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	font-family: var(--sp-font);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	text-align: left;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-header-sub-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* Deliberate horizontally scrollable exam chip row under Today header */
.sp-exam-chip-bar {
	background: #FFFFFF;
	border-bottom: 1px solid var(--sp-border);
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

.sp-exam-chip-strip {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 8px 14px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.sp-exam-chip-strip::-webkit-scrollbar {
	display: none;
}

@media (min-width: 375px) {
	.sp-exam-chip-strip {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.sp-exam-focus-chip {
	flex: 0 0 auto;
	min-height: 44px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1.5px solid #C8D7EA;
	background: var(--sp-bg);
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sp-exam-focus-chip:hover:not(:disabled) {
	background: var(--sp-tint);
}

.sp-exam-focus-chip.is-active {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
	color: #FFFFFF;
}

.sp-exam-focus-chip:disabled {
	opacity: 0.65;
	cursor: wait;
}

/* Study Tab "From: Pediatrics EOR ▾" Bank Selector */
.sp-study-bank-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 2px;
	min-width: 0;
}

.sp-study-bank-label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sp-muted);
	white-space: nowrap;
	flex-shrink: 0;
}

.sp-bank-select-shell {
	position: relative;
	flex: 1;
	min-width: 0;
	max-width: 100%;
}

.sp-bank-select-display {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	height: 44px;
	min-height: 44px;
	padding: 0 14px 0 16px;
	border-radius: 999px;
	border: 1.5px solid #6E8098;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	pointer-events: none;
	box-sizing: border-box;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.sp-bank-select-shell:focus-within .sp-bank-select-display {
	border-color: var(--sp-navy);
	box-shadow: 0 0 0 2px rgba(27, 58, 92, 0.22);
}

.sp-bank-select-text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: left;
}

.sp-bank-select-chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--sp-navy);
}

.sp-study-bank-select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	font-size: 16px; /* >=16px prevents iOS Safari zoom on focus */
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

/* Rotation Tab EOR Switcher (when member has 2+ EORs) */
.sp-eor-switcher-card {
	background: var(--sp-card);
	border-radius: var(--sp-radius);
	padding: 10px 12px;
	box-shadow: var(--sp-shadow);
	border: 1px solid rgba(15, 36, 64, 0.06);
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.sp-eor-switcher-kicker {
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sp-muted);
}

.sp-eor-switcher-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}

/* Setup Sheet (Step 1 & Step 2) */
.sp-setup-sheet {
	max-height: 92vh;
	max-height: 92dvh;
}

.sp-setup-welcome {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 14px;
	min-width: 0;
}

.sp-setup-mascot {
	width: 46px;
	height: 46px;
	border-radius: 14px;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--sp-navy);
	color: var(--sp-gold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sp-setup-step-kicker {
	display: block;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--sp-navy);
	margin-bottom: 2px;
}

.sp-setup-option-card {
	border-radius: 14px;
	border: 1.5px solid var(--sp-border);
	background: #FFFFFF;
	overflow: hidden;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sp-setup-option-card.is-selected {
	border-color: var(--sp-navy);
	background: #F8FAFD;
}

.sp-setup-card-btn {
	width: 100%;
	min-height: 54px;
	padding: 12px 14px;
	border: none;
	background: transparent;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	text-align: left;
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.sp-setup-check {
	width: 22px;
	height: 22px;
	border-radius: 7px;
	border: 2px solid #64748B;
	background: #FFFFFF;
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sp-setup-option-card.is-selected .sp-setup-check {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
}

.sp-setup-card-title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--sp-ink);
	display: block;
	overflow-wrap: anywhere;
}

.sp-setup-card-sub {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--sp-muted);
	display: block;
	margin-top: 2px;
	overflow-wrap: anywhere;
}

.sp-setup-eor-drawer {
	padding: 4px 14px 14px;
	border-top: 1px solid var(--sp-border);
	background: #FFFFFF;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-setup-panre-note {
	margin: 0 14px 12px;
	padding: 9px 12px;
	border-radius: 10px;
	background: var(--sp-gold-soft);
	border: 1px solid var(--sp-gold-border);
	color: var(--sp-ink);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.sp-setup-date-row {
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid var(--sp-border);
	background: var(--sp-bg);
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.sp-setup-date-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.sp-setup-date-controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: center;
}

@media (max-width: 359px) {
	.sp-setup-date-controls {
		grid-template-columns: minmax(0, 1fr);
	}
}

.sp-skip-link {
	align-self: center;
	min-height: 44px;
	padding: 8px 14px;
	border: none;
	background: transparent;
	color: var(--sp-muted);
	font-family: var(--sp-font);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.sp-skip-link:hover:not(:disabled) {
	color: var(--sp-navy);
}

/* My Exams Sheet (Profile / SP Avatar) */
.sp-my-exam-card {
	padding: 12px 14px;
	border-radius: 14px;
	border: 1.5px solid var(--sp-border);
	background: #FFFFFF;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.sp-my-exam-card.is-focused {
	border-color: var(--sp-navy);
	background: #F8FAFD;
}

.sp-my-exam-card.is-passed {
	background: #F3F5F8;
	border-color: #CBD5E1;
}

.sp-my-exam-card.is-passed .sp-my-exam-meta {
	color: #475569;
}

.sp-past-date-note {
	padding: 8px 10px;
	border-radius: 10px;
	background: var(--sp-gold-soft);
	border: 1px solid var(--sp-gold-border);
	color: var(--sp-ink);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.sp-my-exam-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
}

.sp-my-exam-info {
	min-width: 0;
	flex: 1;
}

.sp-my-exam-title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-my-exam-meta {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--sp-muted);
	margin-top: 2px;
	overflow-wrap: anywhere;
}

.sp-focus-radio-label {
	min-height: 44px;
	min-width: 44px;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid #C8D7EA;
	background: #FFFFFF;
	color: var(--sp-navy);
	font-size: 0.75rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
}

.sp-my-exam-card.is-focused .sp-focus-radio-label {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
	color: #FFFFFF;
}

.sp-focus-radio {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--sp-gold);
	cursor: pointer;
}

.sp-my-exam-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	border-top: 1px solid var(--sp-bg);
	padding-top: 4px;
}

.sp-my-exam-edit-box {
	padding: 10px;
	border-radius: 12px;
	background: var(--sp-bg);
	border: 1px solid var(--sp-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-done-section {
	border-top: 1px solid var(--sp-border);
	padding-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-done-heading {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 800;
	color: var(--sp-ink);
}

.sp-done-prompt {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--sp-muted);
	line-height: 1.4;
}

/* ==========================================================================
   Blueprint Tab for Every Exam & Full-Screen System Walk (v1.3.0)
   ========================================================================== */

body.is-walk-active,
body.is-img-viewer-open {
	overflow: hidden;
}

.sp-shell.is-walk-route.is-keyboard-open .sp-walk-bottom-bar {
	display: none;
}

.sp-shell.is-walk-route.is-keyboard-open .sp-walk-header {
	padding-top: 8px;
	padding-bottom: 8px;
}

/* Blueprint Exam Switcher Strip */
.sp-bp-exam-strip {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 2px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.sp-bp-exam-strip::-webkit-scrollbar {
	display: none;
}

.sp-bp-exam-strip .sp-chip {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* Filter + Hide Checked Row */
.sp-bp-filter-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: center;
	width: 100%;
	min-width: 0;
}

@media (max-width: 345px) {
	.sp-bp-filter-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

.sp-hide-checked-btn {
	min-height: 46px;
	padding: 8px 12px;
	border-radius: 12px;
	border: 1.5px solid #6E8098;
	background: #FFFFFF;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	white-space: nowrap;
	cursor: pointer;
}

.sp-hide-checked-btn.is-active {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
	color: #FFFFFF;
}

#sp-bp-categories-slot {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

/* Blueprint Horizontal Organ System Strip */
.sp-bp-system-strip {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 2px 0 4px;
	width: 100%;
	min-width: 0;
}

.sp-bp-system-strip::-webkit-scrollbar {
	display: none;
}

.sp-bp-sys-pill {
	flex: 0 0 auto;
	min-height: 34px;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid #CFDCEB;
	background: #FFFFFF;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.sp-bp-sys-pill:hover {
	background: var(--sp-tint);
	border-color: var(--sp-navy);
}

.sp-bp-sys-pill.is-active {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
	color: #FFFFFF;
}

.sp-bp-sys-pill.is-complete:not(.is-active) {
	background: #ECFDF5;
	border-color: #86EFAC;
	color: #166534;
}

.sp-bp-systems-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 2px;
}

.sp-bp-systems-hint {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sp-muted);
}

.sp-bp-expand-toggle {
	border: none;
	background: transparent;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 4px 6px;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
}

.sp-bp-expand-toggle:hover {
	background: var(--sp-tint);
}

.sp-category-card.is-collapsed .sp-category-band {
	background: #FFFFFF;
}

.sp-category-card.is-collapsed .sp-category-band:hover {
	background: #F8FAFD;
}

.sp-category-band-main {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.sp-category-mini-bar {
	display: block;
	width: 100%;
	max-width: 140px;
	height: 4px;
	border-radius: 999px;
	background: #E2E8F0;
	overflow: hidden;
}

.sp-category-mini-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--sp-gold);
	transition: width 0.2s ease;
}

.sp-category-chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--sp-muted);
}

.sp-bp-resume-card {
	background: var(--sp-gold-soft);
	border: 1px solid var(--sp-gold-border);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sp-bp-resume-copy {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

/* Blueprint Skeleton Loader (for ~2s PANCE checklist load) */
.sp-bp-skeleton-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.sp-bp-skeleton-card {
	background: var(--sp-card);
	border-radius: var(--sp-radius);
	padding: 14px;
	box-shadow: var(--sp-shadow);
	border: 1px solid rgba(15, 36, 64, 0.05);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sp-skeleton-bar {
	height: 16px;
	border-radius: 8px;
	background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
	background-size: 200% 100%;
	animation: sp-shimmer 1.3s ease-in-out infinite;
}

.sp-skeleton-bar.is-short {
	width: 55%;
	height: 13px;
}

.sp-skeleton-bar.is-row {
	width: 85%;
	height: 14px;
}

@keyframes sp-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-skeleton-bar {
		animation: none;
	}
}

/* System Header Actions ("Start walking" + "Flashcards") */
.sp-category-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 8px 12px 10px;
	background: #F8FAFD;
	border-top: 1px solid var(--sp-border);
}

.sp-cat-action-btn {
	min-height: 44px;
	min-width: 44px;
	padding: 6px 10px;
	border-radius: 10px;
	border: 1px solid #C8D7EA;
	background: #FFFFFF;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	text-align: center;
	overflow-wrap: anywhere;
}

.sp-cat-action-btn:hover:not(:disabled) {
	background: var(--sp-tint);
	border-color: var(--sp-navy);
}

/* Blueprint Topic Row (Checkbox + Tappable Topic Open + Note Button) */
.sp-bp-topic-row {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 44px;
	align-items: center;
	gap: 2px;
	padding: 2px 8px 2px 4px;
	border-top: 1px solid var(--sp-bg);
}

.sp-bp-check-btn {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: none;
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.sp-bp-check-box {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	border: 2px solid #64748B;
	background: #FFFFFF;
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.12s ease, border-color 0.12s ease;
}

.sp-bp-topic-row.is-done .sp-bp-check-box {
	background: var(--sp-navy);
	border-color: var(--sp-navy);
}

.sp-bp-topic-open-btn {
	min-height: 44px;
	width: 100%;
	min-width: 0;
	padding: 8px 6px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	text-align: left;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	cursor: pointer;
}

.sp-bp-topic-open-btn:hover {
	background: var(--sp-bg);
}

.sp-bp-topic-row.is-done .sp-bp-topic-name {
	color: var(--sp-muted);
	text-decoration: line-through;
}

.sp-bp-topic-copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sp-bp-topic-name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-bp-topic-cat {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sp-muted);
	overflow-wrap: anywhere;
}

.sp-note-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--sp-strong);
	display: inline-block;
	flex-shrink: 0;
}

/* Full-Screen Walk Header, Tabs, Note Accordion, Bottom Bar & Celebration */
.sp-walk-header {
	flex-shrink: 0;
	background: var(--sp-navy);
	color: #FFFFFF;
	padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
}

@media (min-width: 375px) {
	.sp-walk-header {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.sp-walk-header-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.sp-walk-sys-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.25;
	color: #FFFFFF;
	overflow-wrap: anywhere;
}

.sp-walk-step-meta {
	margin: 3px 0 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sp-gold);
}

.sp-walk-progress-wrap {
	margin-top: 10px;
}

.sp-walk-progress-bar {
	width: 100%;
	height: 5px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	overflow: hidden;
}

.sp-walk-progress-fill {
	height: 100%;
	border-radius: 999px;
	background: var(--sp-gold);
	transition: width 0.2s ease;
}

.sp-walk-main {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 14px 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sp-walk-main > * {
	flex-shrink: 0;
}

@media (min-width: 375px) {
	.sp-walk-main {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.sp-walk-subcat-pill {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-size: 0.75rem;
	font-weight: 700;
	max-width: 100%;
	overflow-wrap: anywhere;
	margin-bottom: -4px;
}

.sp-walk-tabpanel {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.sp-walk-topic-heading {
	margin: 0;
	font-size: 1.3125rem;
	font-weight: 800;
	line-height: 1.22;
	color: var(--sp-ink);
	letter-spacing: -0.015em;
	overflow-wrap: anywhere;
}

.sp-walk-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	background: var(--sp-tint);
	padding: 4px;
	border-radius: 14px;
	width: 100%;
}

.sp-walk-tab-btn {
	min-height: 44px;
	min-width: 0;
	padding: 6px 6px;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sp-walk-tab-btn.is-active {
	background: #FFFFFF;
	color: var(--sp-ink);
	box-shadow: 0 1px 4px rgba(15, 36, 64, 0.08);
}

/* Collapsible "My study note" inside Walk Card tab */
.sp-walk-note-card {
	background: var(--sp-card);
	border-radius: var(--sp-radius);
	border: 1px solid var(--sp-border);
}

.sp-walk-note-toggle {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: none;
	background: transparent;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 0.9375rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
	text-align: left;
}

.sp-walk-note-toggle:hover {
	background: var(--sp-bg);
}

.sp-walk-note-body {
	padding: 0 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-top: 1px solid var(--sp-bg);
}

/* Pinned Walk Bottom Bar above Bottom Tab Bar */
.sp-walk-bottom-bar {
	flex-shrink: 0;
	width: 100%;
	background: #FFFFFF;
	border-top: 1px solid var(--sp-border);
	padding: 8px 10px;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 6px;
	align-items: center;
	z-index: 61;
}

@media (min-width: 375px) {
	.sp-walk-bottom-bar {
		padding-left: 14px;
		padding-right: 14px;
		gap: 8px;
	}
}

.sp-walk-nav-btn {
	min-height: 44px;
	min-width: 58px;
	padding: 0 9px;
	border-radius: 12px;
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	cursor: pointer;
	white-space: nowrap;
}

.sp-walk-nav-btn:disabled {
	opacity: 0.42;
	cursor: not-allowed;
}

.sp-walk-complete-btn {
	min-height: 44px;
	width: 100%;
	min-width: 0;
	padding: 6px 8px;
	border-radius: 12px;
	font-family: var(--sp-font);
	font-size: 0.78125rem;
	font-weight: 700;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	cursor: pointer;
	text-align: center;
	overflow-wrap: anywhere;
}

@media (min-width: 375px) {
	.sp-walk-complete-btn {
		font-size: 0.84375rem;
		padding-left: 10px;
		padding-right: 10px;
	}
}

.sp-walk-undo-btn {
	background: var(--sp-correct-bg);
	border: 1.5px solid var(--sp-correct-border);
	color: var(--sp-correct-fg);
}

/* Celebration Card at End of System */
.sp-walk-celebration {
	margin: auto 0;
	text-align: center;
	padding: 26px 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

/* "‹ Back to walk" Return Chip Bar on Ask Tab */
.sp-ask-back-walk-bar {
	flex-shrink: 0;
	background: #FFFFFF;
	border-bottom: 1px solid var(--sp-border);
	padding: 6px 12px;
	display: flex;
	align-items: center;
}

.sp-ask-back-walk-chip {
	min-height: 44px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1.5px solid #C8D7EA;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-ask-back-walk-chip:hover {
	border-color: var(--sp-navy);
}

.sp-shell.is-ask-route.is-keyboard-open .sp-ask-back-walk-bar {
	padding: 3px 10px;
}

.sp-shell.is-ask-route.is-keyboard-open .sp-ask-back-walk-chip {
	min-height: 36px;
	padding: 4px 10px;
}

/* ==========================================================================
   Masterclass Tutor Mode — 5-Step Guided Questions & Debrief (v1.5.0)
   ========================================================================== */

.sp-tutor-toggle-btn {
	width: 100%;
	min-height: 50px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1.5px solid var(--sp-border);
	background: #F8FAFD;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	text-align: left;
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sp-tutor-toggle-btn:hover {
	border-color: var(--sp-navy);
}

.sp-tutor-toggle-btn.is-on {
	background: #F0F6FE;
	border-color: var(--sp-navy);
}

.sp-tutor-toggle-btn.is-on-gold {
	background: rgba(255, 255, 255, 0.92);
	border-color: rgba(15, 36, 64, 0.18);
}

.sp-tutor-toggle-btn.is-on-gold.is-on {
	background: #FFFFFF;
	border-color: var(--sp-navy);
}

.sp-tutor-toggle-btn.is-compact {
	min-height: 46px;
	padding: 8px 11px;
}

.sp-tutor-toggle-icon {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--sp-tint);
	color: var(--sp-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sp-tutor-toggle-btn.is-on .sp-tutor-toggle-icon {
	background: var(--sp-navy);
	color: var(--sp-gold);
}

.sp-tutor-toggle-copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.sp-tutor-toggle-title {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--sp-ink);
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.sp-tutor-toggle-sub {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--sp-muted);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.sp-switch-track {
	width: 44px;
	height: 26px;
	border-radius: 999px;
	background: #94A3B8;
	padding: 3px;
	display: inline-flex;
	align-items: center;
	transition: background-color 0.15s ease;
	flex-shrink: 0;
}

.sp-tutor-toggle-btn.is-on .sp-switch-track {
	background: var(--sp-navy);
}

.sp-switch-thumb {
	width: 20px;
	height: 20px;
	border-radius: 999px;
	background: #FFFFFF;
	box-shadow: 0 1px 3px rgba(15, 36, 64, 0.25);
	transform: translateX(0);
	transition: transform 0.15s ease;
}

.sp-tutor-toggle-btn.is-on .sp-switch-thumb {
	transform: translateX(18px);
	background: var(--sp-gold);
}

/* Header "Tutor" Pill */
.sp-tutor-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(255, 200, 87, 0.18);
	border: 1px solid rgba(255, 200, 87, 0.65);
	color: var(--sp-gold);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.1;
	white-space: nowrap;
	flex-shrink: 0;
}

.sp-tutor-pill-light {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--sp-gold-soft);
	border: 1px solid var(--sp-gold-border);
	color: var(--sp-ink);
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1.1;
	white-space: nowrap;
	flex-shrink: 0;
}

/* First-Time Tutor Intro Sheet */
.sp-tutor-intro {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sp-tutor-intro-hero {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sp-tutor-intro-badge {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--sp-navy);
	color: var(--sp-gold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(27, 58, 92, 0.2);
}

.sp-tutor-intro-voice {
	margin: 0;
	font-size: 0.96875rem;
	line-height: 1.55;
	color: var(--sp-ink);
	font-weight: 500;
}

.sp-tutor-intro-list {
	list-style: none;
	margin: 0;
	padding: 12px;
	border-radius: 14px;
	background: var(--sp-bg);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-tutor-intro-list li {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--sp-ink);
}

.sp-tutor-intro-num {
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: var(--sp-navy);
	color: var(--sp-gold);
	font-size: 0.75rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* 5-Step Progress Bar */
.sp-tutor-steps {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	width: 100%;
}

.sp-tutor-step-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
}

.sp-tutor-step-dot {
	color: #64748B;
	font-size: 0.75rem;
	font-weight: 700;
	user-select: none;
}

.sp-tutor-step-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.25;
	background: #F1F5F9;
	color: #475569;
	border: 1px solid transparent;
	overflow-wrap: anywhere;
}

.sp-tutor-step-pill.is-done {
	background: var(--sp-tint);
	color: var(--sp-navy);
}

.sp-tutor-step-pill.is-current {
	background: var(--sp-navy);
	color: #FFFFFF;
	font-weight: 800;
	border-color: var(--sp-navy);
}

/* Coach Banner & Recall Pill */
.sp-tutor-coach {
	padding: 10px 12px;
	border-radius: 12px;
	background: #FFFBEB;
	border: 1px solid #FDE68A;
	border-left: 3.5px solid #D97706;
	color: var(--sp-ink);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.45;
	margin: 0 0 12px;
	overflow-wrap: anywhere;
}

.sp-tutor-recall-banner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--sp-tint);
	color: var(--sp-navy);
	font-size: 0.75rem;
	font-weight: 800;
	margin: 0 0 10px;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* Guided Vignette Steps 1-5 */
.sp-tutor-leadin-only {
	margin: 0 0 14px;
	padding: 14px;
	border-radius: 14px;
	background: #F8FAFC;
	border: 1.5px solid var(--sp-border);
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.45;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-tutor-step2-stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 14px;
}

.sp-tutor-first-sent {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-tutor-demo-soft {
	background: #E0F2FE;
	color: #0C4A6E;
	padding: 1px 5px;
	border-radius: 5px;
	font-weight: 600;
}

.sp-tutor-ellipsis {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sp-muted);
	letter-spacing: 0.14em;
	padding-left: 2px;
}

.sp-tutor-leadin-sub {
	margin: 0;
	padding-top: 8px;
	border-top: 1px dashed var(--sp-border);
	font-size: 1.0625rem;
	font-weight: 800;
	line-height: 1.45;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-tutor-vignette {
	font-size: 1rem;
	line-height: 1.72;
	color: var(--sp-ink);
	margin: 0 0 12px;
	text-align: left;
	word-spacing: normal;
	letter-spacing: normal;
	overflow-wrap: break-word;
}

.sp-tutor-vignette.is-interactive {
	line-height: 1.95;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

.sp-tutor-sent-lead {
	font-weight: 700;
}

.sp-tutor-word {
	display: inline;
	padding: 3px 3px;
	margin: 0;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.08s ease;
}

.sp-tutor-word:focus-visible {
	outline: 2px solid var(--sp-navy);
	outline-offset: 1px;
}

.sp-tutor-word.is-clue {
	background: #FEF08A;
	color: var(--sp-ink);
	box-shadow: 0 0 0 1px #EAB308;
	font-weight: 600;
}

.sp-tutor-mark {
	padding: 1px 4px;
	border-radius: 4px;
	color: var(--sp-ink);
}

.sp-tutor-mark.is-user-clue {
	background: #FEF08A;
	box-shadow: 0 0 0 1px #EAB308;
	font-weight: 600;
}

.sp-tutor-mark.is-caught {
	background: #DCFCE7;
	color: #14532D;
	border-bottom: 2px solid #16A34A;
	font-weight: 700;
}

.sp-tutor-mark.is-missed {
	background: #FEF3C7;
	color: #78350F;
	border-bottom: 2px solid #D97706;
	font-weight: 700;
}

.sp-tutor-user-clues {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
}

.sp-tutor-user-clue-btn {
	min-height: 44px;
	min-width: 44px;
	padding: 6px 11px;
	border-radius: 999px;
	border: 1.5px solid #EAB308;
	background: #FEF9C3;
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	max-width: 100%;
	overflow-wrap: anywhere;
	text-align: left;
}

.sp-tutor-toolbar-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
}

.sp-power-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	border-radius: 999px;
	background: linear-gradient(180deg, #FFE69C 0%, var(--sp-gold) 100%);
	border: 1px solid #EAB03A;
	color: var(--sp-ink);
	font-size: 0.8125rem;
	font-weight: 800;
	line-height: 1.2;
	max-width: 100%;
}

/* Dimmed Step-3 Choices & Step-4 Strikeout Choice Rows */
.sp-choices.is-dimmed {
	opacity: 0.48;
	pointer-events: none;
	user-select: none;
}

.sp-choice-readonly {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1.5px solid var(--sp-border);
	background: #F8FAFC;
	color: var(--sp-ink);
	font-size: 0.9375rem;
	line-height: 1.4;
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
}

.sp-tutor-choice-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	align-items: stretch;
	border-radius: 14px;
	border: 1.5px solid var(--sp-border);
	background: #FFFFFF;
	overflow: hidden;
	touch-action: pan-y;
}

.sp-tutor-choice-row:hover {
	border-color: var(--sp-navy);
}

.sp-tutor-choice-row.is-selected {
	border-color: var(--sp-navy);
	background: var(--sp-tint);
}

.sp-tutor-choice-row .sp-choice-btn {
	border: none;
	border-radius: 0;
	background: transparent;
	min-height: 52px;
}

.sp-tutor-choice-row .sp-choice-btn:hover:not(:disabled) {
	background: transparent;
}

.sp-choice-strike-btn {
	width: 44px;
	min-width: 44px;
	min-height: 52px;
	padding: 0;
	border: none;
	border-left: 1px solid var(--sp-border);
	background: rgba(241, 245, 249, 0.7);
	color: #475569;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

.sp-choice-strike-btn:hover {
	background: var(--sp-tint);
	color: var(--sp-navy);
}

.sp-tutor-choice-row.is-struck {
	background: #F1F5F9;
	border-color: #CBD5E1;
}

.sp-tutor-choice-row.is-struck .sp-choice-letter {
	background: #E2E8F0;
	color: #475569;
}

.sp-tutor-choice-row.is-struck .sp-choice-text {
	text-decoration: line-through;
	color: #475569;
}

.sp-tutor-choice-row.is-struck .sp-choice-strike-btn {
	background: #E2E8F0;
	color: var(--sp-navy);
}

.sp-choice-btn.is-struck-post {
	opacity: 0.78;
}

.sp-choice-btn.is-struck-post:not(.is-correct):not(.is-wrong) .sp-choice-text {
	text-decoration: line-through;
	color: #475569;
}

/* Step 5: Masterclass Debrief Card */
.sp-tutor-debrief {
	border-top: 4px solid var(--sp-navy);
	display: flex;
	flex-direction: column;
	gap: 14px;
	scroll-margin-top: 14px;
}

.sp-debrief-top {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sp-navy);
}

.sp-debrief-headline {
	margin: 0;
	font-size: 1.1875rem;
	font-weight: 800;
	line-height: 1.28;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-debrief-point {
	padding: 11px 12px;
	border-radius: 12px;
	background: var(--sp-bg);
	border-left: 3.5px solid var(--sp-navy);
	font-size: 0.90625rem;
	line-height: 1.48;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-debrief-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--sp-navy);
	margin-bottom: 3px;
}

.sp-debrief-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.sp-debrief-sec-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
}

.sp-debrief-sec-title {
	font-size: 0.8125rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--sp-navy);
}

.sp-debrief-sec-sub {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sp-muted);
}

.sp-clue-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sp-clue-chip {
	min-height: 44px;
	min-width: 44px;
	padding: 8px 12px;
	border-radius: 12px;
	font-family: var(--sp-font);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.3;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	text-align: left;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-clue-chip.is-caught {
	background: #ECFDF3;
	border: 1.5px solid #86EFAC;
	color: #14532D;
}

.sp-clue-chip.is-caught.is-open {
	background: #DCFCE7;
	border-color: #15803D;
}

.sp-clue-chip.is-missed {
	background: #FFFBEB;
	border: 1.5px solid #FCD34D;
	color: #78350F;
}

.sp-clue-chip.is-missed.is-open {
	background: #FEF3C7;
	border-color: #D97706;
}

.sp-clue-missed-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #D97706;
	flex-shrink: 0;
}

.sp-clue-why-box {
	padding: 10px 12px;
	border-radius: 12px;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--sp-ink);
	overflow-wrap: anywhere;
}

.sp-clue-why-box.is-caught {
	background: #F0FDF4;
	border: 1px solid #BBF7D0;
}

.sp-clue-why-box.is-missed {
	background: #FFFBEB;
	border: 1px solid #FDE68A;
}

.sp-debrief-h2h {
	padding: 12px;
	border-radius: 12px;
	background: #F8FAFC;
	border: 1px solid var(--sp-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.sp-h2h-versus {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 0.8125rem;
	font-weight: 700;
}

.sp-h2h-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 10px;
	line-height: 1.3;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.sp-h2h-pill.is-win {
	background: #ECFDF3;
	border: 1px solid #86EFAC;
	color: #14532D;
}

.sp-h2h-pill.is-foil {
	background: #F1F5F9;
	border: 1px solid #CBD5E1;
	color: #334155;
}

.sp-debrief-steps {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-debrief-step-row {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	align-items: start;
	gap: 9px;
	padding: 10px 11px;
	border-radius: 12px;
	background: var(--sp-bg);
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--sp-ink);
}

.sp-debrief-step-badge {
	width: 24px;
	height: 24px;
	border-radius: 999px;
	background: var(--sp-navy);
	color: var(--sp-gold);
	font-size: 0.75rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}

.sp-debrief-cta-link {
	min-height: 44px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--sp-gold-soft);
	border: 1px solid var(--sp-gold-border);
	color: var(--sp-ink);
	font-size: 0.84375rem;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	overflow-wrap: anywhere;
}

.sp-debrief-cta-link:hover {
	background: #FFEFA8;
}

/* Tutor Session Summary & MasterClass CTA Card */
.sp-tutor-summary-stats {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-tutor-stat-row {
	padding: 11px 13px;
	border-radius: 12px;
	background: var(--sp-bg);
	border: 1px solid var(--sp-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 0.90625rem;
	color: var(--sp-ink);
}

.sp-tutor-stat-label {
	font-weight: 600;
	color: var(--sp-muted);
}

.sp-tutor-stat-val {
	font-weight: 800;
	color: var(--sp-ink);
}

.sp-masterclass-cta-card {
	padding: 15px;
	border-radius: var(--sp-radius);
	background: linear-gradient(180deg, #FFFDF5 0%, var(--sp-gold-soft) 100%);
	border: 1.5px solid var(--sp-gold-border);
	color: var(--sp-ink);
	text-decoration: none;
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) auto;
	align-items: center;
	gap: 11px;
	min-height: 56px;
	box-shadow: var(--sp-shadow);
}

.sp-masterclass-cta-card:hover {
	background: #FFF3C4;
}

.sp-masterclass-cta-icon {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: var(--sp-navy);
	color: var(--sp-gold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sp-masterclass-cta-text {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.38;
	color: var(--sp-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

/* ==========================================================================
   Blueprint <-> Website Completion Sync & Batch Checks (v1.5.1)
   ========================================================================== */

.sp-bp-sync-note {
	margin-top: 3px;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.35;
	color: #BFD0E6;
	overflow-wrap: anywhere;
}

.sp-shell.is-walk-route.is-keyboard-open .sp-bp-sync-note {
	display: none;
}

.sp-bp-topic-title-line {
	display: inline;
	min-width: 0;
	overflow-wrap: anywhere;
}

.sp-bp-app-only-tag {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin-left: 5px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #EDF2F7;
	border: 1px solid #CBD5E1;
	color: #475569;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
	white-space: nowrap;
	text-decoration: none;
}

/* ==========================================================================
   Responsive Multi-Screen Layout: Phone (<768), Tablet (768–1023), Desktop (1024+) (v1.6.0)
   ========================================================================== */

.sp-search-clear[hidden] {
	display: none;
}

/* Base (< 768px): zero visual change to phone layout */
.sp-sidebar {
	display: none;
}

.sp-content-shell {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	min-width: 0;
	width: 100%;
}

.sp-shell.is-ask-route .sp-content-shell,
.sp-shell.is-walk-route .sp-content-shell {
	overflow: hidden;
}

.sp-today-col-main,
.sp-today-col-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
	width: 100%;
}

/* --------------------------------------------------------------------------
   2. Tablet (768px and up; overridden where desktop 1024px+ takes over)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
	.sp-shell {
		max-width: 720px;
	}

	.sp-tabbar {
		max-width: 720px;
	}

	.sp-header,
	.sp-walk-header {
		padding-left: 24px;
		padding-right: 24px;
	}

	.sp-exam-chip-strip {
		padding-left: 24px;
		padding-right: 24px;
	}

	.sp-main {
		padding: 20px 24px calc(88px + env(safe-area-inset-bottom, 0px));
		gap: 16px;
	}

	.sp-today-col-main,
	.sp-today-col-side {
		gap: 16px;
	}

	.sp-ask-main,
	.sp-walk-main {
		padding-left: 24px;
		padding-right: 24px;
	}

	.sp-ask-composer-bar,
	.sp-walk-bottom-bar {
		padding-left: 24px;
		padding-right: 24px;
	}

	/* Comfortable reading measure (~70ch max) for stems, vignettes & explanations */
	.sp-stem,
	.sp-tutor-vignette,
	.sp-tutor-leadin-only,
	.sp-tutor-step2-stack,
	.sp-explanation .sp-rich-html,
	.sp-debrief-point,
	.sp-pearl-row .sp-rich-html {
		max-width: 70ch;
	}

	/* Sensible flashcard width (~640px max, centered) */
	.sp-study-result.is-flashcards-panel,
	.sp-walk-cards-card,
	.sp-flashcard-stage {
		max-width: 640px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	.sp-flashcard-btn {
		min-height: 260px;
		padding: 28px 26px;
	}

	/* Bottom sheets become centered modal dialogs (~480px wide) with dimmed backdrop */
	.sp-sheet-backdrop {
		align-items: center;
		padding: 24px;
	}

	.sp-sheet {
		max-width: 480px;
		max-height: min(86vh, 780px);
		border-radius: 20px;
		padding: 20px 22px 22px;
	}

	.sp-sheet.sp-sheet-flashcards {
		max-width: 580px;
	}
}

/* --------------------------------------------------------------------------
   3. Desktop (1024px and up): Sticky Left Sidebar + Wide Content Area
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
	html:not(.is-ask-active):not(.is-walk-active),
	body:not(.is-ask-active):not(.is-walk-active) {
		overflow-x: clip;
		overflow-y: visible;
	}

	body {
		background-color: var(--sp-bg);
	}

	.sp-app-root {
		overflow-x: clip;
	}

	.sp-shell {
		max-width: none;
		width: 100%;
		box-shadow: none;
	}

	.sp-shell.is-ready-shell {
		display: grid;
		grid-template-columns: 244px minmax(0, 1fr);
		align-items: stretch;
		overflow-x: clip;
	}

	.sp-shell.is-ready-shell.is-ask-route,
	.sp-shell.is-ready-shell.is-walk-route {
		height: 100vh;
		height: 100dvh;
		max-height: 100dvh;
		overflow: hidden;
	}

	.sp-shell.is-ready-shell.is-ask-route .sp-content-shell,
	.sp-shell.is-ready-shell.is-walk-route .sp-content-shell {
		height: 100%;
		min-height: 0;
		overflow: hidden;
	}

	.sp-tabbar {
		display: none !important;
	}

	/* Left Sticky Sidebar (~240px wide) */
	.sp-sidebar {
		display: flex;
		flex-direction: column;
		width: 244px;
		height: 100vh;
		height: 100dvh;
		position: sticky;
		top: 0;
		align-self: start;
		background: #FFFFFF;
		border-right: 1px solid var(--sp-border);
		padding: 18px 14px 16px;
		gap: 18px;
		z-index: 65;
		overflow-y: auto;
	}

	.sp-sidebar-brand {
		display: flex;
		align-items: center;
		gap: 11px;
		padding: 4px 8px 15px;
		border-bottom: 1px solid var(--sp-border);
	}

	.sp-sidebar-logo {
		width: 38px;
		height: 38px;
		border-radius: 11px;
		object-fit: cover;
		background: var(--sp-navy);
		color: var(--sp-gold);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		box-shadow: 0 3px 10px rgba(27, 58, 92, 0.18);
	}

	.sp-sidebar-brand-copy {
		display: flex;
		flex-direction: column;
		min-width: 0;
	}

	.sp-sidebar-brand-title {
		font-size: 1.0625rem;
		font-weight: 800;
		color: var(--sp-ink);
		letter-spacing: -0.015em;
		line-height: 1.18;
	}

	.sp-sidebar-brand-sub {
		font-size: 0.75rem;
		font-weight: 600;
		color: var(--sp-muted);
		line-height: 1.25;
	}

	.sp-sidebar-nav {
		display: flex;
		flex-direction: column;
		gap: 4px;
		width: 100%;
	}

	.sp-sidebar-tab-btn {
		width: 100%;
		min-height: 46px;
		padding: 10px 12px;
		border: 1px solid transparent;
		border-radius: 12px;
		background: transparent;
		color: #334155;
		font-family: var(--sp-font);
		font-size: 0.9375rem;
		font-weight: 600;
		display: flex;
		align-items: center;
		gap: 12px;
		text-align: left;
		cursor: pointer;
		transition: background-color 0.14s ease, color 0.14s ease;
	}

	.sp-sidebar-tab-btn:hover:not(.is-active) {
		background: var(--sp-bg);
		color: var(--sp-navy);
	}

	.sp-sidebar-tab-btn.is-active {
		background: var(--sp-navy);
		color: #FFFFFF;
		font-weight: 700;
		box-shadow: 0 4px 12px rgba(27, 58, 92, 0.16);
	}

	.sp-sidebar-tab-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.sp-sidebar-tab-btn.is-active .sp-sidebar-tab-icon {
		color: var(--sp-gold);
	}

	.sp-sidebar-tab-label {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.sp-sidebar-footer {
		margin-top: auto;
		padding-top: 12px;
		border-top: 1px solid var(--sp-border);
	}

	.sp-sidebar-account-btn {
		width: 100%;
		min-height: 54px;
		padding: 9px 10px;
		border-radius: 14px;
		border: 1px solid var(--sp-border);
		background: var(--sp-bg);
		color: var(--sp-ink);
		font-family: var(--sp-font);
		display: flex;
		align-items: center;
		gap: 10px;
		text-align: left;
		cursor: pointer;
		transition: border-color 0.15s ease, background-color 0.15s ease;
	}

	.sp-sidebar-account-btn:hover {
		border-color: var(--sp-navy);
		background: var(--sp-tint);
	}

	.sp-sidebar-avatar {
		width: 36px;
		height: 36px;
		min-width: 36px;
		border-radius: 999px;
		background: var(--sp-navy);
		color: var(--sp-gold);
		font-size: 0.8125rem;
		font-weight: 800;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.sp-sidebar-account-meta {
		min-width: 0;
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 3px;
	}

	.sp-sidebar-account-name {
		font-size: 0.8125rem;
		font-weight: 700;
		color: var(--sp-ink);
		line-height: 1.2;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.sp-sidebar-exam-pill {
		display: inline-flex;
		align-items: center;
		padding: 2px 8px;
		border-radius: 999px;
		background: var(--sp-navy);
		color: #FFFFFF;
		font-size: 0.6875rem;
		font-weight: 700;
		line-height: 1.3;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.sp-sidebar-exam-pill.is-empty {
		background: var(--sp-gold-soft);
		border: 1px solid var(--sp-gold-border);
		color: var(--sp-ink);
	}

	/* Slimmer Navy Top Bar inside Content Area */
	.sp-header {
		padding: 12px 32px 14px;
	}

	.sp-header > * {
		max-width: 1100px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	.sp-player-header > *,
	.sp-ask-header > * {
		max-width: 760px;
	}

	.sp-walk-header {
		padding: 12px 32px 14px;
	}

	.sp-walk-header > * {
		max-width: 760px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	.sp-header-eyebrow {
		font-size: 0.6875rem;
		margin-bottom: 2px;
	}

	.sp-header-title,
	.sp-ask-title {
		font-size: 1.3125rem;
		line-height: 1.2;
	}

	.sp-header-sub {
		margin-top: 3px;
		font-size: 0.84375rem;
	}

	.sp-today-header .sp-header-copy {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 3px 12px;
	}

	.sp-today-header .sp-header-eyebrow {
		flex: 0 0 100%;
		margin-bottom: 0;
	}

	.sp-today-header .sp-header-sub {
		margin: 0;
		padding: 4px 11px;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.12);
		border: 1px solid rgba(255, 200, 87, 0.5);
		color: #FFFFFF;
		font-size: 0.8125rem;
		font-weight: 600;
		line-height: 1.25;
	}

	.sp-today-header .sp-header-sub-btn {
		margin: 0;
		min-height: 36px;
		padding: 5px 12px;
		font-size: 0.8125rem;
	}

	.sp-exam-chip-strip {
		max-width: 1100px;
		margin: 0 auto;
		padding: 8px 32px;
		flex-wrap: wrap;
	}

	/* Main Content Area (~1100px max, centered, comfortable padding) */
	.sp-main {
		max-width: 1100px;
		width: 100%;
		margin: 0 auto;
		padding: 24px 32px 44px;
		gap: 18px;
	}

	/* Today Dashboard Grid: 60% Left (Plan + Weak Spots) / 40% Right (Streak, Ask, Push stacked) */
	.sp-today-main {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		gap: 22px;
		align-items: start;
	}

	.sp-today-col-main {
		gap: 18px;
	}

	.sp-today-col-side {
		gap: 14px;
	}

	.sp-today-tiles {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	/* Study, QBank & Tutor Mode centered at ~760px (Flashcards at ~640px) */
	.sp-study-main > *,
	.sp-qbank-main > *,
	.sp-player-main > * {
		max-width: 760px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	.sp-study-main > .sp-study-result.is-flashcards-panel {
		max-width: 640px;
	}

	.sp-choice-btn {
		transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
	}

	.sp-choice-btn:hover:not(:disabled) {
		border-color: var(--sp-navy);
		background: #F4F8FD;
		box-shadow: 0 2px 8px rgba(27, 58, 92, 0.08);
	}

	.sp-tutor-choice-row {
		transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
	}

	.sp-tutor-choice-row:hover:not(.is-struck) {
		border-color: var(--sp-navy);
		background: #F8FBFF;
		box-shadow: 0 2px 8px rgba(27, 58, 92, 0.08);
	}

	/* Blueprint Checklists: 2-column topic rows inside 1100px container */
	.sp-topic-rows {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sp-bp-topic-row:nth-child(odd) {
		border-right: 1px solid var(--sp-bg);
	}

	/* Blueprint Walk: centered 760px column (640px on Flashcards tab) + pinned bottom bar */
	.sp-walk-main {
		padding: 22px 32px 24px;
	}

	.sp-walk-main > * {
		max-width: 760px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	.sp-walk-main > .sp-walk-subcat-pill {
		width: fit-content;
		margin-left: max(0px, calc(50% - 380px));
		margin-right: auto;
	}

	.sp-walk-bottom-bar {
		padding: 12px 32px;
		justify-content: center;
		grid-template-columns: minmax(92px, 124px) minmax(0, 496px) minmax(92px, 124px);
		gap: 10px;
	}

	/* Ask Smarty: centered ~760px chat column + input pinned to bottom of content area */
	.sp-ask-back-walk-bar {
		padding: 6px 32px;
	}

	.sp-ask-back-walk-chip {
		margin-left: max(0px, calc(50% - 380px));
	}

	.sp-ask-panre-bar {
		padding: 6px 32px;
		text-align: center;
	}

	.sp-ask-main {
		padding: 20px 32px 16px;
	}

	#sp-ask-messages {
		max-width: 760px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	.sp-ask-composer-bar {
		padding: 12px 32px 16px;
	}

	.sp-ask-composer-meta,
	.sp-ask-composer-row {
		max-width: 760px;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
	}

	/* Center toasts over the main content column */
	.sp-toast {
		left: calc(50% + 122px);
		bottom: 32px;
	}

	.sp-shell.is-ask-route .sp-toast,
	.sp-shell.is-walk-route .sp-toast {
		bottom: 92px;
	}
}

/* ==========================================================================
   v1.7.0 Phone-Testing Fixes: Bank Switchers, Walk Sheet, PEARLS Images, Tutor
   ========================================================================== */

/* Per-tab Bank Switcher & Search Exam Tags */
.sp-today-bank-card {
	padding: 10px 14px;
}

.sp-study-bank-row.is-compact {
	margin: 0;
}

.sp-ask-bank-wrap {
	margin-top: 10px;
}

.sp-ask-bank-wrap .sp-study-bank-row {
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	padding: 4px 10px;
}

.sp-ask-bank-wrap .sp-study-bank-label {
	color: #CBD8EC;
}

.sp-ask-bank-wrap .sp-bank-select-display {
	background: rgba(255, 255, 255, 0.96);
	color: var(--sp-navy);
	height: 36px;
	min-height: 36px;
	padding: 0 12px 0 14px;
	font-size: 0.875rem;
}

.sp-autocomplete-tags {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
	flex-shrink: 0;
}

.sp-tag-exam {
	background: #FEF3C7;
	color: #92400E;
	border: 1px solid #FDE68A;
}

/* Blueprint + More Chip & Picker Sheet */
.sp-chip-more {
	border-style: dashed;
	border-color: var(--sp-navy);
	color: var(--sp-navy);
	background: #FFFFFF;
	font-weight: 700;
}

.sp-bp-picker-section {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sp-muted);
	margin-bottom: 4px;
}

.sp-bp-picker-row {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1.5px solid var(--sp-border);
	background: #FFFFFF;
	color: var(--sp-ink);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	text-align: left;
	cursor: pointer;
}

.sp-bp-picker-row.is-active {
	border-color: var(--sp-navy);
	background: #EFF4FA;
	color: var(--sp-navy);
	font-weight: 700;
}

.sp-bp-picker-name {
	min-width: 0;
	flex: 1;
}

.sp-bp-picker-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	color: var(--sp-navy);
}

/* Blueprint Full-Height Walk Overlay Sheet (keeps checklist intact underneath) */
.sp-walk-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 650;
	background: rgba(15, 36, 64, 0.56);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	overscroll-behavior: contain;
}

.sp-walk-sheet {
	width: 100%;
	height: calc(100dvh - max(8px, env(safe-area-inset-top, 0px)));
	max-height: calc(100dvh - max(8px, env(safe-area-inset-top, 0px)));
	background: var(--sp-bg);
	border-radius: 20px 20px 0 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 -10px 32px rgba(15, 36, 64, 0.28);
}

.sp-walk-sheet .sp-walk-header {
	padding-top: 8px;
}

.sp-walk-sheet-grabber {
	width: 40px;
	height: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.35);
	margin: 0 auto 8px;
}

.sp-walk-sheet .sp-walk-bottom-bar {
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
	.sp-walk-sheet-backdrop {
		justify-content: center;
		padding: 20px;
	}

	.sp-walk-sheet {
		max-width: 780px;
		height: min(92dvh, 900px);
		max-height: min(92dvh, 900px);
		border-radius: 20px;
	}
}

/* PEARLS Clinical Image Chips */
.sp-pearl-img-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 8px;
}

.sp-pearl-img-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1.5px solid rgba(27, 58, 92, 0.22);
	background: #EFF4FA;
	color: var(--sp-navy);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.sp-pearl-img-chip:hover {
	background: #E2ECF7;
	border-color: var(--sp-navy);
}

.sp-pearl-img-chip:active {
	transform: scale(0.98);
}

/* Full-Screen Dark Clinical Image Viewer */
.sp-img-viewer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  /* 1.7.10: near-opaque + blur so card text never shows through around the image */
  background: rgba(8, 12, 22, 0.985);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
	color: #FFFFFF;
	display: flex;
	flex-direction: column;
	overscroll-behavior: contain;
}

.sp-img-viewer-top {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px;
}

.sp-img-viewer-meta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sp-img-viewer-type {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 200, 87, 0.18);
	color: var(--sp-gold);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sp-img-viewer-counter {
	font-size: 0.8125rem;
	font-weight: 700;
	color: #CBD8EC;
}

.sp-img-viewer-close {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.sp-img-viewer-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
	padding: 8px 16px;
}

.sp-img-viewer-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 8px;
	user-select: none;
	-webkit-user-drag: none;
	transition: transform 0.08s ease-out;
	will-change: transform;
}

.sp-img-viewer-img.is-zoomed {
	cursor: grab;
}

.sp-img-viewer-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(15, 36, 64, 0.72);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.sp-img-viewer-nav.is-prev {
	left: 12px;
}

.sp-img-viewer-nav.is-next {
	right: 12px;
}

.sp-img-viewer-nav:disabled {
	opacity: 0.28;
	cursor: default;
}

.sp-img-viewer-footer {
	flex-shrink: 0;
	padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(180deg, rgba(5, 10, 18, 0) 0%, rgba(5, 10, 18, 0.92) 28%);
	text-align: center;
	max-width: 720px;
	width: 100%;
	margin: 0 auto;
}

.sp-img-viewer-caption {
	margin: 0 0 4px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.45;
	color: #FFFFFF;
}

.sp-img-viewer-credit {
	margin: 0 0 6px;
	font-size: 0.75rem;
	color: #9FB3CE;
}

.sp-img-viewer-hint {
	margin: 0;
	font-size: 0.72rem;
	color: rgba(203, 216, 236, 0.68);
}

/* Tutor Step Chips (clickable back-navigation) & Left-Aligned Vignette */
.sp-tutor-step-pill.is-clickable {
	appearance: none;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.sp-tutor-step-pill.is-clickable:hover {
	box-shadow: 0 0 0 2px rgba(27, 58, 92, 0.28);
}

.sp-tutor-step-pill.is-clickable:active {
	transform: scale(0.97);
}

.sp-stem,
.sp-tutor-first-sent,
.sp-tutor-leadin-only,
.sp-tutor-leadin-sub {
	text-align: left;
	word-spacing: normal;
}

.sp-question-img-btn {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 10px 0 12px;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	text-align: center;
}

.sp-question-img-btn .sp-question-img {
	margin: 0 auto;
	display: block;
}

.sp-question-img-zoom-hint {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--sp-muted);
}

/* v1.7.2 Discoverable Focus Header Pill & Inline Bank "Set as focus" Bar */
.sp-header-focus-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	text-align: left;
}

.sp-header-change-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 200, 87, 0.2);
	border: 1px solid rgba(255, 200, 87, 0.45);
	color: var(--sp-gold);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.sp-bank-switcher-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sp-bank-focus-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	padding: 6px 10px;
	border-radius: 10px;
	background: #EFF4FA;
	border: 1px solid rgba(27, 58, 92, 0.14);
}

.sp-bank-focus-note {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sp-navy);
	line-height: 1.35;
}

.sp-bank-focus-actions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.sp-bank-set-focus-btn {
	min-height: 30px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 0;
	background: var(--sp-gold);
	color: var(--sp-navy);
	font: inherit;
	font-size: 0.75rem;
	font-weight: 800;
	cursor: pointer;
}

.sp-bank-set-focus-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.sp-bank-reset-btn {
	min-height: 30px;
	padding: 4px 8px;
	border-radius: 999px;
	border: 1px solid rgba(27, 58, 92, 0.22);
	background: #FFFFFF;
	color: var(--sp-navy);
	font: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
}

.sp-ask-bank-wrap .sp-bank-focus-bar {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.22);
}

.sp-ask-bank-wrap .sp-bank-focus-note {
	color: #E2ECF7;
}

.sp-ask-bank-wrap .sp-bank-reset-btn {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.3);
	color: #FFFFFF;
}






/* 1.7.10: once a PEARLS card or flashcards are open, the Topic card shrinks so the card sits higher on screen.
   The selected-topic line, suggestion chips and Tutor toggle (quiz-only) hide; the search box already shows the topic. */
.sp-study-topic-compact .sp-study-selected-row,
.sp-study-topic-compact .sp-study-chips,
.sp-study-topic-compact .sp-tutor-toggle-btn {
  display: none !important; /* the selected row carries an inline display:flex */
}
.sp-study-topic-compact.sp-stack-md {
  gap: 10px;
}


/* ==========================================================================
   1.8.1 Retention loop: SRS rating row, due-review button, QBank flag,
   recent sessions and session review
   ========================================================================== */
.sp-srs-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sp-srs-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  cursor: pointer;
  background: var(--sp-surface-2, #F3F6FA);
  color: var(--sp-ink, #0B1B33);
}
.sp-srs-btn strong {
  font-size: 0.9375rem;
  font-weight: 800;
}
.sp-srs-btn span {
  font-size: 0.72rem;
  opacity: 0.8;
}
.sp-srs-btn.is-again {
  border-color: #E5484D;
  background: #FDECEC;
  color: #8E1B1F;
}
.sp-srs-btn.is-hard {
  border-color: #E8A33A;
  background: #FFF4E0;
  color: #7A4B00;
}
.sp-srs-btn.is-good {
  border-color: #2E9E6A;
  background: #E6F6EE;
  color: #145A3B;
}
.sp-srs-btn:focus-visible {
  outline: 3px solid var(--sp-gold, #F5B82E);
  outline-offset: 2px;
}
.sp-srs-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--sp-muted, #5B6B82);
  text-align: center;
}
.sp-srs-note.is-done {
  color: #145A3B;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sp-srs-note.is-error {
  color: #8E1B1F;
}
.sp-srs-due-btn {
  justify-content: center;
}
.sp-flag-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #FFFFFF;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.sp-flag-btn.is-on {
  background: var(--sp-gold, #F5B82E);
  border-color: var(--sp-gold, #F5B82E);
  color: #0B1B33;
}
.sp-recent-list,
.sp-review-list,
.sp-review-choices {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-recent-list li + li {
  border-top: 1px solid var(--sp-line, #E3E8EF);
}
.sp-recent-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--sp-ink, #0B1B33);
  text-align: left;
  cursor: pointer;
}
.sp-recent-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
}
.sp-recent-main .sp-muted {
  font-size: 0.78rem;
}
.sp-recent-score {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 800;
}
.sp-recent-score.is-good {
  background: #E6F6EE;
  color: #145A3B;
}
.sp-recent-score.is-mid {
  background: #FFF4E0;
  color: #7A4B00;
}
.sp-recent-score.is-low {
  background: #FDECEC;
  color: #8E1B1F;
}
.sp-review-item {
  border: 1px solid var(--sp-line, #E3E8EF);
  border-left-width: 4px;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.sp-review-item.is-correct {
  border-left-color: #2E9E6A;
}
.sp-review-item.is-missed {
  border-left-color: #E5484D;
}
.sp-review-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--sp-ink, #0B1B33);
  text-align: left;
  cursor: pointer;
}
.sp-review-mark {
  font-weight: 800;
  width: 18px;
  text-align: center;
}
.sp-review-item.is-correct .sp-review-mark {
  color: #2E9E6A;
}
.sp-review-item.is-missed .sp-review-mark {
  color: #E5484D;
}
.sp-review-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.875rem;
}
.sp-review-title .sp-muted {
  font-size: 0.78rem;
}
.sp-review-body {
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-review-img {
  max-width: 100%;
  border-radius: 10px;
}
.sp-review-choices li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 4px;
  background: var(--sp-surface-2, #F3F6FA);
}
.sp-review-choices li.is-correct {
  background: #E6F6EE;
}
.sp-review-choices li.is-wrong {
  background: #FDECEC;
}
.sp-review-letter {
  font-weight: 800;
  flex-shrink: 0;
}
.sp-review-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}


/* ==========================================================================
   1.9.0 Phase 2: Exam readiness strip and Exam block
   ========================================================================== */
.sp-ready-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-ready-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-ready-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sp-ready-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--sp-surface-2, #F3F6FA);
  color: var(--sp-ink, #0B1B33);
  text-align: center;
}
.sp-ready-stat-btn {
  border: 1px dashed var(--sp-line, #C9D3E1);
  font: inherit;
  cursor: pointer;
}
.sp-ready-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
}
.sp-ready-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}
.sp-ready-sub {
  font-size: 0.7rem;
  color: var(--sp-muted, #5B6B82);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.sp-ready-stat.is-early .sp-ready-val {
  color: var(--sp-muted, #5B6B82);
}
.sp-ready-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--sp-muted, #5B6B82);
}
.sp-exam-block-btn {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sp-exam-block-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--sp-muted, #5B6B82);
}


/* ==========================================================================
   1.10.0 Phase 3: PEARLS active recall, mobile Today header, Exam block finish
   ========================================================================== */
.sp-recall-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sp-recall-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid #E0A82E;
  background: #FEF3C7;
  color: var(--sp-navy, #1B3A5C);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 100ms ease;
}
.sp-recall-toggle:active {
  transform: scale(0.98);
}
.sp-recall-toggle.is-on {
  background: var(--sp-navy, #1C2E4A);
  border-color: var(--sp-navy, #1C2E4A);
  color: #FFFFFF;
}
.sp-recall-help {
  font-size: 0.75rem;
  color: var(--sp-muted, #5B6B82);
}
.sp-pearl-reveal {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.sp-pearl-row.is-blurred .sp-pearl-reveal .sp-rich-html {
  filter: blur(7px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  transition: filter 0.15s ease;
}
.sp-pearl-row.is-blurred {
  border-radius: 10px;
  background: var(--sp-surface-2, #F3F6FA);
}
.sp-pearl-reveal:focus-visible {
  outline: 3px solid var(--sp-gold, #F5B82E);
  outline-offset: 2px;
  border-radius: 8px;
}
.sp-pearl-reveal-hint {
  margin-left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sp-muted, #5B6B82);
}

/* Today header focus pill: one line on phones (short exam name, no wrap) */
.sp-today-header .sp-header-focus-btn {
  flex-wrap: nowrap;
  max-width: 100%;
  white-space: nowrap;
}
.sp-today-header .sp-header-focus-btn > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-today-header .sp-header-change-pill {
  flex-shrink: 0;
}

/* Exam block: finish early and score */
.sp-finish-early-btn {
  margin-top: 8px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.sp-finish-early-btn.is-armed {
  color: var(--sp-gold, #F5B82E);
}

/* ==========================================================================
   1.10.1: clickable readiness tiles + website QBank note
   ========================================================================== */
.sp-ready-stat-link {
  position: relative;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.sp-ready-stat-link.sp-ready-stat-btn {
  border: 1px dashed var(--sp-line, #C9D3E1);
}
.sp-ready-stat-link:hover {
  border-color: var(--sp-line, #C9D3E1);
}
.sp-ready-stat-link:active {
  transform: scale(0.97);
  background: var(--sp-line-soft, #E6ECF4);
}
.sp-ready-stat-link:focus-visible {
  outline: 2px solid var(--sp-accent, #1C4587);
  outline-offset: 2px;
}
.sp-ready-chev {
  position: absolute;
  top: 4px;
  right: 7px;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--sp-muted, #5B6B82);
  opacity: 0.55;
}
.sp-ready-src {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
}

/* 1.10.2: tappable "N days left" pill on the readiness card */
.sp-ready-days {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.sp-ready-days:hover {
  opacity: 0.88;
}
.sp-ready-days:active {
  transform: scale(0.96);
}
.sp-ready-days:focus-visible {
  outline: 2px solid var(--sp-accent, #1C4587);
  outline-offset: 2px;
}
.sp-ready-days-chev {
  opacity: 0.7;
  line-height: 1;
}

/* ==========================================================================
   1.11.0: question highlights + notes, My notes, answer strikethrough
   ========================================================================== */
mark.sp-qn-hl {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.sp-qn-hl.has-note {
  border-bottom: 2px solid #d97706;
}
.sp-qn-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-radius: 50%;
  background: #d97706;
  vertical-align: super;
}
.sp-qn-bar {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--sp-navy, #1C4587);
  box-shadow: 0 8px 24px rgba(11, 27, 51, 0.28);
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}
.sp-qn-bar.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.sp-qn-bar[hidden] {
  display: none;
}
.sp-qn-bar-btn {
  white-space: nowrap; /* 1.11.2: one line at 390px */
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sp-qn-bar-btn[data-qn-bar='highlight'] {
  background: #fef08a;
  color: #0B1B33;
}
.sp-qn-bar-btn:active {
  transform: scale(0.96);
}
@media (min-width: 900px) {
  .sp-qn-bar {
    bottom: 28px;
  }
}
.sp-qn-btn {
  position: relative;
}
.sp-qn-btn.is-on {
  background: #fef08a;
  border-color: #fef08a;
  color: #0B1B33;
}
.sp-qn-btn.is-light {
  border-color: var(--sp-line, #C9D3E1);
  color: var(--sp-ink, #0B1B33);
}
.sp-qn-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0B1B33;
  color: #fff;
  font-size: 0.6875rem;
  line-height: 18px;
  text-align: center;
}
@media (max-width: 380px) {
  .sp-player-topbar .sp-qn-btn span:not(.sp-qn-badge),
  .sp-player-topbar .sp-flag-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}
.sp-qn-review-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
  font-size: 0.78rem;
}
.sp-qn-sheet .sp-qn-quote,
.sp-mn-snip mark {
  font-size: 0.9rem;
}
.sp-qn-quote {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-left: 3px solid #d97706;
  background: #fef9c3;
  border-radius: 6px;
  color: var(--sp-ink, #0B1B33);
}
.sp-qn-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font: inherit;
}
.sp-qn-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.sp-qn-actions .sp-btn {
  flex: 1 1 140px;
}
.sp-qn-snips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.sp-qn-snip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--sp-line, #E3E8EF);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sp-qn-snip-quote {
  font-size: 0.8rem;
  color: var(--sp-muted, #5B6B82);
}
.sp-qn-snip-note,
.sp-qn-tip {
  font-size: 0.85rem;
}
.sp-qn-tip {
  margin: 12px 0 0;
}
/* Strikethrough on regular (non-Tutor) choices */
.sp-choice-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.sp-choice-row > .sp-choice-btn {
  flex: 1 1 auto;
  min-width: 0;
}
.sp-choice-row .sp-qn-strike {
  width: 40px;
  min-width: 40px;
  min-height: 0;
  border: 1px solid var(--sp-border, #E3E8EF);
  border-radius: 12px;
  opacity: 0.75;
}
.sp-choice-row .sp-qn-strike:hover {
  opacity: 1;
}
.sp-choice-row.is-struck .sp-choice-btn {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
.sp-choice-row.is-struck .sp-choice-text,
.sp-choice-row.is-struck-post .sp-choice-btn:not(.is-correct):not(.is-wrong) .sp-choice-text {
  text-decoration: line-through;
  color: #64748B;
}
.sp-choice-row.is-struck .sp-qn-strike {
  opacity: 1;
  background: #E2E8F0;
  color: var(--sp-navy, #1C4587);
}
/* My notes */
.sp-mn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sp-mn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.sp-mn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-mn-item {
  padding: 12px;
  border: 1px solid var(--sp-line, #E3E8EF);
  border-radius: 12px;
  background: #fff;
}
.sp-mn-excerpt {
  margin: 4px 0 6px;
  font-size: 0.85rem;
  color: var(--sp-muted, #5B6B82);
}
.sp-mn-note {
  display: flex;
  gap: 6px;
  margin: 6px 0;
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.sp-mn-snip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0;
  font-size: 0.875rem;
  white-space: pre-wrap;
}
.sp-mn-count {
  margin: 4px 0 0;
  font-size: 0.78rem;
}
.sp-mn-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.sp-mn-sheet .sp-review-body {
  padding: 0;
}

/* ==========================================================================
   1.12.0: Blueprint Comparison tables — compact table on desktop, mini-cards on phones
   ========================================================================== */
.sp-cmp-wrap {
  margin: 10px 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sp-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.4;
  background: #fff;
  border: 1px solid var(--sp-line, #E3E8EF);
  border-radius: 10px;
  overflow: hidden;
}
.sp-cmp-table th,
.sp-cmp-table td {
  padding: 8px 10px;
  border: 1px solid var(--sp-line, #E3E8EF);
  text-align: left;
  vertical-align: top;
}
.sp-cmp-table thead th,
.sp-cmp-table .sp-cmp-headrow > * {
  background: var(--sp-tint, #EEF3FA);
  color: var(--sp-ink, #0B1B33);
  font-weight: 700;
  font-size: 0.8125rem;
}
.sp-cmp-table td.sp-cmp-title {
  font-weight: 700;
}
@media (max-width: 599px) {
  .sp-cmp-wrap {
    overflow: visible;
  }
  .sp-cmp-table,
  .sp-cmp-table tbody,
  .sp-cmp-table tr,
  .sp-cmp-table td {
    display: block;
    width: 100%;
  }
  .sp-cmp-table {
    border: 0;
    background: transparent;
    border-radius: 0;
  }
  .sp-cmp-table thead,
  .sp-cmp-table .sp-cmp-headrow {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .sp-cmp-table tbody tr {
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid var(--sp-line, #E3E8EF);
    border-left: 3px solid var(--sp-navy, #1C4587);
    border-radius: 12px;
    background: #F8FAFD;
  }
  .sp-cmp-table td {
    padding: 3px 0;
    border: 0;
  }
  .sp-cmp-table td.sp-cmp-title {
    padding-bottom: 6px;
    font-size: 0.9375rem;
    color: var(--sp-ink, #0B1B33);
  }
  .sp-cmp-table td[data-label]::before {
    content: attr(data-label) ': ';
    font-weight: 700;
    color: var(--sp-ink, #0B1B33);
  }
  .sp-cmp-table td.is-empty {
    display: none;
  }
}

/* ==========================================================================
   1.12.1: in-app confirm sheet, account legal links, delete account
   ========================================================================== */
.sp-btn-danger {
  background-color: #B42318;
  color: #FFFFFF;
}
.sp-btn-danger:hover:not(:disabled) {
  background-color: #912018;
}
.sp-confirm-sheet .sp-card-title {
  margin: 0 0 6px;
}
.sp-confirm-body {
  margin: 0 0 4px;
  font-size: 0.9rem;
}
.sp-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.sp-confirm-actions .sp-btn {
  flex: 1 1 0;
  min-height: 44px;
}
.sp-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 6px;
  font-size: 0.8125rem;
}
.sp-legal-links a,
.sp-legal-links button {
  color: var(--sp-muted, #5B6B82);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  cursor: pointer;
}
.sp-legal-links .sp-legal-danger {
  color: #B42318;
}

/* ==========================================================================
   1.12.5: Study Quick Access, Ask Smarty topic pill, Appearance, Local Reminder, Dark Mode
   ========================================================================== */

.sp-study-quick-card {
	margin-top: 14px;
}

.sp-ask-topic-btn {
	background: var(--sp-tint);
	color: var(--sp-navy);
	border: 1px solid var(--sp-border);
	font-weight: 700;
}

.sp-account-pref-block {
	border-top: 1px solid var(--sp-border);
	padding-top: 12px;
	margin-top: 2px;
}

.sp-account-pref-label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sp-ink);
	margin-bottom: 8px;
}

.sp-theme-seg {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 4px;
	background: var(--sp-bg);
	border: 1px solid var(--sp-border);
	border-radius: 12px;
}

.sp-theme-seg-btn {
	min-height: 36px;
	border: none;
	border-radius: 9px;
	background: transparent;
	color: var(--sp-muted);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.sp-theme-seg-btn.is-active {
	background: var(--sp-card);
	color: var(--sp-ink);
	box-shadow: 0 1px 4px rgba(15, 36, 64, 0.12);
}

.sp-reminder-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.sp-reminder-time-row {
	margin-top: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.sp-reminder-time-input {
	height: 38px;
	padding: 0 10px;
	border-radius: 10px;
	border: 1px solid var(--sp-border);
	background: var(--sp-bg);
	color: var(--sp-ink);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
}

/* ---------- OLED-Friendly Dark Mode (html[data-theme="dark"]) ---------- */

html[data-theme="dark"] {
	color-scheme: dark;
	--sp-bg: #0B1320;
	--sp-card: #131E30;
	--sp-surface: #131E30;
	--sp-tint: #1B2A42;
	--sp-border: #253652;
	--sp-line: #2B3E5E;
	--sp-ink: #F1F5F9;
	--sp-muted: #94A3B8;
	--sp-gold-soft: #262013;
	--sp-gold-border: #7A5B1A;
	--sp-correct-fg: #4ADE80;
	--sp-correct-bg: #0F291E;
	--sp-correct-border: #166534;
	--sp-wrong-fg: #FCA5A5;
	--sp-wrong-bg: #2D1518;
	--sp-wrong-border: #991B1B;
	--sp-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
	--sp-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .sp-tabbar,
html[data-theme="dark"] .sp-walk-footer {
	background: #0F1929;
	border-color: var(--sp-border);
}

html[data-theme="dark"] .sp-card-gold {
	background: linear-gradient(180deg, #272013 0%, #1D1810 100%);
	border-color: #6B5016;
}

html[data-theme="dark"] .sp-plan-item-btn,
html[data-theme="dark"] .sp-ready-stat,
html[data-theme="dark"] .sp-readiness-tile,
html[data-theme="dark"] .sp-tutor-toggle-btn,
html[data-theme="dark"] .sp-tutor-toggle-btn.is-on,
html[data-theme="dark"] .sp-tutor-toggle-btn.is-on-gold,
html[data-theme="dark"] .sp-tutor-toggle-btn.is-on-gold.is-on,
html[data-theme="dark"] .sp-pearl-row,
html[data-theme="dark"] .sp-input,
html[data-theme="dark"] .sp-select,
html[data-theme="dark"] .sp-textarea,
html[data-theme="dark"] .sp-auth-input,
html[data-theme="dark"] .sp-auth-input:focus,
html[data-theme="dark"] .sp-chip,
html[data-theme="dark"] .sp-chip-more,
html[data-theme="dark"] .sp-btn-secondary,
html[data-theme="dark"] .sp-btn-outline,
html[data-theme="dark"] .sp-seg-btn,
html[data-theme="dark"] .sp-choice-btn,
html[data-theme="dark"] .sp-choice-readonly,
html[data-theme="dark"] .sp-tutor-choice-row,
html[data-theme="dark"] .sp-flashcard-btn,
html[data-theme="dark"] .sp-ask-suggestion-chip,
html[data-theme="dark"] .sp-ask-bubble-notice,
html[data-theme="dark"] .sp-setup-option-card,
html[data-theme="dark"] .sp-my-exam-card,
html[data-theme="dark"] .sp-focus-radio-label,
html[data-theme="dark"] .sp-hide-checked-btn,
html[data-theme="dark"] .sp-bp-sys-pill,
html[data-theme="dark"] .sp-category-card.is-collapsed .sp-category-band,
html[data-theme="dark"] .sp-category-card.is-collapsed .sp-category-band:hover,
html[data-theme="dark"] .sp-category-actions,
html[data-theme="dark"] .sp-cat-action-btn,
html[data-theme="dark"] .sp-bp-check-box,
html[data-theme="dark"] .sp-walk-tab-btn.is-active,
html[data-theme="dark"] .sp-tile,
html[data-theme="dark"] .sp-bp-cat-btn,
html[data-theme="dark"] .sp-bp-picker-row,
html[data-theme="dark"] .sp-pearl-img-chip,
html[data-theme="dark"] .sp-bank-focus-bar,
html[data-theme="dark"] .sp-bank-reset-btn,
html[data-theme="dark"] .sp-autocomplete,
html[data-theme="dark"] .sp-explanation,
html[data-theme="dark"] .sp-tutor-coach,
html[data-theme="dark"] .sp-tutor-leadin-only,
html[data-theme="dark"] .sp-debrief-h2h,
html[data-theme="dark"] .sp-mn-item,
html[data-theme="dark"] .sp-qn-snip,
html[data-theme="dark"] .sp-cmp-table,
html[data-theme="dark"] .sp-cmp-table tbody tr {
	background: #1A273D;
	border-color: var(--sp-border);
	color: var(--sp-ink);
}

html[data-theme="dark"] .sp-seg-btn.is-active,
html[data-theme="dark"] .sp-bp-sys-pill.is-active,
html[data-theme="dark"] .sp-setup-option-card.is-selected,
html[data-theme="dark"] .sp-my-exam-card.is-focused,
html[data-theme="dark"] .sp-bp-picker-row.is-active,
html[data-theme="dark"] .sp-hide-checked-btn.is-active {
	background: #255080;
	border-color: #3B73B4;
	color: #FFFFFF;
}

html[data-theme="dark"] .sp-btn-gold {
	background: var(--sp-gold);
	color: #0F2440;
	border-color: transparent;
}

html[data-theme="dark"] .sp-category-band,
html[data-theme="dark"] .sp-category-count,
html[data-theme="dark"] .sp-category-title,
html[data-theme="dark"] .sp-category-chev,
html[data-theme="dark"] .sp-bank-select,
html[data-theme="dark"] select.sp-bank-select,
html[data-theme="dark"] .sp-bank-bar select {
	color: var(--sp-ink);
}

html[data-theme="dark"] .sp-bank-select,
html[data-theme="dark"] select.sp-bank-select,
html[data-theme="dark"] .sp-bank-bar select {
	background: #1A273D;
	border-color: #31486B;
}

html[data-theme="dark"] .sp-ask-composer-bar,
html[data-theme="dark"] .sp-walk-bottom-bar,
html[data-theme="dark"] .sp-ask-back-walk-bar,
html[data-theme="dark"] .sp-sidebar,
html[data-theme="dark"] .sp-exam-chip-bar,
html[data-theme="dark"] .sp-setup-eor-drawer {
	background: #0F1929;
	border-color: var(--sp-border);
	color: var(--sp-ink);
}

html[data-theme="dark"] .sp-flashcard-btn.is-flipped {
	background: #16243A;
	border-color: #3B73B4;
	color: var(--sp-ink);
}

html[data-theme="dark"] .sp-plan-type,
html[data-theme="dark"] .sp-tag,
html[data-theme="dark"] .sp-tag-exam,
html[data-theme="dark"] .sp-bp-app-only-tag,
html[data-theme="dark"] .sp-tutor-step-pill {
	background: #243754;
	color: #CBD8EC;
	border-color: #31486B;
}

html[data-theme="dark"] .sp-tabbar-btn.is-active,
html[data-theme="dark"] .sp-tabbar button.is-active {
	color: #FFC857;
}

html[data-theme="dark"] .sp-ask-bank-wrap .sp-select,
html[data-theme="dark"] .sp-ask-bank-wrap select {
	background: #1A273D;
	border-color: #31486B;
	color: #F1F5F9;
}

html[data-theme="dark"] .sp-tutor-toggle-title {
	color: #F1F5F9;
}

html[data-theme="dark"] .sp-tutor-toggle-sub {
	color: #94A3B8;
}

html[data-theme="dark"] .sp-text-btn,
html[data-theme="dark"] .sp-skip-link,
html[data-theme="dark"] .sp-rich-html a,
html[data-theme="dark"] .sp-wikilink-term,
html[data-theme="dark"] .sp-bp-expand-toggle,
html[data-theme="dark"] .sp-bank-set-focus-btn,
html[data-theme="dark"] .sp-auth-secondary-link {
	color: #93C5FD;
}

/* 1.12.9: Dark Mode contrast fix for all navy-colored labels, tabs, icons, and bank displays */
html[data-theme="dark"] .sp-walk-tab-btn {
	color: #CBD8EC;
}

html[data-theme="dark"] .sp-walk-tab-btn.is-active {
	background: #255080;
	color: #FFFFFF;
}

html[data-theme="dark"] .sp-pearl-label {
	color: #FFC857;
}

html[data-theme="dark"] .sp-pearl-reveal-hint {
	color: #CBD8EC;
	background: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .sp-walk-subcat-pill,
html[data-theme="dark"] .sp-flashcard-side,
html[data-theme="dark"] .sp-choice-letter,
html[data-theme="dark"] .sp-setup-step-kicker,
html[data-theme="dark"] .sp-debrief-label,
html[data-theme="dark"] .sp-debrief-sec-title,
html[data-theme="dark"] .sp-debrief-top,
html[data-theme="dark"] .sp-bank-focus-note,
html[data-theme="dark"] .sp-bp-picker-meta,
html[data-theme="dark"] .sp-ask-back-walk-chip {
	color: #CBD8EC;
}

html[data-theme="dark"] .sp-bank-select-display,
html[data-theme="dark"] .sp-bank-select-chevron,
html[data-theme="dark"] .sp-ask-bank-wrap .sp-bank-select-display,
html[data-theme="dark"] .sp-ask-bank-wrap .sp-bank-select-chevron,
html[data-theme="dark"] .sp-tile-icon,
html[data-theme="dark"] .sp-tutor-toggle-icon,
html[data-theme="dark"] .sp-icon-btn,
html[data-theme="dark"] .sp-icon-btn.is-active,
html[data-theme="dark"] .sp-tab-btn.is-active {
	color: #F1F5F9;
}

html[data-theme="dark"] .sp-bank-select-display,
html[data-theme="dark"] .sp-ask-bank-wrap .sp-bank-select-display {
	background: #1A273D;
	border-color: #31486B;
}

html[data-theme="dark"] .sp-tab-btn.is-active {
	color: #FFC857;
}

/* 1.12.10: Dark Mode choice letter circles & strikeout buttons */
html[data-theme="dark"] .sp-choice-letter {
	background: #2B3E5E;
	color: #F1F5F9;
}

html[data-theme="dark"] .sp-choice-btn.is-selected .sp-choice-letter,
html[data-theme="dark"] .sp-tutor-choice-row.is-selected .sp-choice-letter {
	background: #3B73B4;
	color: #FFFFFF;
}

html[data-theme="dark"] .sp-choice-strike-btn {
	background: #243754;
	color: #CBD8EC;
	border-left-color: #31486B;
}

html[data-theme="dark"] .sp-tutor-choice-row.is-struck,
html[data-theme="dark"] .sp-choice-row.is-struck .sp-choice-btn {
	background: #131E30;
	border-color: #1F2E47;
}

html[data-theme="dark"] .sp-tutor-choice-row.is-struck .sp-choice-letter,
html[data-theme="dark"] .sp-choice-row.is-struck .sp-choice-letter {
	background: #1E2E47;
	color: #64748B;
}

html[data-theme="dark"] .sp-tutor-choice-row.is-struck .sp-choice-strike-btn,
html[data-theme="dark"] .sp-choice-row.is-struck .sp-choice-strike-btn {
	background: #1E2E47;
	color: #93C5FD;
}

/* 1.12.9: Board-trap inline badges inside PEARLS cards (Initial / Gold Standard / 1st-Line / vs) */
.sp-trap-pill {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 6px;
	font-size: 0.78em;
	font-weight: 800;
	letter-spacing: 0.01em;
	vertical-align: baseline;
}
.sp-trap-dx {
	background: #DBEAFE;
	color: #1E40AF;
}
.sp-trap-tx {
	background: #DCFCE7;
	color: #166534;
}
.sp-trap-warn {
	background: #FEF3C7;
	color: #92400E;
}
.sp-trap-vs {
	background: #EDE9FE;
	color: #5B21B6;
}
html[data-theme="dark"] .sp-trap-dx {
	background: rgba(59, 130, 246, 0.22);
	color: #93C5FD;
}
html[data-theme="dark"] .sp-trap-tx {
	background: rgba(34, 197, 94, 0.20);
	color: #86EFAC;
}
html[data-theme="dark"] .sp-trap-warn {
	background: rgba(245, 158, 11, 0.22);
	color: #FDE68A;
}
html[data-theme="dark"] .sp-trap-vs {
	background: rgba(139, 92, 246, 0.24);
	color: #DDD6FE;
}

html[data-theme="dark"] .sp-walk-tabs {
	background: #0E1726;
}

html[data-theme="dark"] .sp-btn-navy {
	background: #255080;
	color: #FFFFFF;
}

html[data-theme="dark"] .sp-recall-toggle {
	background: #2C2310;
	border-color: #D49B24;
	color: #FDE68A;
}

html[data-theme="dark"] .sp-recall-toggle.is-on {
	background: #255080;
	border-color: #3B73B4;
	color: #FFFFFF;
}

html[data-theme="dark"] .sp-ask-topic-btn {
	background: #1B2A42;
	color: #E2E8F0;
}

html[data-theme="dark"] .sp-sheet,
html[data-theme="dark"] .sp-modal {
	background: #111B2B;
	color: var(--sp-ink);
}

html[data-theme="dark"] .sp-auth-screen {
	background: linear-gradient(180deg, #162742 0%, #0E1A2E 52%, #0B1320 52%);
}
