/* Authenticated product polish. Reuses the app's existing --msai-* contract. */
body.msai-frontend-app-active {
	--msai-bg: #f8fafc;
	--msai-bg-strong: #f3f6fa;
	--msai-surface-soft: #f8fafc;
	--msai-border: #dfe6ef;
	--msai-border-strong: #cbd7e5;
	--msai-text: #14293e;
	--msai-text-soft: #52677e;
	--msai-text-muted: #667b91;
	--msai-shadow-sm: 0 6px 18px rgba(20, 41, 62, .045);
	--msai-shadow-md: 0 12px 32px rgba(20, 41, 62, .065);
	--msai-radius-sm: 10px;
	--msai-radius-md: 14px;
	--msai-radius-lg: 20px;
	--msai-motion-fast: 160ms;
	--msai-motion-base: 220ms;
	--msai-motion-ease: cubic-bezier(.22, 1, .36, 1);
	background: var(--msai-bg);
}
body.msai-frontend-app-active #msai-app,
body.msai-frontend-app-active #msai-app :where(button, input, select, textarea) {
	font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}
body.msai-frontend-app-active #msai-app :where(button, input, select, textarea):focus-visible {
	outline: 2px solid var(--msai-primary);
	outline-offset: 2px;
}
body.msai-frontend-app-active #msai-app :where(button, input, select, textarea):disabled {
	cursor: not-allowed;
	opacity: .56;
}

/* The learning library has one content grid and one compact progress pattern. */
#msai-app .msai-courses-panel {
	width: 100%;
	max-width: 1360px;
	margin-inline: auto;
	gap: 18px;
	padding: clamp(16px, 2.4vw, 32px);
	background: #fff;
}
#msai-app #msai-quizzes-subview,
#msai-app #msai-courses-subview { padding-top: 0; }
#msai-app #msai-quizzes-subview::before,
#msai-app #msai-courses-subview::before,
#msai-app .msai-art-panel::before,
#msai-app .msai-art-hero::after,
#msai-app .msai-courses-hero::after { display: none; }
#msai-app .msai-quiz-hub-hero,
#msai-app .msai-courses-hero,
#msai-app .msai-art-hero {
	display: block;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}
