:root {
	--color-yellow-main: #ffcd51;
	--color-yellow-light: #ffeeda;
	--color-yellow-extra-light: #fff7ed;
	--color-yellow-dark: #ffbd19;
	--color-green-main: #9ff2ac;
	--color-green-light: #cdfdd2;
	--color-green-extra-light: #e9ffec;
	--color-green-dark: #3cc84f;
	--color-green-extra-dark: #1f7a2c;
	--color-blue-main: #8bb4ff;
	--color-blue-light: #ccdbff;
	--color-blue-extra-light: #eef4ff;
	--color-blue-dark: #3f62bb;
	--color-purple-main: #d6a3c9;
	--color-purple-light: #f5e8f0;
	--color-red-main: #f2ac9f;
	--color-red-light: #f9dfdb;
	--color-background: #f7f7f7;
	--color-background-secondary: #fff;
	--color-foreground: #222;
	--color-foreground-strong: #111;
	--color-foreground-secondary: #666;
	--color-foreground-tertiary: #888;
	--color-divider: rgba(0, 0, 0, 0.1);
	--color-brand: #fe8038;
	--color-brand-secondary: #ffe0bc;
	--font-body: "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
	--font-heading: Georgia, "Times New Roman", serif;
	--page-pad: clamp(1.25rem, 7.6vw, 7.5rem);
	--focus: 0 0 0 3px rgba(63, 98, 187, 0.22);
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--z-dropdown: 30;
	--z-sticky: 40;
	--z-modal-backdrop: 50;
	--z-modal: 60;
	--z-toast: 70;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

html {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-foreground);
	font-family: var(--font-body);
}

button,
input,
textarea,
select {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: none;
	box-shadow: var(--focus);
}

button {
	color: inherit;
}

.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;
}

.icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 1.125rem;
	height: 1.125rem;
	vertical-align: middle;
}

.site-nav {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 4.5rem;
	padding: 0.85rem 1.5rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem;
	color: #111;
	font-size: 1.5rem;
	font-weight: 730;
	letter-spacing: -0.055em;
	text-decoration: none;
	background: transparent;
	border: 0;
	border-radius: 0.4rem;
	cursor: pointer;
}

.brand svg {
	width: 1.8rem;
	height: 1.8rem;
}

.gate-shell {
	display: grid;
	min-height: 100vh;
	padding: 1.5rem;
	place-items: center;
	background: var(--color-background);
}

.gate-card {
	width: min(28rem, 100%);
	padding: 2rem;
	background: #fff;
	border: 1px solid var(--color-divider);
	border-radius: 0.875rem;
}

.gate-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
	font-size: 1.5rem;
	font-weight: 730;
	letter-spacing: -0.04em;
}

.gate-brand svg {
	width: 1.8rem;
	height: 1.8rem;
}

.gate-icon {
	display: grid;
	width: 3rem;
	height: 3rem;
	margin-bottom: 1rem;
	place-items: center;
	background: var(--color-yellow-main);
	border-radius: 50%;
}

.gate-card h1 {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 2rem;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.gate-card > p {
	margin: 0.625rem 0 0;
	color: var(--color-foreground-secondary);
	line-height: 1.5;
}

.gate-form {
	display: grid;
	margin-top: 1.5rem;
}

.gate-form label {
	margin-bottom: 0.4rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.gate-form input {
	width: 100%;
	height: 2.75rem;
	padding: 0 0.75rem;
	color: var(--color-foreground-strong);
	background: #f7f7f7;
	border: 1px solid var(--color-divider);
	border-radius: 0.5rem;
}

.gate-form input[aria-invalid="true"] {
	border-color: #b43a2b;
}

.gate-error {
	min-height: 1.25rem;
	margin: 0.4rem 0 0.75rem;
	color: #9f2f23;
	font-size: 0.8125rem;
	line-height: 1.25rem;
}

.gate-form .btn {
	width: 100%;
}

.gate-card .gate-note {
	margin-top: 1rem;
	color: #666;
	font-size: 0.75rem;
	text-align: center;
}

.nav-actions,
.button-row,
.workspace-actions,
.section-actions,
.composer-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.42rem;
	min-height: 2.5rem;
	padding: 0.5rem 1rem;
	color: #fff;
	font-weight: 500;
	white-space: nowrap;
	background: #222;
	border: 0;
	border-radius: 0.5rem;
	cursor: pointer;
	transition:
		background-color 180ms var(--ease-out),
		transform 180ms var(--ease-out);
}

.btn:hover {
	background: #555;
}

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

.btn-yellow {
	color: #111;
	background: var(--color-yellow-main);
}

.btn-yellow:hover {
	background: var(--color-yellow-dark);
}

.btn-light {
	color: #111;
	background: #fff;
	border: 1px solid var(--color-divider);
}

.btn-light:hover,
.icon-btn:hover {
	background: #efefef;
}

.btn-subtle {
	color: #222;
	background: transparent;
}

.btn-subtle:hover {
	background: rgba(0, 0, 0, 0.05);
}

.btn-small {
	min-height: 2rem;
	padding: 0.35rem 0.7rem;
	font-size: 0.82rem;
}

.icon-btn {
	display: inline-grid;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	color: #555;
	place-items: center;
	background: transparent;
	border: 0;
	border-radius: 0.5rem;
	cursor: pointer;
}

.avatar-button {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.25rem;
	font-size: 0.87rem;
	background: transparent;
	border: 0;
	border-radius: 0.5rem;
	cursor: pointer;
}

.avatar {
	display: grid;
	width: 2rem;
	height: 2rem;
	color: #13351d;
	font-size: 0.72rem;
	font-weight: 700;
	place-items: center;
	background: var(--color-green-main);
	border-radius: 50%;
}

.popover {
	position: absolute;
	top: calc(100% - 0.25rem);
	right: 1.5rem;
	z-index: var(--z-dropdown);
	width: min(20rem, calc(100vw - 2rem));
	padding: 0.75rem;
	background: #fff;
	border: 1px solid var(--color-divider);
	border-radius: 0.75rem;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.11);
}

