:root {
	--gfs-gold: #cfaf3e;
	--gfs-gold-dark: #b89b37;
	--gfs-brown: #716551;
	--gfs-brown-dark: #5d513f;
	--gfs-navy: #082131;
	--gfs-dark: #0e0e0e;
	--bg: #f6f4ef;
	--surface: #ffffff;
	--text: #20262e;
	--muted: #7c7567;
	--border: #e7e1d6;
	--border-soft: #efeae1;
	--radius-sm: 6px;
	--radius: 10px;
	--radius-lg: 16px;
	--shadow-sm: 0 1px 2px rgba(32, 38, 46, .05), 0 1px 3px rgba(32, 38, 46, .06);
	--shadow: 0 14px 36px -16px rgba(8, 33, 49, .22);
	--shadow-gold: 0 12px 28px -12px rgba(207, 175, 62, .45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
a { color: var(--gfs-brown); text-decoration: none; }
a:hover { color: var(--gfs-gold-dark); }

/* top accent + header */
.topbar { height: 3px; background: linear-gradient(90deg, var(--gfs-gold) 0%, var(--gfs-gold-dark) 50%, var(--gfs-brown) 100%); }
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-soft);
}
.header-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.logo { height: 38px; display: block; }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
}
.site-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 44px 24px 56px; }
.site-footer {
	padding: 22px 24px;
	border-top: 1px solid var(--border-soft);
	color: var(--muted);
	font-size: 12.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}
.foot-mark {
	font-weight: 800;
	letter-spacing: .14em;
	color: var(--gfs-brown);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 2px 7px;
	font-size: 11px;
}

/* headings + signature gold accent */
.page-head { margin-bottom: 34px; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.01em; color: var(--gfs-brown); margin: 0; }
.page-head p { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.accent-line { display: block; width: 52px; height: 3px; border-radius: 2px; background: var(--gfs-gold); margin: 14px 0 0; }

/* buttons */
.btn, button.btn, .btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--gfs-brown);
	color: #fff;
	border: none;
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-weight: 600;
	font-size: 14.5px;
	padding: 12px 22px;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn:hover, button.btn:hover, .btn-primary:hover { background: var(--gfs-brown-dark); transform: translateY(-1px); box-shadow: var(--shadow); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-ghost {
	display: inline-flex;
	align-items: center;
	background: transparent;
	color: var(--gfs-brown);
	border: 1px solid var(--border);
	border-radius: 999px;
	font-family: inherit;
	font-weight: 600;
	font-size: 13px;
	padding: 7px 16px;
	cursor: pointer;
	transition: all .2s ease;
}
.btn-ghost:hover { border-color: var(--gfs-gold); background: rgba(207, 175, 62, .08); color: var(--gfs-brown-dark); }

/* form fields */
label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 7px; }
input[type=email], input[type=text] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 15px;
	color: var(--text);
	background: #fff;
	margin-bottom: 18px;
	transition: border-color .18s ease, box-shadow .18s ease;
}
input[type=email]:focus, input[type=text]:focus {
	outline: none;
	border-color: var(--gfs-brown);
	box-shadow: 0 0 0 3px rgba(113, 101, 81, .14);
}

/* panel / card (login + errors) */
.panel {
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	padding: 32px;
	box-shadow: var(--shadow-sm);
}
.panel.narrow { max-width: 430px; margin: 36px auto; }
.panel h1 { font-size: 24px; margin-bottom: 6px; }
.panel .lead { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }

/* notices */
.notice { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; }
.notice.info { background: #f4f6f8; border-color: #e3e8ec; color: var(--gfs-navy); }
.notice.error { background: #fbecea; border-color: #f3d4cf; color: #8a2c1f; }

/* badge */
.badge {
	align-self: flex-start;
	background: var(--gfs-gold);
	color: #1a1714;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
}

/* detail page */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--gfs-brown); }
.detail-head { margin-bottom: 22px; }
.player { aspect-ratio: 16 / 9; width: 100%; border: 1px solid var(--border-soft); border-radius: var(--radius); background: #000; box-shadow: var(--shadow-sm); }
.description { margin: 26px 0 0; color: #3a4049; font-size: 15.5px; max-width: 70ch; }
.downloads { margin-top: 34px; }
.attachments { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.attachments h2, .detail-section-title { font-size: 16px; font-weight: 700; color: var(--gfs-navy); margin: 0 0 4px; }
.attachments li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-sm);
	padding: 13px 16px;
	box-shadow: var(--shadow-sm);
	transition: border-color .2s ease;
}
.attachments li:hover { border-color: rgba(207, 175, 62, .5); }
.attachments .att-name { font-weight: 600; font-size: 14.5px; color: var(--text); }
.attachments .att-dl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--gfs-brown); }
.attachments .att-dl:hover { color: var(--gfs-gold-dark); }
.empty-state { color: var(--muted); font-size: 15px; }