#msai-app .msai-art-panel { padding: 0 0 40px; }
#msai-app .msai-quiz-performance,
#msai-app .msai-courses-stats,
#msai-app .msai-art-hero__stats {
	width: 100%;
	margin: 0;
	gap: 10px;
	background: transparent;
	box-shadow: none;
}
#msai-app .msai-quiz-performance {
	min-height: 0;
	border: 1px solid var(--msai-border);
	border-radius: var(--msai-radius-lg);
	background: #fff;
	box-shadow: var(--msai-shadow-sm);
}
#msai-app .msai-quiz-performance__mastery {
	background: linear-gradient(135deg, #294bc4, #4268dd);
	color: #fff;
}
#msai-app .msai-quiz-performance__mastery strong { color: #fff; }
#msai-app .msai-quiz-performance__mastery small { color: #dce7ff; }
#msai-app .msai-quiz-performance__ring { background: conic-gradient(#9bc5ff calc(var(--quiz-progress) * 1%), rgba(255, 255, 255, .22) 0); }
#msai-app .msai-quiz-performance__ring i { background: #3157d5; }
#msai-app .msai-courses-stats {
	grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--msai-border);
	border-radius: var(--msai-radius-lg);
	background: #f8fbff;
	box-shadow: var(--msai-shadow-sm);
}
#msai-app .msai-courses-progress,
#msai-app .msai-courses-stat {
	min-width: 0;
	min-height: 118px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
	animation: none;
}
#msai-app .msai-courses-progress {
	gap: 16px;
	padding: 20px 24px;
	background: linear-gradient(135deg, #294bc4, #4268dd);
	color: #fff;
}
#msai-app .msai-courses-progress > span { width: 58px; height: 58px; }
#msai-app .msai-courses-progress > span::after { inset: 7px; }
#msai-app .msai-courses-stat {
	justify-content: center;
	gap: 4px;
	padding: 18px 24px;
	border-left: 1px solid var(--msai-border);
	background: #f8fbff;
}
#msai-app .msai-art-hero__stat {
	min-width: 0;
	border: 1px solid var(--msai-border);
	border-radius: var(--msai-radius-md);
	background: #edf3ff;
	box-shadow: var(--msai-shadow-sm);
	backdrop-filter: none;
	animation: none;
}
#msai-app .msai-art-hero__stat:first-child {
	border-color: #3157d5;
	background: #3157d5;
	color: #fff;
}
#msai-app .msai-courses-progress > span {
	background: conic-gradient(#a9c9ff calc(var(--course-progress, 0) * 1%), rgba(255, 255, 255, .27) 0);
}
#msai-app .msai-courses-progress > span::after { background: #3157d5; }
#msai-app .msai-courses-progress strong,
#msai-app .msai-art-hero__stat:first-child strong { color: #fff; }
#msai-app .msai-courses-progress small,
#msai-app .msai-art-hero__stat:first-child span { color: #dce7ff; }
#msai-app .msai-art-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#msai-app .msai-art-hero__stat { min-height: 78px; justify-content: center; padding: 13px 16px; }
#msai-app .msai-art-hero__stat strong,
#msai-app .msai-courses-progress strong,
#msai-app .msai-courses-stat strong { color: var(--msai-primary); font-size: 22px; }
#msai-app .msai-art-hero__stat span,
#msai-app .msai-courses-stat span { color: var(--msai-text-soft); font-size: 11px; letter-spacing: .03em; }
#msai-app .msai-courses-progress small,
#msai-app .msai-courses-stat small { color: var(--msai-text-soft); font-size: 10px; line-height: 1.3; }
#msai-app .msai-courses-progress strong { color: #fff; }
#msai-app .msai-courses-progress small { color: #dce7ff; }
#msai-app .msai-courses-stat strong { font-size: 27px; }
#msai-app .msai-courses-stat span { font-size: 12px; }
#msai-app .msai-courses-stat small { font-size: 11px; }
#msai-app .msai-art-ai-search {
	margin-bottom: 16px;
	padding: 16px 18px;
	border-color: var(--msai-border);
	border-radius: var(--msai-radius-md);
	background: #fff;
	box-shadow: var(--msai-shadow-sm);
}
#msai-app .msai-art-ai-search label { gap: 8px; }
#msai-app .msai-art-ai-search label strong { font-size: 12px; line-height: 1.3; }
#msai-app .msai-art-ai-search label > span { margin: 0; line-height: 1.4; }
#msai-app .msai-art-ai-search textarea { margin: 2px 0 0; }
#msai-app .msai-art-ai-search > .msai-art-ai-search__send {
	display: grid;
	width: 42px;
	height: 42px;
	min-height: 42px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 13px;
	background: var(--msai-primary);
	color: #fff;
	cursor: pointer;
}
#msai-app .msai-art-ai-search > .msai-art-ai-search__send svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
#msai-app .msai-art-ai-search > .msai-art-ai-search__send:hover { background: #2748b7; }
#msai-app .msai-art-ai-search__icon { background: var(--msai-primary); color: #fff; box-shadow: none; }
#msai-app .msai-art-ai-search textarea { background: #fff; border-color: var(--msai-border); }
#msai-app .msai-art-ai-search label > span { color: var(--msai-text-soft); font-size: 11px; }
#msai-app .msai-courses-toolbar,
#msai-app .msai-quizzes-toolbar,
#msai-app .msai-art-toolbar { margin-bottom: 16px; }
#msai-app :where(.msai-courses-search, .msai-courses-classification, .msai-art-chip-select, .msai-art-search-wrap) {
	border-color: var(--msai-border);
	border-radius: var(--msai-radius-sm);
	background-color: #fff;
	color: var(--msai-text);
}
#msai-app .msai-art-skill-filters button[data-art-skill-chip="0"].is-active,
#msai-app .msai-quiz-skill-chip[data-quiz-skill-filter="0"].is-active {
	border-color: var(--msai-primary) !important;
	background: var(--msai-primary) !important;
	color: #fff !important;
	box-shadow: none !important;
}
#msai-app .msai-art-length-filters button.is-active,
#msai-app .msai-quiz-completion-chip.is-active:not(.is-success),
#msai-app .msai-courses-filters .msai-workspace-filter.is-active {
	border-color: #b9c9f4 !important;
	background: #edf2ff !important;
	color: var(--msai-primary) !important;
	box-shadow: none !important;
}
#msai-app :where(.msai-course-card, .msai-quiz-card, .msai-art-card) {
	border-color: var(--msai-border);
	border-radius: var(--msai-radius-md);
	box-shadow: var(--msai-shadow-sm);
}