.popover h3,
.popover p {
	margin: 0;
}

.popover h3 {
	font-size: 0.95rem;
}

.popover p {
	margin-top: 0.35rem;
	color: #666;
	font-size: 0.82rem;
	line-height: 1.45;
}

.menu-list {
	display: grid;
	gap: 0.2rem;
	margin-top: 0.55rem;
}

.menu-list button {
	padding: 0.55rem 0.6rem;
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 0.4rem;
	cursor: pointer;
}

.menu-list button:hover {
	background: #f2f2f2;
}

.home-shell {
	min-height: 100vh;
	background:
		radial-gradient(circle at -3rem 68%, rgba(255, 205, 81, 0.38) 0 2rem, transparent 2.1rem),
		radial-gradient(circle at calc(100% + 3rem) 24%, rgba(159, 242, 172, 0.42) 0 2.4rem, transparent 2.5rem),
		var(--color-background);
}

.home-top {
	display: flex;
	align-items: center;
	gap: 2rem;
	justify-content: space-between;
	padding: 3rem var(--page-pad) 2rem;
}

.home-greeting {
	max-width: 45rem;
	margin: 0;
	color: var(--color-foreground-secondary);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.3;
}

.home-greeting strong {
	color: #222;
	font-weight: 500;
}

.search-wrap {
	padding: 0 var(--page-pad);
}

.search-box {
	display: flex;
	align-items: center;
	height: 3.25rem;
	padding: 0 0.9rem;
	background: #fff;
	border: 1px solid var(--color-divider);
	border-radius: 0.875rem;
}

.search-box:focus-within {
	border-color: rgba(60, 200, 79, 0.6);
	box-shadow: 0 0 0 4px rgba(60, 200, 79, 0.12);
}

.search-box input {
	flex: 1;
	min-width: 0;
	padding: 0 0.75rem;
	color: #222;
	background: transparent;
	border: 0;
	outline: 0;
}

.search-box input::placeholder {
	color: #767676;
}

.kbd {
	padding: 0.2rem 0.42rem;
	color: #666;
	font-size: 0.69rem;
	font-weight: 650;
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid var(--color-divider);
	border-radius: 0.38rem;
}

.content-band {
	margin-top: 3rem;
}

.section-heading-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 var(--page-pad);
	margin-bottom: 1rem;
}

.section-heading {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0;
	font-size: 1.5rem;
	font-weight: 520;
}

.count-pill {
	display: inline-grid;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 650;
	place-items: center;
	background: var(--color-yellow-light);
	border-radius: 0.38rem;
}

.projects-scroller {
	display: flex;
	gap: 0.875rem;
	padding: 0.5rem var(--page-pad) 1rem;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.projects-scroller::-webkit-scrollbar {
	display: none;
}

.project-card {
	position: relative;
	flex: 0 0 15rem;
	min-height: 9.5rem;
	padding: 1rem;
	overflow: hidden;
	font: inherit;
	text-align: left;
	background: #fff;
	border: 1px solid var(--color-divider);
	border-radius: 1.125rem;
	cursor: pointer;
	scroll-snap-align: start;
	transition:
		transform 180ms var(--ease-out),
		border-color 180ms var(--ease-out),
		box-shadow 180ms var(--ease-out);
}

.project-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 5px 8px rgba(0, 0, 0, 0.09);
}

.project-card.active {
	border-color: #222;
	box-shadow: 0 0 0 1px #222;
}

.project-card.all {
	color: #fff;
	background: linear-gradient(160deg, #111, #1a1a1a 62%, #12351b 140%);
	border-color: transparent;
}

.project-card.all.active {
	box-shadow: 0 0 0 2px #777;
}

.project-card.new {
	display: grid;
	color: #666;
	text-align: center;
	place-items: center;
	background: transparent;
	border-style: dashed;
}

.project-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.875rem;
}

.project-icon {
	display: grid;
	width: 2.375rem;
	height: 2.375rem;
	place-items: center;
	background: var(--project-color, rgba(0, 0, 0, 0.05));
	border-radius: 0.7rem;
}

