/* ajayshenoy.dev — strictly black on white */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	color-scheme: light only;
}

body {
	background: #fff;
	color: #000;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a {
	color: #000;
}

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid #000;
}

header .site-name {
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
	letter-spacing: 0.02em;
}

#auth {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 2.5rem;
}

#auth .who {
	font-size: 0.9rem;
}

.btn {
	background: #fff;
	color: #000;
	border: 1px solid #000;
	padding: 0.4rem 1rem;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.btn:hover {
	background: #000;
	color: #fff;
}

.btn:disabled {
	opacity: 0.5;
	cursor: wait;
}

main {
	flex: 1;
	width: 100%;
	max-width: 44rem;
	margin: 0 auto;
	padding: 3rem 1.5rem 4rem;
}

/* Landing page */
.intro h1 {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.intro p {
	margin-bottom: 2.5rem;
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.5rem;
}

.card {
	display: block;
	border: 1px solid #000;
	padding: 1.5rem;
	text-decoration: none;
}

.card:hover {
	background: #000;
	color: #fff;
}

.card h2 {
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
}

.card p {
	font-size: 0.95rem;
}

.card .read {
	display: inline-block;
	margin-top: 1rem;
	font-size: 0.85rem;
	text-decoration: underline;
}

/* Articles */
article h1 {
	font-size: 1.8rem;
	line-height: 1.25;
	margin-bottom: 0.5rem;
}

article .meta {
	font-size: 0.85rem;
	margin-bottom: 2rem;
}

article h2 {
	font-size: 1.25rem;
	margin: 2rem 0 0.75rem;
}

article p {
	margin-bottom: 1rem;
}

article ul,
article ol {
	margin: 0 0 1rem 1.5rem;
}

article li {
	margin-bottom: 0.35rem;
}

article code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
	border: 1px solid #000;
	padding: 0 0.25em;
}

/* Track pages */
.track-header {
	margin-bottom: 2rem;
}

.track-header h1 {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.progress {
	font-size: 0.9rem;
	margin-top: 0.75rem;
}

.sidebar-hint {
	margin-top: 1.5rem;
	font-size: 0.9rem;
	text-decoration: underline;
}

.lesson-num {
	font-weight: 700;
}

.lesson-title {
	font-weight: 600;
}

.state {
	font-size: 0.85rem;
	white-space: nowrap;
}

.state.done {
	font-weight: 700;
}

.state.locked {
	text-decoration: underline;
}

/* Sidebar (track + lesson pages) */
.page-with-sidebar {
	flex: 1;
	width: 100%;
	display: flex;
	align-items: stretch;
}

.page-content {
	flex: 1;
	min-width: 0;
}

.page-content main {
	margin: 0 auto;
}

.sidebar {
	width: 16rem;
	flex-shrink: 0;
	border-right: 1px solid #000;
	padding: 2rem 1rem;
	overflow-y: auto;
}

.sidebar-title {
	display: block;
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
	padding: 0 0.5rem;
}

.sidebar-progress {
	font-size: 0.85rem;
	padding: 0.5rem 0.5rem 0;
	opacity: 0.8;
}

.sidebar-lesson-list {
	list-style: none;
	margin: 1.5rem 0 0;
}

.sidebar-lesson-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.6rem 0.5rem;
}

.sidebar-lesson-row a {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
	text-decoration: none;
}

.sidebar-lesson-row .lesson-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sidebar-lesson-row:hover {
	background: #000;
}

.sidebar-lesson-row:hover a,
.sidebar-lesson-row:hover .state {
	color: #fff;
}

.sidebar-lesson-row.active {
	background: #000;
}

.sidebar-lesson-row.active a,
.sidebar-lesson-row.active .state {
	color: #fff;
}

.sidebar-toggle {
	display: none;
	background: #fff;
	color: #000;
	border: 1px solid #000;
	font-size: 1.1rem;
	line-height: 1;
	padding: 0.4rem 0.6rem;
	cursor: pointer;
	margin: 1rem 0 0 1rem;
}

.sidebar-backdrop {
	display: none;
}

@media (max-width: 768px) {
	.sidebar-toggle {
		display: inline-block;
	}

	.sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 20;
		background: #fff;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
	}

	.page-with-sidebar.sidebar-open .sidebar {
		transform: translateX(0);
	}

	.page-with-sidebar.sidebar-open .sidebar-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 10;
	}
}