/* Skill modules keep their data and actions; their entrance uses the same scale. */
#msai-dashboard2[data-d2-current-skill] {
	--msai-d2-motion-fast: var(--msai-motion-fast);
	--msai-d2-motion-base: var(--msai-motion-base);
	--msai-d2-ease-out: var(--msai-motion-ease);
	color: var(--msai-text);
	font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}
#msai-dashboard2[data-d2-current-skill] .msai-d2-content {
	background: var(--msai-bg);
}
#msai-dashboard2[data-d2-current-skill] :where(.msai-epx-hero, .mnp-head, .msai-sleep-plan-v2__head, .msai-sleep-final__head, .msai-sport-v1-create > header, .msai-nutrition-head) {
	margin-bottom: 20px;
	padding-top: 0;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--msai-border);
}
#msai-dashboard2[data-d2-current-skill] :where(.msai-epx-hero h1, .mnp-head h1, .msai-sleep-plan-v2__head h1, .msai-sleep-final__head h1, .msai-sport-v1-create > header h1, .msai-nutrition-head h2) {
	max-width: 36ch;
	margin: 0;
	font-size: clamp(23px, 2.25vw, 31px);
	line-height: 1.18;
	letter-spacing: -.035em;
}
#msai-dashboard2[data-d2-current-skill] :where(.msai-epx-hero p, .mnp-head p, .msai-sleep-plan-v2__head p, .msai-sleep-final__head > div > span, .msai-sport-v1-create > header p) {
	max-width: 65ch;
	margin: 5px 0 0;
	color: var(--msai-text-soft);
	font-size: 13px;
	line-height: 1.5;
}
#msai-dashboard2[data-d2-current-skill] :where(.msai-epx-hero > div > p, .mnp-head > p, .msai-sleep-plan-v2__head > div > p, .msai-sleep-final__head > div > span, .msai-sport-v1-create > header > p) {
	display: none;
}
#msai-dashboard2[data-d2-current-skill] :where(.msai-epx-hero h1 em) { color: inherit; font-style: normal; }
#msai-dashboard2[data-d2-current-skill] :where(.msai-d2-btn, .msai-d2-button, .msai-d2-navtab) {
	transition-duration: var(--msai-motion-fast);
}
#msai-dashboard2[data-d2-current-skill] :where(.msai-d2-navtab, .msai-d2-subnav button) { min-height: 40px; }