.project-card.all .project-icon {
	color: var(--color-green-main);
	background: rgba(255, 255, 255, 0.1);
}

.project-meta {
	color: #666;
	font-size: 0.68rem;
	font-weight: 650;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.project-card.all .project-meta,
.project-card.all .project-description {
	color: rgba(255, 255, 255, 0.64);
}

.project-title {
	margin: 0 0 0.3rem;
	font-size: 1.125rem;
	font-weight: 720;
}

.project-description {
	margin: 0;
	color: #666;
	font-size: 0.75rem;
}

.courses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 1.5rem;
	padding: 1rem var(--page-pad) 4.5rem;
}

.course-card {
	position: relative;
	display: flex;
	min-height: 28rem;
	padding: 3rem 2rem 2rem;
	flex-direction: column;
	color: #666;
	background: #fff;
	border: 1px solid #eaeaea;
	border-radius: 1.5rem;
	cursor: pointer;
	transition:
		transform 220ms var(--ease-out),
		box-shadow 220ms var(--ease-out);
}

.course-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.course-card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.course-meta {
	display: grid;
	gap: 0.2rem;
	font-size: 1rem;
	line-height: 1.25;
}

.course-title {
	margin: 1.5rem 0 0.9rem;
	color: #222;
	font-family: var(--font-heading);
	font-size: clamp(2rem, 2.6vw, 2.35rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.025em;
}

.course-description {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 0.875rem;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

.project-tag {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 0.38rem;
	margin-top: 1rem;
	padding: 0.25rem 0.58rem;
	color: var(--tag-fg, #555);
	font-size: 0.68rem;
	font-weight: 650;
	background: var(--tag-bg, #eee);
	border-radius: 999px;
}

.tag-dot {
	width: 0.38rem;
	height: 0.38rem;
	background: currentColor;
	border-radius: 50%;
}

.course-time {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: auto 0 0;
	font-size: 0.875rem;
}

.empty-state {
	grid-column: 1 / -1;
	padding: 4rem 1rem;
	color: #666;
	text-align: center;
}

.builder-shell {
	min-height: 100vh;
	background: #f7f7f7;
}

.builder-nav {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: var(--z-sticky);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.75rem;
	min-height: 4.55rem;
	padding: 1rem 2rem;
	background: rgba(249, 249, 249, 0.86);
	backdrop-filter: blur(18px);
}

.builder-nav-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem;
}

.back-button {
	display: inline-grid;
	width: 2.25rem;
	height: 2.25rem;
	place-items: center;
	background: var(--color-divider);
	border: 0;
	border-radius: 0.5rem;
	cursor: pointer;
}

.back-button:hover {
	background: var(--color-yellow-main);
}

.stage-list {
	display: flex;
	gap: 0.5rem;
	padding: 0.125rem;
	margin: 0;
	list-style: none;
	background: rgba(0, 0, 0, 0.0625);
	border-radius: 999px;
}

.stage-button {
	padding: 0.5rem 1rem;
	color: #222;
	background: transparent;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

.stage-button.active {
	background: #fff;
}

.builder-content {
	padding-top: 6.55rem;
}

.builder-content.intro-workspace,
.builder-content.workspace {
	padding-top: 6.55rem;
}

.intro-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(24rem, 42rem) minmax(0, 1fr);
	min-height: calc(100vh - 6.55rem);
	padding: 1rem 2rem 2rem;
	background:
		radial-gradient(circle at 8% 40%, rgba(255, 205, 81, 0.35), transparent 15rem),
		radial-gradient(circle at 92% 65%, rgba(159, 242, 172, 0.38), transparent 15rem);
}

.intro-chat {
	grid-column: 2;
	display: flex;
	min-height: 0;
	padding: 1rem;
	flex-direction: column;
	background: #fff;
	border-radius: 1rem;
}

.intro-hero {
	padding: 2rem 1rem 1rem;
	text-align: center;
}

.assistant-emblem {
	display: grid;
	width: 3rem;
	height: 3rem;
	margin: 0 auto 1rem;
	color: #4b3518;
	font-family: var(--font-heading);
	font-size: 1.3rem;
	font-style: italic;
	place-items: center;
	background: var(--color-yellow-main);
	border-radius: 50%;
}

.intro-hero h1 {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 2.25rem;
	font-weight: 500;
	letter-spacing: -0.025em;
}

.intro-hero p {
	max-width: 34rem;
	margin: 0.75rem auto 0;
	color: #666;
	line-height: 1.5;
}

.suggestion-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin: 1.5rem 0;
}

.suggestion-chip {
	padding: 0.48rem 0.75rem;
	color: #444;
	font-size: 0.83rem;
	background: #fff;
	border: 1px solid var(--color-divider);
	border-radius: 999px;
	cursor: pointer;
}

.suggestion-chip:hover {
	background: var(--color-yellow-extra-light);
	border-color: var(--color-yellow-main);
}

.messages {
	display: flex;
	min-height: 8rem;
	padding: 0.5rem 0.5rem 1rem;
	flex: 1;
	flex-direction: column;
	gap: 0.8rem;
	overflow-y: auto;
}

.message {
	max-width: 88%;
	padding: 0.75rem 0.9rem;
	font-size: 0.9rem;
	line-height: 1.5;
	background: #f1f1f1;
	border-radius: 0.65rem;
}

.message p {
	margin: 0;
}

.message.user {
	align-self: flex-end;
	background: var(--color-green-extra-light);
}

.message.assistant {
	align-self: flex-start;
	background: transparent;
}

.message-label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.72rem;
	font-weight: 650;
}

.composer {
	padding: 0.6rem;
	background: #f4f4f4;
	border-radius: 0.55rem;
}

.composer textarea {
	display: block;
	width: 100%;
	min-height: 4rem;
	padding: 0.5rem;
	resize: none;
	background: transparent;
	border: 0;
	outline: 0;
	line-height: 1.5;
}

.composer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.fake-disclaimer {
	margin: 0.5rem 0 0;
	color: #777;
	font-size: 0.7rem;
	text-align: center;
}

.workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
	gap: 1.5rem;
	min-height: calc(100vh - 6.55rem);
	padding: 0 1.5rem 2rem;
}