@media (max-width: 600px) {
	.site-main { padding: 28px 16px 40px; }
	.header-eyebrow { display: none; }
	h1 { font-size: 25px; }
}
.done-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(207, 175, 62, .14); color: var(--gfs-brown-dark); border: 1px solid rgba(207, 175, 62, .5); border-radius: 999px; font-weight: 600; font-size: 13.5px; padding: 8px 16px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border-soft); }
.admin-table th { background: #faf8f4; color: var(--gfs-brown); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tr:last-child td { border-bottom: none; }
.mini-bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--border); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.mini-bar > span { display: block; height: 100%; background: var(--gfs-gold); }

/* --- Academies (multi-academy) --- */
.academy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.academy-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 18px;
	min-height: 168px;
	padding: 22px 22px 18px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.academy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(207, 175, 62, .5); }
.academy-card h3 { margin: 10px 0 0; font-size: 18px; font-weight: 700; color: var(--gfs-brown); }
.academy-card p { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.academy-card .academy-go { font-size: 13.5px; font-weight: 600; color: var(--gfs-gold-dark); }

.academy-layout { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; }
.module-sidebar {
	position: sticky;
	top: 24px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 14px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
}
.module-sidebar .module { margin-bottom: 18px; }
.module-sidebar .module:last-child { margin-bottom: 0; }
.module-title { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gfs-navy); padding: 0 8px; }
.module-lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.module-lessons a { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text); transition: background .15s ease, color .15s ease; }
.module-lessons a:hover { background: rgba(207, 175, 62, .08); color: var(--gfs-brown-dark); }
.module-lessons a.active { background: rgba(207, 175, 62, .16); color: var(--gfs-brown-dark); font-weight: 600; }
.module-lessons .sb-title { flex: 1; line-height: 1.4; }
.sb-check { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: var(--gfs-gold); color: #1a1714; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sb-pct { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--gfs-gold-dark); min-width: 30px; }
.sb-dot { width: 6px; height: 6px; flex: 0 0 6px; margin: 0 6px; border-radius: 50%; background: var(--border); }

.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }

@media (max-width: 820px) {
	.academy-layout { grid-template-columns: 1fr; }
	.module-sidebar { position: static; max-height: none; }
}

.admin-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; }
.admin-filter select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 14px; }

/* Imported lesson content (Ablefy) — styles inherit brand; export inline styles are stripped at render */
.lesson-content { margin-top: 18px; color: var(--text); font-size: 15px; line-height: 1.6; }
.lesson-content > *:first-child { margin-top: 0; }
.lesson-content p { margin: 0 0 12px; }
.lesson-content h2 { font-size: 20px; color: var(--gfs-brown); margin: 22px 0 10px; }
.lesson-content h3 { font-size: 17px; color: var(--gfs-brown); margin: 18px 0 8px; }
.lesson-content ul, .lesson-content ol { margin: 0 0 12px; padding-left: 22px; }
.lesson-content li { margin: 4px 0; }
.lesson-content a { color: var(--gfs-brown); text-decoration: underline; }
.lesson-content a:hover { color: var(--gfs-brown-dark); }
.lesson-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 12px 0; }
.lesson-content blockquote { margin: 12px 0; padding: 8px 16px; border-left: 3px solid var(--gfs-gold); color: var(--gfs-brown-dark); }
.lesson-content hr { border: none; border-top: 1px solid var(--border-soft); margin: 18px 0; }
.lesson-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.lesson-content th, .lesson-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.lesson-content th { background: rgba(207, 175, 62, .08); color: var(--gfs-brown); font-weight: 600; }

/* Admin sub-nav + customer management */
.admin-subnav { display: flex; gap: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.admin-subnav a { padding: 8px 2px; font-size: 14px; font-weight: 600; color: var(--gfs-brown); border-bottom: 2px solid transparent; }
.admin-subnav a.active { border-bottom-color: var(--gfs-gold); }
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.flash-ok { background: rgba(207, 175, 62, .12); color: var(--gfs-brown-dark); border: 1px solid var(--gfs-gold); }
.flash-error { background: #fdecec; color: #a12626; border: 1px solid #e9b4b4; }
.customer-create { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.customer-create input { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-ok { background: rgba(60, 160, 90, .14); color: #2f7a48; }
.pill-off { background: #f1d6d6; color: #a12626; }
.muted { color: #8a8270; font-size: 13px; }
.grant-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(207, 175, 62, .12); border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip form { display: inline; margin: 0; }
.chip-x { border: none; background: none; cursor: pointer; color: #a12626; font-size: 15px; line-height: 1; padding: 0 4px; }
.grant-add, .customer-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.grant-add select, .grant-add input, .customer-edit input { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.inline-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

/* Content CMS */
.content-list { list-style: none; margin: 12px 0; padding: 0; }
.content-list li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cms-form { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 24px; }
.cms-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--gfs-brown); }
.cms-form input[type=text], .cms-form input[type=url], .cms-form input[type=number], .cms-form textarea, .cms-form select { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 400; }
.cms-form .inline-check { flex-direction: row; }
.cms-media { max-width: 720px; margin-top: 24px; }
.cms-media trix-editor { min-height: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
#videoUpload { display: flex; flex-direction: column; gap: 8px; }
.cms-media .att-dl { color: var(--gfs-brown); font-weight: 600; text-decoration: none; }