/* Diet Plan: keep the real trajectory inside its original, purposeful blue panel. */
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero {
	min-height: 360px;
	border-color: #3157d5;
	border-radius: var(--msai-radius-lg);
	background: linear-gradient(130deg, #102963, #1747c4 68%, #286be4);
	color: #fff;
	box-shadow: 0 14px 34px rgba(25, 62, 145, .16);
}
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero::before { display: none; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__copy { justify-content: center; padding-block: 28px; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero h1 { display: none; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__copy > p { display: none; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__top > span,
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__chart > header small { color: #cbdcff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__chart { color: #fff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__chart > header span { color: #fff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-current { margin-top: 20px; padding-top: 0; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-current > span,
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-current > small { color: #d3e1ff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-current > strong { color: #fff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-current > p { color: #fff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero__top button,
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory-cta { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .13); color: #fff; box-shadow: none; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory-range { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .09); }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory-range button { color: #d3e1ff !important; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory-range button.is-active { color: #1747c4 !important; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory-legend label { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .12); color: #fff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory :where(.grid text, .date, .goal-label) { fill: #d3e1ff; }
#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-trajectory .grid line { stroke: rgba(255, 255, 255, .2); }

/* Top Performance's focus choices lead; remove the oversized copy column. */
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero {
	grid-template-columns: 1fr;
	min-height: 0;
	border-color: var(--msai-border);
	background: #fff;
	box-shadow: var(--msai-shadow-sm);
}
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy h1 { display: none; }
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy > p { display: none; }
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy {
	min-height: 0;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 28px;
	border-bottom: 1px solid var(--msai-border);
	background: #fff;
}
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy > small { display: none; }
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy > div { margin-left: auto; }
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-domains { padding: 26px 28px 28px; }
#msai-dashboard2[data-d2-current-skill="performance"] .mtp-domains header h2 { font-size: clamp(23px, 2.2vw, 30px); }

/* Workspace starts with the actual pages; its New page action stays available. */
#msai-dashboard2-legacy .msai-d2-workspace-v4 { padding-top: clamp(18px, 2vw, 28px); }
#msai-dashboard2-legacy .msai-d2-workspace-v4__hero {
	justify-content: flex-end;
	gap: 0;
	padding-bottom: 0;
	border-bottom: 0;
}
#msai-dashboard2-legacy .msai-d2-workspace-v4__hero > div { display: none; }
#msai-dashboard2-legacy .msai-d2-workspace-v4__new { min-height: 42px; }
#msai-dashboard2-legacy .msai-d2-workspace-v4__recent { margin-top: 22px; }
#msai-dashboard2-legacy .msai-d2-workspace-v4__directory { margin-top: 24px; }
#msai-dashboard2-legacy .msai-d2-workspace-v3--loading .msai-d2-workspace-v3__hero { display: none; }

/* Account and settings drawers use the same compact controls as the library. */
#msai-app :where([data-panel="account"], [data-panel="settings"]) .msai-side-panel__header {
	margin-bottom: 16px;
}
#msai-app :where([data-panel="account"], [data-panel="settings"]) .msai-side-panel__header h2 {
	font-size: clamp(22px, 2vw, 30px);
	line-height: 1.15;
}
#msai-app :where([data-panel="account"], [data-panel="settings"]) .msai-side-panel__header > div > p:last-child {
	display: none;
}
#msai-app [data-panel="settings"] .msai-side-panel__header {
	flex-direction: row;
	align-items: center;
}
#msai-app [data-panel="account"] .msai-account-tabs { gap: 6px; }
body.msai-frontend-app-active #msai-app [data-panel="account"] .msai-account-tabs__button {
	min-height: 38px;
	padding: 8px 13px;
	border-color: var(--msai-border) !important;
	border-radius: var(--msai-radius-sm);
	background: #fff !important;
	color: var(--msai-text-soft) !important;
	box-shadow: none !important;
}
body.msai-frontend-app-active #msai-app [data-panel="account"] .msai-account-tabs__button.is-active {
	border-color: var(--msai-primary) !important;
	background: #edf2ff !important;
	color: var(--msai-primary) !important;
}
/* Keep reward moments intact; shared controls follow the same focus language. */
#msai-loyalty-rewards-root,
.msai-lr-backdrop { --blue: #3157d5; --blue2: #2748b7; }
#msai-loyalty-rewards-root { font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif; }
#msai-app :where(.msai-loyalty-rewards, .msai-account, .msai-side-panel) :where(button, input, select):focus-visible {
	outline: 2px solid var(--msai-primary);
	outline-offset: 2px;
}