.course-pane {
	min-width: 0;
	padding: 1rem clamp(1rem, 5vw, 5rem) 4rem;
}

.course-stage-label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.7rem;
	color: #666;
	font-size: 0.82rem;
	font-weight: 650;
}

.course-page-title {
	max-width: 52rem;
	margin: 0 auto 2.5rem;
	font-family: var(--font-heading);
	font-size: clamp(2.4rem, 4vw, 3.8rem);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.03em;
	text-align: center;
}

.brief-layout,
.outline-layout,
.storyboard-layout {
	max-width: 52rem;
	margin: 0 auto;
}

.brief-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.brief-section,
.module-card,
.story-section {
	position: relative;
	padding: 1rem;
	background: #fff;
	border: 0;
	border-radius: 0.625rem;
}

button.brief-section {
	width: 100%;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.brief-section:hover,
.brief-section.selected {
	box-shadow: 0 0 0 2px rgba(60, 200, 79, 0.56);
}

.brief-section.wide {
	grid-column: 1 / -1;
}

.section-kicker {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.55rem;
	font-size: 0.82rem;
	font-weight: 650;
}

.brief-section p,
.brief-section ul {
	margin: 0;
	color: #555;
	font-size: 0.9rem;
	line-height: 1.55;
}

.brief-section ul {
	padding-left: 1.2rem;
}

.journey {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.75rem;
	margin-top: 0.8rem;
}

.journey-step {
	position: relative;
	padding-top: 1.5rem;
	color: #555;
	font-size: 0.78rem;
	line-height: 1.4;
}

.journey-step::before {
	position: absolute;
	top: 0.35rem;
	right: -0.45rem;
	left: 0;
	height: 0.18rem;
	content: "";
	background: var(--step-color, var(--color-yellow-main));
	border-radius: 99px;
}

.assistant-rail {
	position: sticky;
	top: 5.5rem;
	display: flex;
	height: calc(100vh - 7rem);
	min-height: 30rem;
	padding: 1rem;
	flex-direction: column;
	background: #fff;
	border-radius: 1rem;
}

.assistant-header {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.25rem 0.25rem 0.9rem;
	border-bottom: 1px solid var(--color-divider);
}

.assistant-avatar {
	display: grid;
	width: 2rem;
	height: 2rem;
	font-family: var(--font-heading);
	font-style: italic;
	place-items: center;
	background: var(--color-yellow-main);
	border-radius: 50%;
}

.assistant-header strong,
.assistant-header span {
	display: block;
}

.assistant-header span {
	margin-top: 0.08rem;
	color: #777;
	font-size: 0.72rem;
}

.assistant-rail .messages {
	padding-top: 1rem;
}

.assistant-rail .composer textarea {
	min-height: 3.25rem;
}

.dotted-stage {
	background-image: radial-gradient(#d7d7d7 0.75px, transparent 0.75px);
	background-size: 1.5rem 1.5rem;
}

.module-stack,
.story-stack {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.module-card {
	padding: 1.35rem 1.5rem;
}

.module-number {
	margin: 0 0 0.4rem;
	color: #666;
	font-size: 0.78rem;
	font-weight: 650;
}

.module-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.module-title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 680;
}

.module-meta {
	display: flex;
	gap: 1rem;
	margin: 0.6rem 0 1rem;
	color: #666;
	font-size: 0.8rem;
}

.outline-section {
	display: grid;
	grid-template-columns: 2rem 1fr auto;
	align-items: start;
	gap: 0.75rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--color-divider);
}

.outline-section:first-of-type {
	border-top: 0;
}

.section-index {
	display: grid;
	width: 1.75rem;
	height: 1.75rem;
	font-size: 0.75rem;
	place-items: center;
	background: var(--color-yellow-extra-light);
	border-radius: 50%;
}

.outline-section h3,
.outline-section p {
	margin: 0;
}

.outline-section h3 {
	font-size: 0.95rem;
}

.outline-section p {
	margin-top: 0.3rem;
	color: #666;
	font-size: 0.82rem;
	line-height: 1.45;
}

.add-row {
	width: 100%;
	padding: 0.65rem;
	color: #666;
	text-align: left;
	background: #f7f7f7;
	border: 1px dashed #aaa;
	border-radius: 0.4rem;
	cursor: pointer;
}

.add-row:hover {
	color: #222;
	background: var(--color-green-extra-light);
	border-color: var(--color-green-dark);
}

.story-module {
	margin-bottom: 4rem;
}

.story-module-header {
	margin-bottom: 1.5rem;
}

.story-module-header p,
.story-module-header h2 {
	margin: 0;
}

.story-module-header p {
	font-size: 0.82rem;
	font-weight: 600;
}

.story-module-header h2 {
	margin-top: 0.45rem;
	font-size: 2rem;
}

.story-section {
	margin-bottom: 1rem;
	padding: 1.25rem 1.5rem;
}

.story-section-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.story-type-icon {
	display: grid;
	width: 2.25rem;
	height: 2.25rem;
	place-items: center;
	background: var(--tone-light);
	border-radius: 0.35rem;
}

.story-section-header h3 {
	margin: 0;
	font-size: 1.3rem;
}

.story-block {
	position: relative;
	margin-top: 0.8rem;
	padding: 1.1rem 1.2rem 1.1rem 1.5rem;
	background: #fff;
	border-radius: 0.5rem;
	cursor: pointer;
	box-shadow: inset 0.65rem 0 var(--tone-light);
}

.story-block:hover,
.story-block.selected {
	box-shadow:
		inset 0.65rem 0 var(--tone-light),
		0 0 0 2px rgba(0, 0, 0, 0.12);
}

.block-top {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.badge {
	display: inline-flex;
	padding: 0.3rem 0.55rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--tone);
	border-radius: 0.35rem;
}

.block-duration {
	color: #666;
	font-size: 0.78rem;
}

.story-block h4,
.story-block p {
	margin: 0;
}

.story-block h4 {
	margin-top: 0.75rem;
	font-size: 1rem;
}

.story-block p {
	margin-top: 0.35rem;
	color: #555;
	font-size: 0.86rem;
	line-height: 1.5;
}

/* Course creation workspace. These rules mirror the simple-course workspace
   on the product's default branch: dotted canvas, 52rem content rail and a
   separate fixed-height assistant panel. */
.builder-content.workspace {
	height: 100vh;
	min-height: 44rem;
	padding: 6.55rem 1.5rem 1.5rem;
	overflow: hidden;
}

.workspace {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(22rem, 24rem);
	gap: 1.5rem;
}

.course-pane {
	min-width: 0;
	padding: 0 1.5rem 5rem clamp(3.5rem, 4vw, 5rem);
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-color: var(--color-foreground-tertiary) var(--color-background-secondary);
	scrollbar-gutter: stable;
}

.course-pane::-webkit-scrollbar {
	width: 0.5rem;
}

.course-pane::-webkit-scrollbar-track {
	background: var(--color-background);
	border: 1px solid var(--color-divider);
	border-radius: 0.375rem;
}

.course-pane::-webkit-scrollbar-thumb {
	background: var(--color-foreground-tertiary);
	border: 1px solid var(--color-divider);
	border-radius: 0.25rem;
}

.brief-layout,
.outline-layout,
.storyboard-layout {
	width: 100%;
	max-width: 52rem;
	margin: 0 auto;
}

.course-top {
	margin-bottom: 2rem;
	text-align: center;
}

.course-stage-pill {
	display: flex;
	justify-content: center;
}

.course-stage-pill > span,
.course-stage-pill > svg {
	position: relative;
}

.course-stage-pill {
	width: max-content;
	min-height: 2rem;
	margin: 0 auto 0.5rem;
	padding: 0.25rem 0.625rem 0.25rem 0.875rem;
	align-items: center;
	gap: 0.25rem;
	font-size: 1rem;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 99rem;
}

.course-stage-pill .icon {
	width: 1rem;
	height: 1rem;
	color: rgba(0, 0, 0, 0.25);
}

.course-page-title {
	max-width: 52rem;
	margin: 0 auto 2.5rem;
	font-family: var(--font-heading);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 2.75rem;
	letter-spacing: -0.02em;
	text-align: center;
}

.brief-group-title {
	margin: 2.5rem 0 1rem;
	font-size: 1.5rem;
	font-weight: 650;
}

.brief-row,
.persona-row {
	position: relative;
	display: flex;
	width: 100%;
	min-width: 0;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1rem;
	padding: 0.875rem;
	font: inherit;
	text-align: left;
	background: #fff;
	border: 0;
	border-radius: 0.625rem;
	cursor: pointer;
	transition: outline-color 140ms ease;
}

.brief-row:hover,
.brief-row:focus-visible,
.brief-row.selected,
.persona-row:hover,
.persona-row:focus-visible,
.persona-row.selected {
	outline: 1px solid var(--color-green-dark);
	outline-offset: 2px;
}

.brief-row.passive {
	color: var(--color-foreground-secondary);
	background: transparent;
}

.brief-icon {
	display: grid;
	width: 2.5rem;
	height: 2.5rem;
	flex: 0 0 2.5rem;
	place-items: center;
	color: var(--color-foreground-tertiary);
}

.brief-copy {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	gap: 0.125rem;
	font-size: 1rem;
	line-height: 1.5rem;
}

.section-kicker {
	display: block;
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
}

.brief-actions {
	display: flex;
	min-width: 4.5rem;
	justify-content: flex-end;
	gap: 0.5rem;
	opacity: 0;
	transition: opacity 140ms ease;
}

.brief-row:hover .brief-actions,
.brief-row:focus-within .brief-actions,
.persona-row:hover .brief-actions,
.persona-row:focus-within .brief-actions {
	opacity: 1;
}

.persona-row {
	padding-left: 4.375rem;
}

.persona-row > span:nth-child(2) {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	gap: 0.15rem;
	line-height: 1.5;
}

.persona-row small {
	color: #666;
	font-size: 0.9rem;
}

.persona-portrait {
	display: grid;
	width: 3.75rem;
	height: 3.75rem;
	flex: 0 0 3.75rem;
	place-items: center;
	color: #555;
	background: var(--color-yellow-light);
	border-radius: 50%;
}

.brief-meta-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 2.5rem;
}

