/* FreshSheetMusic – lesson pages. Colours come from the shop theme (--fsm-*), with fallbacks. */
.fsm-lesson-page {
	--l-blue: var(--fsm-blue, #0b55c6);
	--l-blue-d: var(--fsm-blue-d, #073f9a);
	--l-navy: var(--fsm-navy, #0f1e46);
	--l-text: var(--fsm-text, #24324f);
	--l-muted: var(--fsm-muted, #5b6b86);
	--l-line: var(--fsm-line, #dbe4f2);
	--l-soft: var(--fsm-soft, #f3f7fd);
	--l-soft2: var(--fsm-soft2, #e8f0fb);
	--l-green: var(--fsm-green, #1f8a4c);
	--l-red: #c0392b;
	--l-radius: var(--fsm-radius, 14px);
	--l-shadow: var(--fsm-shadow, 0 1px 2px rgba(15, 30, 70, .05), 0 6px 20px rgba(15, 30, 70, .05));
	--i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
	--i-note: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l11-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='17' cy='16' r='3'/%3E%3C/svg%3E");
	--i-keys: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M8 5v14M13 5v14M18 5v14M6.5 5v7M10.5 5v7M15.5 5v7'/%3E%3C/svg%3E");
	--i-bars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20v-5M10 20v-9M15 20v-13M20 20V4'/%3E%3C/svg%3E");
	--i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E");
	--i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}

.fsm-lesson { color: var(--l-text); max-width: 1040px; margin: 0 auto; }
.fsm-toc, .fsm-lesson__body { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- header */
.fsm-lh {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: center;
	margin: 8px 0 28px;
	padding: 34px 32px 32px;
	border-radius: calc(var(--l-radius) + 6px);
	background:
		radial-gradient(120% 90% at 100% 0%, rgba(125, 162, 216, .35) 0%, rgba(125, 162, 216, 0) 55%),
		linear-gradient(135deg, var(--l-navy) 0%, #15306d 60%, var(--l-blue-d) 100%);
	color: #fff;
	overflow: hidden;
}
.fsm-lh::after {
	content: "";
	position: absolute;
	inset: auto -40px -30px -40px;
	height: 150px;
	background: var(--fsm-deco, none) center / cover no-repeat;
	opacity: .35;
	pointer-events: none;
}
.fsm-lh__text { position: relative; z-index: 1; }
.fsm-lh__crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 14px; color: rgba(255, 255, 255, .7); }
.fsm-lh__crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.fsm-lh__crumbs a:hover { color: #fff; text-decoration: underline; }
.fsm-lh__kicker {
	display: inline-block;
	margin: 0 0 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.fsm-lh__title { margin: 0 0 12px; color: #fff; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -.02em; }
.fsm-lh__lead { margin: 0 0 20px; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, .88); max-width: 46em; }
.fsm-lh__facts { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.fsm-lh__fact {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 7px 12px 7px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .16);
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}
.fsm-lh__fact::before {
	content: "";
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: var(--i-note) center / contain no-repeat;
	mask: var(--i-note) center / contain no-repeat;
	opacity: .9;
}
.fsm-lh__fact--instrument::before { -webkit-mask-image: var(--i-keys); mask-image: var(--i-keys); }
.fsm-lh__fact--level::before { -webkit-mask-image: var(--i-bars); mask-image: var(--i-bars); }
.fsm-lh__fact--time::before { -webkit-mask-image: var(--i-clock); mask-image: var(--i-clock); }
.fsm-lh__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.fsm-lh__btn {
	display: inline-flex;
	align-items: center;
	padding: 12px 20px;
	border-radius: 12px;
	border: 1.5px solid rgba(255, 255, 255, .5);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: background .15s, border-color .15s, transform .15s;
}
.fsm-lh__btn:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }
.fsm-lh__btn--main { background: #fff; border-color: #fff; color: var(--l-navy); }
.fsm-lh__btn--main:hover { background: var(--l-soft2); color: var(--l-navy); }
.fsm-lh.has-cover { grid-template-columns: minmax(0, 1fr) 240px; }
.fsm-lh__cover { position: relative; z-index: 1; margin: 0; text-align: center; }
.fsm-lh__sheet { display: block; position: relative; width: 210px; margin: 0 auto; transform: rotate(3deg); transition: transform .2s; }
.fsm-lh__sheet::before { content: ""; position: absolute; inset: 8px -8px -8px 8px; border-radius: 6px; background: rgba(255, 255, 255, .55); transform: rotate(-5deg); }
.fsm-lh__sheet:hover { transform: rotate(0deg) scale(1.02); }
.fsm-lh__sheet img { position: relative; display: block; width: 210px; height: auto; aspect-ratio: 230 / 298; object-fit: cover; object-position: top; border-radius: 6px; background: #fff; box-shadow: 0 20px 44px rgba(0, 0, 0, .38); }
.fsm-lh__cover figcaption { display: flex; flex-direction: column; margin-top: 18px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.fsm-lh__cover figcaption strong { color: #fff; font-size: 15px; }

/* ------------------------------------------------------------- contents */
.fsm-toc {
	margin: 0 auto 36px;
	padding: 18px 22px;
	border: 1px solid var(--l-line);
	border-radius: var(--l-radius);
	background: var(--l-soft);
}
.fsm-toc__title { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--l-muted); }
.fsm-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.fsm-toc li { margin: 0; }
.fsm-toc a { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; color: var(--l-text); text-decoration: none; font-weight: 600; font-size: 15px; }
.fsm-toc a:hover { color: var(--l-blue); }
.fsm-toc a span {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--l-line);
	color: var(--l-blue);
	font-size: 12px;
	font-weight: 700;
}

/* ----------------------------------------------------------------- body */
.fsm-lesson__body { font-size: 17px; line-height: 1.7; }
.fsm-lesson__body > p:first-child { font-size: 19px; line-height: 1.6; color: var(--l-navy); }
.fsm-lesson__body h2 { margin: 48px 0 16px; font-size: 27px; line-height: 1.2; color: var(--l-navy); letter-spacing: -.01em; scroll-margin-top: 90px; }
.fsm-lesson__body h2::before { content: ""; display: block; width: 36px; height: 4px; margin-bottom: 14px; border-radius: 2px; background: var(--l-blue); }

/* Level → arrangement table */
.fsm-lesson .fsm-l-levels { margin: 20px 0 8px; }
.fsm-lesson .fsm-l-levels table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--l-line); border-radius: var(--l-radius); overflow: hidden; font-size: 15px; line-height: 1.45; }
.fsm-lesson .fsm-l-levels th { background: var(--l-soft); color: var(--l-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--l-line); }
.fsm-lesson .fsm-l-levels td { padding: 14px; border: 0; border-bottom: 1px solid var(--l-line); vertical-align: top; }
.fsm-lesson .fsm-l-levels tr:last-child td { border-bottom: 0; }
.fsm-lesson .fsm-l-levels tbody tr:hover td { background: #fbfcff; }
.fsm-lesson .fsm-l-levels td:first-child { white-space: nowrap; }
.fsm-lesson .fsm-l-levels td:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--l-blue); vertical-align: 1px; }
.fsm-lesson .fsm-l-levels tbody tr:nth-child(-n+3) td:first-child::before { background: var(--l-green); }
.fsm-lesson .fsm-l-levels tbody tr:nth-child(n+5) td:first-child::before { background: var(--l-navy); }
.fsm-lesson .fsm-l-levels td:nth-child(2) { font-weight: 700; color: var(--l-navy); }
.fsm-lesson .fsm-l-levels td:nth-child(3) { white-space: nowrap; color: var(--l-muted); }
.fsm-lesson .fsm-l-levels td:nth-child(4) { color: var(--l-muted); }

/* "What makes it sound right" cards */
.fsm-lesson .fsm-l-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0; padding: 0; list-style: none; counter-reset: card; }
.fsm-lesson .fsm-l-cards li {
	position: relative;
	margin: 0;
	padding: 20px 20px 18px;
	border: 1px solid var(--l-line);
	border-radius: var(--l-radius);
	background: #fff;
	box-shadow: var(--l-shadow);
	font-size: 15.5px;
	line-height: 1.6;
	counter-increment: card;
}
.fsm-lesson .fsm-l-cards li::before {
	content: "0" counter(card);
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .06em;
	color: var(--l-blue);
}
.fsm-lesson .fsm-l-cards li strong { display: block; margin-bottom: 4px; font-size: 17px; color: var(--l-navy); }

/* Practice plan timeline */
.fsm-lesson .fsm-l-plan { position: relative; margin: 22px 0; padding: 0; list-style: none; counter-reset: step; }
.fsm-lesson .fsm-l-plan::before { content: ""; position: absolute; left: 17px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--l-blue), var(--l-soft2)); }
.fsm-lesson .fsm-l-plan li {
	position: relative;
	margin: 0 0 12px;
	padding: 16px 18px 16px 58px;
	border: 1px solid var(--l-line);
	border-radius: var(--l-radius);
	background: #fff;
	font-size: 15.5px;
	line-height: 1.6;
	counter-increment: step;
}
.fsm-lesson .fsm-l-plan li::before {
	content: counter(step);
	position: absolute;
	left: 4px;
	top: 14px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--l-blue);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	box-shadow: 0 0 0 4px #fff;
}
.fsm-lesson .fsm-l-plan li strong { color: var(--l-navy); font-size: 16px; }
.fsm-l-plan__tempo {
	display: flex;
	width: fit-content;
	align-items: center;
	margin-top: 8px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--l-soft2);
	color: var(--l-blue-d);
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* Common mistakes */
.fsm-lesson .fsm-l-mistakes { margin: 18px 0; padding: 6px 20px; list-style: none; border-radius: var(--l-radius); background: #fdf3f2; border: 1px solid #f4d6d2; }
.fsm-lesson .fsm-l-mistakes li { position: relative; margin: 0; padding: 12px 0 12px 32px; border-bottom: 1px dashed #efcac5; font-size: 15.5px; line-height: 1.55; }
.fsm-lesson .fsm-l-mistakes li:last-child { border-bottom: 0; }
.fsm-lesson .fsm-l-mistakes li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	width: 20px;
	height: 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23c0392b'/%3E%3Cpath d='M6.5 6.5l7 7M13.5 6.5l-7 7' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Closing note */
.fsm-lesson .fsm-l-note { margin: 28px 0 0; padding: 16px 18px 16px 50px; position: relative; border-radius: var(--l-radius); background: #eaf6ef; color: #1b4d31; font-size: 15.5px; }
.fsm-lesson .fsm-l-note::before { content: ""; position: absolute; left: 18px; top: 18px; width: 20px; height: 20px; background: var(--l-green); -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }

/* ---------------------------------------------------------- sheet music */
.fsm-sm { margin: 52px 0 12px; padding: 30px 28px 26px; border-radius: calc(var(--l-radius) + 6px); background: var(--l-soft); border: 1px solid var(--l-line); scroll-margin-top: 90px; }
.fsm-sm h2 { margin: 0 0 6px; font-size: 27px; color: var(--l-navy); }
.fsm-sm__sub { margin: 0 0 20px; color: var(--l-muted); font-size: 15.5px; }
.fsm-sm__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.fsm-sm__card { margin: 0; }
.fsm-sm__card a { display: flex; flex-direction: column; height: 100%; border-radius: var(--l-radius); background: #fff; border: 1px solid var(--l-line); overflow: hidden; color: var(--l-text); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.fsm-sm__card a:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 30, 70, .12); }
.fsm-sm__img { display: block; padding: 14px 14px 0; background: linear-gradient(#fff, #f6f8fc); }
.fsm-sm__img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; box-shadow: 0 0 0 1px var(--l-line), 0 4px 12px rgba(15, 30, 70, .08); }
.fsm-sm__body { display: flex; flex-direction: column; flex: 1; padding: 14px 14px 14px; }
.fsm-sm__arr { font-weight: 700; color: var(--l-navy); line-height: 1.3; }
.fsm-sm__meta { margin-top: 3px; font-size: 13.5px; color: var(--l-muted); }
.fsm-sm__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.fsm-sm__price { font-weight: 800; font-size: 17px; color: var(--l-navy); }
.fsm-sm__go { padding: 6px 10px; border-radius: 8px; background: var(--l-blue); color: #fff; font-size: 13px; font-weight: 700; }
.fsm-sm__all { margin: 18px 0 0; text-align: center; }
.fsm-sm__all a { font-weight: 700; color: var(--l-blue); text-decoration: none; }
.fsm-sm__all a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 760px) {
	.fsm-lh, .fsm-lh.has-cover { grid-template-columns: 1fr; padding: 26px 20px 24px; margin-left: -4px; margin-right: -4px; }
	.fsm-lh__cover { display: none; }
	.fsm-lh__lead { font-size: 16.5px; }
	.fsm-lesson__body > p:first-child { font-size: 17.5px; }
	.fsm-lh__btn { flex: 1 1 auto; justify-content: center; }
	.fsm-toc ol { grid-template-columns: 1fr; }
	.fsm-lesson .fsm-l-cards { grid-template-columns: 1fr; }
	.fsm-sm { padding: 22px 16px; margin-left: -4px; margin-right: -4px; }
	.fsm-sm__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.fsm-sm__go { display: none; }
	/* Level table becomes cards */
	.fsm-lesson .fsm-l-levels table, .fsm-lesson .fsm-l-levels tbody, .fsm-lesson .fsm-l-levels tr, .fsm-lesson .fsm-l-levels td { display: block; }
	.fsm-lesson .fsm-l-levels thead { display: none; }
	.fsm-lesson .fsm-l-levels table { border: 0; overflow: visible; }
	.fsm-lesson .fsm-l-levels tr { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--l-line); border-radius: var(--l-radius); background: #fff; }
	.fsm-lesson .fsm-l-levels td { padding: 2px 0; border: 0; white-space: normal !important; }
	.fsm-lesson .fsm-l-levels td:first-child { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--l-muted); }
	.fsm-lesson .fsm-l-levels td:nth-child(3)::after { content: " pages"; }
}

/* ------------------------------------------------------------------ hub */
.fsm-hub { padding: 28px 0 64px; }
.fsm-hub__hero {
	position: relative;
	margin: 8px 0 32px;
	padding: 40px 36px 30px;
	border-radius: 20px;
	background: radial-gradient(120% 90% at 100% 0%, rgba(125, 162, 216, .35) 0%, rgba(125, 162, 216, 0) 55%), linear-gradient(135deg, #0f1e46 0%, #15306d 60%, #073f9a 100%);
	color: #fff;
	overflow: hidden;
}
.fsm-hub__hero h1 { margin: 0 0 10px; color: #fff; font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.02em; }
.fsm-hub__hero p { margin: 0 0 22px; max-width: 44em; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, .88); }
.fsm-hub__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fsm-hub__chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.fsm-hub__chips a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.fsm-hub__chips a.is-active { background: #fff; color: #0f1e46; border-color: #fff; }
.fsm-hub__chips a span { font-size: 12px; opacity: .7; }
.fsm-hub__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.fsm-hub__card { margin: 0; }
.fsm-hub__card a { display: flex; flex-direction: column; height: 100%; border-radius: 16px; background: #fff; border: 1px solid #dbe4f2; overflow: hidden; color: #24324f; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.fsm-hub__card a:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 30, 70, .12); }
.fsm-hub__img { display: block; padding: 18px 18px 0; background: linear-gradient(160deg, #e8f0fb, #f3f7fd); }
.fsm-hub__img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 2.6; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; box-shadow: 0 0 0 1px #dbe4f2, 0 6px 16px rgba(15, 30, 70, .1); background: #fff; }
.fsm-hub__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.fsm-hub__kicker { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #0b55c6; }
.fsm-hub__title { font-size: 19px; font-weight: 700; line-height: 1.3; color: #0f1e46; }
.fsm-hub__excerpt { font-size: 15px; line-height: 1.55; color: #5b6b86; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fsm-hub__time { margin-top: auto; padding-top: 6px; font-size: 13.5px; font-weight: 600; color: #24324f; }
.fsm-hub__empty { font-size: 17px; }
@media (max-width: 960px) { .fsm-hub__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
	.fsm-hub__hero { padding: 28px 20px 22px; }
	.fsm-hub__hero p { font-size: 16.5px; }
	.fsm-hub__grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Home page row */
.fsm-home-lessons__intro { margin: -6px 0 18px; color: #5b6b86; font-size: 16px; }
.fsm-home-lessons .fsm-hub__title { font-size: 17px; }