@media (max-width: 780px) {
	#msai-app .msai-courses-panel { padding: 16px; }
	#msai-app .msai-quizzes-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	#msai-app .msai-quiz-performance,
	#msai-app .msai-courses-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	#msai-app .msai-courses-stat:nth-child(3) { border-top: 1px solid var(--msai-border); border-left: 0; }
	#msai-app .msai-courses-stat:nth-child(4) { border-top: 1px solid var(--msai-border); }
	#msai-app .msai-quiz-performance__metric--freemium { grid-column: 1 / -1; }
	#msai-app .msai-art-hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
	#msai-app .msai-courses-panel { padding: 14px 16px calc(80px + env(safe-area-inset-bottom)); }
	#msai-app .msai-quiz-performance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
	#msai-app .msai-quiz-performance__mastery,
	#msai-app .msai-quiz-performance__metric { min-width: 0; min-height: 76px; padding: 12px; }
	#msai-app .msai-quiz-performance__mastery { grid-column: auto; gap: 8px; }
	#msai-app .msai-quiz-performance__ring { width: 36px; height: 36px; }
	#msai-app .msai-quiz-performance__ring i { width: 26px; height: 26px; }
	#msai-app .msai-quiz-performance__metric--freemium { grid-column: 1 / -1; }
	#msai-app .msai-quiz-performance__metric span { font-size: 11px; }
	#msai-app .msai-quiz-performance__metric small { font-size: 10px; }
	#msai-app .msai-courses-stats { gap: 0; }
	#msai-app .msai-courses-progress,
	#msai-app .msai-courses-stat { min-height: 88px; }
	#msai-app .msai-courses-progress { gap: 9px; padding: 14px; }
	#msai-app .msai-courses-progress > span { width: 40px; height: 40px; }
	#msai-app .msai-courses-progress > span::after { inset: 5px; }
	#msai-app .msai-courses-stat { padding: 14px; }
	#msai-app .msai-courses-progress strong,
	#msai-app .msai-courses-stat strong { font-size: 22px; }
	#msai-app .msai-courses-stat span { font-size: 11px; }
	#msai-app .msai-courses-stat small { font-size: 10px; }
	#msai-app .msai-course-card { display: flex; flex-direction: column; }
	#msai-app .msai-course-card__media { height: auto; min-height: 0; aspect-ratio: 16 / 7; }
	#msai-app .msai-course-card__body { padding: 14px; }
	#msai-app .msai-course-card h3 { min-height: 0; font-size: 15px; }
	#msai-app .msai-course-card__cta { min-height: 42px; font-size: 12px; }
	#msai-app .msai-art-ai-search { gap: 11px; padding: 14px; }
	#msai-app .msai-art-ai-search label { gap: 7px; }
	#msai-app .msai-art-ai-search textarea { margin-top: 2px; }
	#msai-app .msai-art-hero__stat { padding: 11px 5px; }
	#msai-app .msai-art-hero__stat strong { font-size: 20px; }
	#msai-app .msai-art-hero__stat span { font-size: 10px; }
	#msai-dashboard2[data-d2-current-skill="weight"] .msai-wlo-hero { min-height: 0; }
	#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy { flex-wrap: wrap; padding: 18px; }
	#msai-dashboard2[data-d2-current-skill="performance"] .mtp-hero-copy > div { width: 100%; margin-left: 0; }
	#msai-dashboard2[data-d2-current-skill="performance"] .mtp-domains { padding: 22px 18px; }
	#msai-app [data-panel="account"] .msai-account-tabs {
		display: flex;
		flex-wrap: nowrap;
		gap: 6px;
		overflow-x: auto;
		padding-bottom: 5px;
		scrollbar-width: thin;
	}
	body.msai-frontend-app-active #msai-app [data-panel="account"] .msai-account-tabs__button {
		flex: 0 0 auto;
		min-height: 40px;
		font-size: 12px;
		white-space: nowrap;
	}
	#msai-dashboard2-legacy .msai-d2-workspace-v4 { padding-top: 16px; }
	#msai-dashboard2-legacy .msai-d2-workspace-v4__hero {
		align-items: flex-end !important;
		flex-direction: row;
		padding-bottom: 0 !important;
	}
	#msai-dashboard2-legacy .msai-d2-workspace-v4__recent { margin-top: 20px !important; }
	#msai-dashboard2-legacy .msai-d2-workspace-v4__directory { margin-top: 22px !important; }
}
@media (max-width: 380px) {
	#msai-app .msai-courses-panel > .msai-ws-subnav {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		width: 100%;
	}
	#msai-app .msai-courses-panel > .msai-ws-subnav .msai-ws-subnav__btn {
		min-width: 0;
		gap: 5px;
		justify-content: center;
		padding: 9px 4px;
		font-size: 12px;
	}
	#msai-app .msai-courses-panel > .msai-ws-subnav .msai-ws-subnav__btn svg { width: 15px; height: 15px; }
	#msai-app .msai-quizzes-list { grid-template-columns: 1fr; }
	#msai-app .msai-quiz-card,
	#msai-app .msai-quiz-card__row { min-height: 132px; }
	#msai-app .msai-quiz-card__title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	#msai-app :where(.msai-art-hero__stat, .msai-courses-progress, .msai-courses-stat) { animation: none; }
}