.learner-journey-row {
	align-items: flex-start;
	padding-bottom: 1.25rem;
}

.journey-intro {
	margin-bottom: 1.5rem;
}

.journey {
	position: relative;
	display: flex;
	margin: 0;
	padding: 0;
	flex-direction: column;
	gap: 1.25rem;
	list-style: none;
}

.journey li {
	position: relative;
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	align-items: start;
}

.journey li:not(:last-child)::after {
	position: absolute;
	top: 2rem;
	bottom: -1.25rem;
	left: 1rem;
	width: 0.125rem;
	content: "";
	background: var(--color-divider);
}

.journey li > span {
	display: grid;
	width: 2rem;
	height: 2rem;
	place-items: center;
	background: var(--color-yellow-light);
	border-radius: 0.375rem;
}

.journey li div {
	display: flex;
	flex-direction: column;
}

.journey li small {
	color: #666;
	font-size: 0.9rem;
}

.ai-note {
	margin: 4rem auto 1rem;
	color: #777;
	font-size: 0.75rem;
	text-align: center;
}

.assistant-rail {
	position: relative;
	top: auto;
	display: flex;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 1rem;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 1rem;
}

.assistant-header {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.25rem 0.25rem 0.9rem;
	border-bottom: 1px solid var(--color-divider);
}