/* Lesson pages */
.back-link {
	display: inline-block;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	text-decoration: underline;
}

.lesson-complete {
	margin-top: 2.5rem;
}

.lesson-complete-state {
	font-weight: 700;
}

.lesson-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #000;
	font-size: 0.9rem;
}

.lesson-nav a {
	text-decoration: underline;
}

footer {
	border-top: 1px solid #000;
	padding: 1rem 1.5rem;
	font-size: 0.85rem;
	text-align: center;
}

/* Session list (lesson page with sessions) */
.session-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 2rem;
}

.session-card {
	display: block;
	border: 1px solid #000;
	padding: 1.25rem 1.5rem;
	text-decoration: none;
	color: #000;
}

.session-card:hover {
	background: #000;
	color: #fff;
}

.session-card--locked {
	opacity: 0.7;
}

.session-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.4rem;
}

.session-card-title {
	font-weight: 700;
	font-size: 1rem;
}

.session-lock {
	font-size: 0.8rem;
	border: 1px solid currentColor;
	padding: 0.15rem 0.5rem;
	white-space: nowrap;
}

.session-card-summary {
	font-size: 0.9rem;
	line-height: 1.5;
}

.session-card-meta {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 0.8rem;
	text-decoration: underline;
}

/* Session page — gated state */
.session-gated {
	margin-top: 2rem;
	padding: 1.5rem;
	border: 1px solid #000;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
}

.session-empty {
	margin-top: 2rem;
	font-style: italic;
	opacity: 0.6;
}

/* Video list */
.video-list {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.video-item {}

.video-title {
	font-weight: 700;
	margin-bottom: 0.6rem;
}

.video-embed {
	width: 100%;
	border: 1px solid #000;
}

.video-embed iframe {
	display: block;
}

/* Locked video within a session */
.video-item--locked .video-title {
	opacity: 0.7;
}

.video-locked {
	border: 1px solid #000;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	background: #f9f9f9;
}

/* meta line under lesson/session titles */
.meta {
	margin-top: 0.25rem;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	opacity: 0.7;
}

/* Cohort info panel (right column on lesson/session pages) */
.cohort-panel {
	width: 17rem;
	flex-shrink: 0;
	border-left: 1px solid #e2e2ec;
	padding: 1.75rem 1.25rem;
	align-self: flex-start;
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.cohort-meta {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.cohort-name-line {
	font-size: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.cohort-tag {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	background: #eef0fb;
	color: #4a50a8;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	white-space: nowrap;
}

.cohort-schedule {
	font-size: 0.82rem;
	color: #666;
	line-height: 1.5;
}

.cohort-enroll {
	border: 1.5px solid #4f6af0;
	border-radius: 8px;
	padding: 1.1rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.enroll-label {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: #888;
	text-transform: uppercase;
}

.enroll-prices {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
}

.price-original {
	font-size: 1.1rem;
	color: #999;
	text-decoration: line-through;
}

.price-current {
	font-size: 1.6rem;
	font-weight: 700;
	color: #4f6af0;
}

.enroll-coupons {
	font-size: 0.82rem;
	font-weight: 600;
	color: #dc2626;
}

.btn-enroll {
	display: block;
	background: #4f6af0;
	color: #fff;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.65rem 1rem;
	border-radius: 6px;
}

.btn-enroll:hover {
	background: #3a56d4;
	color: #fff;
}

.enroll-feature {
	font-size: 0.82rem;
	color: #666;
	text-align: center;
}

@media (max-width: 1100px) {
	.cohort-panel {
		display: none;
	}
}

/* Video before / after content blocks */
.video-before,
.video-after {
	font-size: 0.95rem;
	line-height: 1.7;
	color: #222;
}

.video-before {
	margin-bottom: 1rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid #000;
	background: #fafafa;
}

.video-before p,
.video-after p {
	margin-bottom: 0.6rem;
}

.video-before p:last-child,
.video-after p:last-child {
	margin-bottom: 0;
}

.video-after {
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid #ccc;
	background: #fafafa;
}

/* Mermaid diagram container */
.video-diagram {
	margin: 1rem 0;
	padding: 1.25rem;
	border: 1px solid #e0e0e0;
	background: #fff;
	overflow-x: auto;
	text-align: center;
}