/* Workspace document: tighter writing rhythm and clear block tools. */
body.msai-frontend-app-active #msai-app .msai-goal-page__document-shell {
	padding-inline: clamp(16px, 3vw, 48px);
	background: #f6f8fb;
}
body.msai-frontend-app-active #msai-app .msai-goal-page__document {
	width: min(100%, 1080px);
	max-width: 1080px;
	margin-inline: auto;
	padding: clamp(30px, 3vw, 46px) clamp(34px, 6.5vw, 96px) 140px;
	box-shadow: 0 0 0 1px var(--msai-border);
}
body.msai-frontend-app-active #msai-app .msai-goal-page__header { margin-bottom: 22px; }
body.msai-frontend-app-active #msai-app .msai-goal-page__title-input {
	display: block;
	min-height: 1.14em;
	padding: 0;
	border: 0;
	background: transparent;
	resize: none;
	overflow: hidden;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: clamp(34px, 3vw, 44px);
	line-height: 1.14;
	letter-spacing: -.04em;
}
body.msai-frontend-app-active #msai-app .msai-goal-page__title-input:focus-visible {
	outline: 0;
	box-shadow: none;
}
body.msai-frontend-app-active #msai-app .msai-goal-page__status {
	margin-top: 12px;
	padding-bottom: 0;
	border-bottom: 0;
}
body.msai-frontend-app-active #msai-app .msai-goal-page__editor { gap: 0; padding-top: 0; }
body.msai-frontend-app-active #msai-app .msai-goal-block { padding: 1px 0 1px 44px; }
body.msai-frontend-app-active #msai-app .msai-goal-block__rail { top: 4px; }
body.msai-frontend-app-active #msai-app :where(.msai-goal-block__text, .msai-goal-block__task-text, .msai-goal-block__list) {
	padding-block: 2px;
	font-size: 16px;
	line-height: 1.5;
}
body.msai-frontend-app-active #msai-app .msai-goal-block--paragraph .msai-goal-block__text { min-height: 1.5em; }
body.msai-frontend-app-active #msai-app .msai-goal-block--heading_1 .msai-goal-block__text { padding-block: 10px 6px; font-size: 32px; line-height: 1.2; }
body.msai-frontend-app-active #msai-app .msai-goal-block--heading_2 .msai-goal-block__text { padding-block: 8px 5px; font-size: 25px; line-height: 1.24; }
body.msai-frontend-app-active #msai-app .msai-goal-block--heading_3 .msai-goal-block__text { padding-block: 6px 4px; font-size: 20px; line-height: 1.3; }
body.msai-frontend-app-active #msai-app .msai-goal-block__list { padding-left: 25px; margin: 3px 0; }
body.msai-frontend-app-active #msai-app .msai-goal-block__list li + li { margin-top: 3px; }
body.msai-frontend-app-active #msai-app .msai-goal-block__task { align-items: center; padding-block: 2px; }
body.msai-frontend-app-active #msai-app .msai-goal-block__task input[type="checkbox"] { margin-top: 0; }
body.msai-frontend-app-active #msai-app .msai-goal-block__callout {
	margin-block: 7px;
	padding: 13px 16px;
	border-left: 3px solid var(--msai-primary);
	border-radius: var(--msai-radius-sm);
	background: #f1f5fc;
	line-height: 1.5;
}
body.msai-frontend-app-active #msai-app .msai-goal-block__page-link { margin-block: 5px; }
body.msai-frontend-app-active #msai-app .msai-goal-block__table-wrap { padding: 12px 0 36px; }
body.msai-frontend-app-active #msai-app .msai-goal-block__table td {
	min-width: 120px;
	padding: 10px 13px;
	border-color: #dce5ef;
	background: #fff;
	color: var(--msai-text);
	font-size: 14px;
	line-height: 1.45;
}
body.msai-frontend-app-active #msai-app .msai-goal-block__table tr:first-child td { background: #f4f7fc; font-weight: 650; }
body.msai-frontend-app-active #msai-app .msai-goal-block__table tr:hover td { background: #f8fbff; }
body.msai-frontend-app-active #msai-app .msai-goal-block__table td:focus {
	position: relative;
	z-index: 1;
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--msai-primary);
}
body.msai-frontend-app-active #msai-app .msai-goal-block__table-remove { right: 2px; bottom: -28px; }
body.msai-frontend-app-active #msai-app .msai-goal-block__table-edge--row { bottom: -14px; }
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-menu { padding: 7px; border-radius: 14px; }
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-action {
	grid-template-columns: 32px minmax(0, 1fr);
	column-gap: 11px;
	min-height: 48px;
	padding: 7px 9px;
}
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-action::before { content: none; }
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-icon {
	grid-area: icon;
	display: grid;
	width: 30px;
	height: 30px;
	place-items: center;
	align-self: center;
	border: 1px solid #dce6f2;
	border-radius: 8px;
	background: #f5f8fd;
	color: #3157d5;
	font-size: 12px;
	font-weight: 750;
}
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-action.is-active .msai-goal-page__slash-icon { border-color: #b8caf8; background: #eaf0ff; }
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-label { font-size: 13px; }
body.msai-frontend-app-active #msai-app .msai-goal-page__slash-description { font-size: 11px; line-height: 1.3; }

@media (max-width: 700px) {
	body.msai-frontend-app-active #msai-app .msai-goal-page__document-shell { padding: 0; background: #fff; }
	body.msai-frontend-app-active #msai-app .msai-goal-page__document {
		width: 100%;
		padding: 24px 18px calc(110px + env(safe-area-inset-bottom));
		box-shadow: none;
	}
	body.msai-frontend-app-active #msai-app .msai-goal-page__title-input { font-size: clamp(29px, 8vw, 34px); line-height: 1.16; }
	body.msai-frontend-app-active #msai-app .msai-goal-page__header { margin-bottom: 18px; }
	body.msai-frontend-app-active #msai-app .msai-goal-page__status { margin-top: 10px; }
	body.msai-frontend-app-active #msai-app .msai-goal-block { padding: 1px 0 1px 32px; }
	body.msai-frontend-app-active #msai-app .msai-goal-block__rail { top: 4px; }
	body.msai-frontend-app-active #msai-app .msai-goal-block__table td { padding: 9px 11px; font-size: 13px; }
}