.assistant-avatar {
	display: grid;
	width: 2rem;
	height: 2rem;
	place-items: center;
	background: var(--color-yellow-main);
	border-radius: 50%;
}

.assistant-header strong,
.assistant-header span {
	display: block;
}

.assistant-header span {
	margin-top: 0.08rem;
	color: #777;
	font-size: 0.72rem;
}

.assistant-rail .messages {
	min-height: 0;
	padding-top: 1rem;
}

.module-stack {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.module-card {
	margin: 0;
	padding: 1.5rem;
	background: #fff;
	border-radius: 0.625rem;
}

.module-card.open {
	padding-bottom: 2rem;
}

.module-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
}

.module-card.open .module-title-row {
	margin-bottom: 1.5rem;
}

.module-heading {
	min-width: 0;
	margin: 0;
	flex: 1;
}

.module-toggle {
	display: flex;
	width: 100%;
	min-width: 0;
	padding: 0;
	flex: 1;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	font: inherit;
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 0.375rem;
	cursor: pointer;
}

.module-title {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0;
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 2rem;
}

.module-index {
	display: grid;
	width: 2rem;
	height: 2rem;
	flex: 0 0 2rem;
	place-items: center;
	font-size: 0.875rem;
	font-weight: 400;
	background: var(--color-yellow-light);
	border-radius: 0.375rem;
}

.module-toggle-chevron,
.outline-section-chevron {
	display: grid;
	width: 1.75rem;
	height: 1.75rem;
	flex: 0 0 1.75rem;
	place-items: center;
	color: var(--color-foreground-secondary);
	transition: transform 180ms var(--ease-out);
}

.module-toggle-chevron.open,
.outline-section-chevron.open {
	transform: rotate(180deg);
}

.module-body {
	min-width: 0;
}

.module-meta,
.story-meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin: 0 0 1rem;
}

.module-meta > div,
.story-meta > div {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem;
	background: #f8f8f8;
	border-radius: 0.625rem;
}

.story-meta > div {
	padding: 0.875rem 0;
	background: transparent;
}

.module-meta span,
.story-meta span {
	display: flex;
	min-width: 0;
	flex-direction: column;
	line-height: 1.35;
}

.module-meta small,
.story-meta small {
	color: #666;
	font-size: 0.75rem;
}

.module-meta strong,
.story-meta strong {
	overflow: hidden;
	font-size: 0.9rem;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.outline-objective,
.story-info {
	margin: 0 0 1rem;
	padding: 0.875rem 1rem;
	background: #f8f8f8;
	border-radius: 0.625rem;
}

.story-info {
	background: #fff;
}

.outline-objective strong,
.story-info strong {
	font-size: 0.9rem;
	font-weight: 500;
}

.outline-objective p,
.story-info p {
	margin: 0.25rem 0 0;
	font-size: 0.95rem;
	line-height: 1.55;
}

.outline-sections {
	display: flex;
	margin-top: 1.75rem;
	flex-direction: column;
	gap: 0.5rem;
}

.outline-section-card {
	overflow: hidden;
	border-radius: 0.5rem;
	transition: box-shadow 180ms ease;
}

.outline-section-card:hover,
.outline-section-card:focus-within {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.outline-section-card.tone-yellow { background: var(--color-yellow-light); }
.outline-section-card.tone-green { background: var(--color-green-light); }
.outline-section-card.tone-blue { background: var(--color-blue-light); }

.outline-section {
	display: flex;
	width: 100%;
	min-width: 0;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	font: inherit;
	text-align: left;
	border: 0;
	background: transparent;
	border-radius: 0;
	cursor: pointer;
}

.outline-section:hover {
	box-shadow: none;
}

.outline-type-icon {
	display: grid;
	width: 1.75rem;
	height: 1.75rem;
	flex: 0 0 1.75rem;
	place-items: center;
	color: var(--color-foreground-secondary);
}

.outline-section-copy {
	display: flex;
	min-width: 0;
	flex: 1;
	align-items: baseline;
	gap: 0.35rem;
	font-size: 1rem;
	line-height: 1.5;
}

.outline-section-copy strong {
	flex: 0 0 auto;
	font-weight: 600;
}

.outline-section-copy span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.outline-section-detail {
	padding: 0 1rem 1rem 3.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.outline-section-detail p {
	max-width: 68ch;
	margin: 0;
	padding-top: 0.875rem;
	font-size: 1rem;
	line-height: 1.6;
}

.outline-duration {
	flex: 0 0 auto;
	font-size: 0.875rem;
}

.add-row {
	margin-top: 0.75rem;
}

.module-nav {
	position: fixed;
	top: 25vh;
	left: 0;
	z-index: 10;
	display: flex;
	padding: 0.75rem 0.75rem 0.75rem 1.5rem;
	flex-direction: column;
	gap: 0.5rem;
	background: rgba(249, 249, 249, 0.75);
	backdrop-filter: blur(1.25rem);
	border-radius: 0 0.5rem 0.5rem 0;
}

.module-nav button {
	width: 3.25rem;
	height: 2.75rem;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 500;
	background: var(--color-foreground);
	border: 0;
	border-radius: 0.25rem;
	cursor: pointer;
}

.module-nav button:hover { background: var(--color-foreground-secondary); }
.module-nav button.current { color: #000; background: var(--color-yellow-dark); }

.story-module {
	margin: 2rem 0 5rem;
}

.story-module-header {
	margin-bottom: 3rem;
}

.story-module-header p {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.story-module-header h2 {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}

.story-sections {
	display: flex;
	margin-top: 3rem;
	flex-direction: column;
	gap: 2.75rem;
}

.story-section {
	margin: 0;
	padding: 0;
	background: transparent;
}

.story-section-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1rem;
	padding: 0 0.125rem;
}

.story-type-icon {
	display: grid;
	width: 2.25rem;
	height: 2.25rem;
	flex: 0 0 2.25rem;
	place-items: center;
	border-radius: 0.25rem;
}

.story-type-icon.tone-yellow { background: var(--color-yellow-light); }
.story-type-icon.tone-green { background: var(--color-green-light); }

.story-section-header h3 {
	margin: 0;
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.625rem;
}

.story-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.story-block {
	position: relative;
	margin: 0;
	padding: 1.25rem 1.5rem;
	background: #fff;
	border: 0;
	border-left: 1.25rem solid var(--tone-light);
	border-radius: 0.5rem;
	cursor: pointer;
	box-shadow: none;
}

.story-block:hover,
.story-block.selected {
	outline: 2px solid rgba(0, 0, 0, 0.12);
	outline-offset: 1px;
	box-shadow: none;
}

.block-top {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.badge {
	display: inline-flex;
	padding: 0.375rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: var(--tone);
	border-radius: 0.375rem;
}

.format-badge {
	color: #666;
	background: #ededed;
}

.block-duration {
	color: #666;
	font-size: 0.875rem;
}

.block-actions {
	display: flex;
	margin-left: auto;
	gap: 0.5rem;
	color: #666;
}

.story-block-body h4,
.story-block-body p {
	margin: 0;
}

.story-block-body h4 {
	font-size: 1rem;
	font-weight: 600;
}

.story-block-body p {
	margin-top: 0.45rem;
	color: var(--color-foreground);
	font-size: 1rem;
	line-height: 1.6;
}

.add-block-card {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	font: inherit;
	text-align: left;
	background: rgba(255, 255, 255, 0.86);
	border: 1px dashed rgba(17, 24, 39, 0.18);
	border-radius: 0.75rem;
	cursor: pointer;
}

.add-block-card > span:first-child {
	display: grid;
	width: 3rem;
	height: 3rem;
	place-items: center;
	background: #fff;
	border: 1px solid rgba(17, 24, 39, 0.08);
	border-radius: 50%;
}

.add-block-card > span:last-child {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.add-block-card small {
	color: #666;
	font-size: 0.875rem;
}

.toast {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: var(--z-toast);
	display: flex;
	align-items: center;
	gap: 0.65rem;
	max-width: min(25rem, calc(100vw - 2rem));
	padding: 0.8rem 1rem;
	color: #fff;
	font-size: 0.86rem;
	background: #222;
	border-radius: 0.6rem;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
	animation: toast-in 200ms var(--ease-out);
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(0.5rem);
	}
}

.modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: var(--z-modal-backdrop);
	display: grid;
	padding: 1rem;
	place-items: center;
	background: rgba(0, 0, 0, 0.34);
}

.modal {
	z-index: var(--z-modal);
	width: min(30rem, 100%);
	padding: 1.5rem;
	background: #fff;
	border-radius: 0.875rem;
}

.modal h2,
.modal p {
	margin: 0;
}

.modal p {
	margin-top: 0.55rem;
	color: #666;
	line-height: 1.5;
}

.field-label {
	display: grid;
	gap: 0.4rem;
	margin-top: 1.25rem;
	font-size: 0.82rem;
	font-weight: 650;
}

.field-label input {
	height: 2.75rem;
	padding: 0 0.75rem;
	background: #f7f7f7;
	border: 1px solid var(--color-divider);
	border-radius: 0.5rem;
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

/* These compound page shells set their own padding, so reserve the fixed
   course-navigation height after those declarations. */
.builder-content.intro-workspace,
.builder-content.workspace {
	padding-top: 6.55rem;
}

@media (max-width: 70rem) {
	.workspace {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}

	.builder-nav {
		padding-inline: 1rem;
	}

	.avatar-button > span:not(.avatar) {
		display: none;
	}
}

@media (max-width: 58rem) {
	.home-top {
		align-items: flex-start;
		flex-direction: column;
	}

	.workspace {
		display: block;
	}

	.builder-content.workspace {
		height: auto;
		min-height: 100vh;
		overflow: visible;
	}

	.course-pane {
		padding-left: 1rem;
		overflow: visible;
	}

	.assistant-rail {
		position: static;
		height: auto;
		min-height: 28rem;
		margin-top: 1rem;
	}

	.module-nav {
		display: none;
	}

	.builder-nav {
		grid-template-columns: auto 1fr auto;
	}

	.stage-list {
		justify-content: flex-start;
		overflow-x: auto;
	}

	.stage-button {
		padding-inline: 0.8rem;
	}

	.workspace-actions .label,
	.builder-nav-right .hide-small {
		display: none;
	}
}

@media (max-width: 42rem) {
	.site-nav {
		padding-inline: 0.9rem;
	}

	.nav-actions > .icon-btn:first-child,
	.nav-actions > .icon-btn:nth-child(2),
	.kbd {
		display: none;
	}

	.home-top {
		padding-top: 1.5rem;
	}

	.home-top .button-row {
		width: 100%;
	}

	.home-top .btn {
		flex: 1;
	}

	.courses-grid {
		grid-template-columns: 1fr;
	}

	.course-card {
		min-height: 24rem;
	}

	.builder-nav {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.builder-nav-right {
		display: none;
	}

	.intro-workspace {
		display: block;
		padding-inline: 1rem;
	}

	.intro-chat {
		min-height: calc(100vh - 8rem);
	}

	.workspace {
		padding-inline: 0.75rem;
	}

	.course-pane {
		padding-inline: 0.25rem;
	}

	.course-page-title {
		font-size: 2rem;
		line-height: 2.25rem;
	}

	.brief-meta-grid,
	.module-meta,
	.story-meta {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.persona-row {
		padding-left: 0.875rem;
	}

	.brief-actions,
	.block-actions {
		display: none;
	}

	.outline-section-copy {
		align-items: flex-start;
		flex-direction: column;
		gap: 0;
	}

	.outline-section-copy span {
		display: -webkit-box;
		white-space: normal;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.outline-duration {
		display: none;
	}

	.story-block {
		padding: 1rem;
		border-left-width: 0.75rem;
	}

	.block-top {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.brief-grid {
		grid-template-columns: 1fr;
	}

	.brief-section.wide {
		grid-column: auto;
	}

	.journey {
		grid-template-columns: 1fr 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
