body { background: #f3f6f3; color: #172019; }
.navbar-brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; }
.navbar-brand img { border-radius: 50%; }
.academy-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 2rem; min-height: 245px; padding: clamp(1.6rem,5vw,3.5rem); color: #fff; border-radius: 1.4rem; background: linear-gradient(125deg,#10261c,#1f583c 70%,#357a4e); box-shadow: 0 1rem 2.5rem rgba(16,38,28,.2); }
.academy-hero h1 { margin: .25rem 0 .7rem; font-size: clamp(2rem,6vw,3.7rem); letter-spacing: -.045em; }
.academy-hero p { max-width: 48rem; margin: 0; color: #d8eadf; font-size: 1.08rem; }
.academy-eyebrow, .academy-heading span, .score-madness span, .lesson-label { color: #9ed6b5; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.academy-hero-piece { padding-right: 2vw; color: rgba(255,255,255,.16); font-size: clamp(6rem,16vw,11rem); line-height: .8; transform: rotate(-8deg); }
.academy-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin: 2rem 0 1.25rem; }
.academy-heading h2 { margin: .15rem 0 0; }
.academy-heading p { max-width: 35rem; margin: 0; color: #667069; text-align: right; }
.academy-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.academy-filters { display: flex; align-items: end; flex-wrap: wrap; gap: .85rem; margin: 0 0 1.4rem; padding: 1rem; border: 1px solid #d8e0e8; border-radius: .9rem; background: rgba(255,255,255,.94); box-shadow: 0 .35rem 1rem rgba(22,37,54,.07); }
.academy-filters label { display: grid; gap: .35rem; color: #26364b; font-size: .82rem; font-weight: 800; }
.academy-filters select { min-width: 11rem; min-height: 2.65rem; padding: .45rem 2.1rem .45rem .7rem; border: 1px solid #aebbc8; border-radius: .5rem; background-color: #fff; color: #17283d; }
.academy-empty { margin-bottom: 1.25rem; padding: 1rem; border: 1px dashed #91a17c; border-radius: .75rem; background: #f5f8ef; color: #354825; }
.academy-card, .course-intro, .lesson-card { border: 1px solid #dce5de; border-radius: 1.1rem; background: #fff; box-shadow: 0 .6rem 1.5rem rgba(16,38,28,.06); }
.academy-card { display: flex; flex-direction: column; padding: 1.4rem; }
.academy-card h3 { margin: .9rem 0 .55rem; }
.academy-card p { flex: 1; color: #58635b; line-height: 1.6; }
.academy-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.academy-card-meta span { padding: .3rem .55rem; color: #28553b; border-radius: 99rem; background: #e6f1e9; font-size: .72rem; font-weight: 800; }
.academy-progress { display: grid; gap: .4rem; margin: .4rem 0 1.15rem; color: #667069; font-size: .8rem; }
.academy-progress progress { width: 100%; height: .55rem; accent-color: #28734a; }
.score-madness { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.4rem 1.6rem; color: #fff; border-radius: 1rem; background: linear-gradient(120deg,#2a173d,#6b2d74); }
.score-madness span { color: #e4bff0; }
.score-madness h2 { margin: .2rem 0 .45rem; }
.score-madness p { color: #eee2f1; }
.score-madness > strong { color: #f4d35e; font-size: clamp(2rem,6vw,4rem); white-space: nowrap; }
.academy-back { display: inline-flex; margin-bottom: .25rem; color: #245c3c; font-weight: 800; text-decoration: none; }
.course-intro { padding: clamp(1.3rem,4vw,2.2rem); }
.course-intro h2 { margin: .8rem 0 .45rem; font-size: clamp(1.8rem,4vw,2.7rem); }
.course-intro p { max-width: 55rem; margin: 0; color: #58635b; font-size: 1.05rem; }
.lesson-list { display: grid; gap: 1.15rem; }
.lesson-card { display: grid; grid-template-columns: 64px 1fr; overflow: hidden; }
.lesson-number { display: grid; place-items: start center; padding-top: 1.45rem; color: #fff; background: #1f583c; font-size: 1.6rem; font-weight: 900; }
.lesson-body { min-width: 0; padding: 1.4rem; }
.lesson-title-row { display: flex; justify-content: space-between; gap: 1rem; }
.lesson-title-row h3 { margin: .15rem 0 .6rem; }
.lesson-label { color: #387353; }
.lesson-status { align-self: start; padding: .32rem .6rem; border-radius: 99rem; background: #edf1ee; color: #667069; font-size: .72rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.lesson-status-completed { background: #d9f3e2; color: #145c31; }
.lesson-status-started { background: #e2edfb; color: #245985; }
.lesson-objective { padding: .8rem 1rem; border-left: 4px solid #3b8c5c; background: #f1f7f3; }
.lesson-body h4 { font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; }
.lesson-body li { margin-bottom: .3rem; }
.lesson-ideas { max-width: 52rem; }
.lesson-guidance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1rem; }
.lesson-guidance { padding: 1rem 1.1rem; border: 1px solid #d7e2da; border-radius: .8rem; background: #f7faf8; }
.lesson-guidance h4 { margin-bottom: .7rem; color: #244c34; }
.lesson-guidance ol, .lesson-guidance ul { margin-bottom: 0; padding-left: 1.25rem; }
.lesson-mistakes { border-color: #ead9c3; background: #fff9f0; }
.lesson-mistakes h4 { color: #754b18; }
.lesson-viewer-section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #e1e8e3; }
.lesson-viewer-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: .8rem; }
.lesson-viewer-heading span { color: #387353; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.lesson-viewer-heading h4 { margin: .15rem 0 0; color: #183624; font-size: 1.05rem; text-transform: none; }
.lesson-viewer-heading p { max-width: 34rem; margin: 0; color: #667069; font-size: .84rem; text-align: right; }
.opening-lesson-viewer {
  width: 100%;
  min-width: 0;
  --board-color: #b58863;
  --c-lpv-accent: #2f754b;
  --c-lpv-accent-over: #fff;
  --c-lpv-bg: #f7faf8;
  --c-lpv-bg-controls: #e7eee9;
  --c-lpv-bg-movelist: #f4f7f5;
  --c-lpv-bg-pane: #e7eee9;
  --c-lpv-bg-player: #edf3ef;
  --c-lpv-bg-variation: #e6ede8;
  --c-lpv-border: #c9d6cd;
  --c-lpv-current-move: #d5eadc;
  --c-lpv-fbt-hover: #2f754b;
  --c-lpv-font: #26352c;
  --c-lpv-font-bg: #c6d2c9;
  --c-lpv-font-shy: #68766d;
  --c-lpv-move-hover: #e0ebe3;
  --c-lpv-past-moves: #526158;
  --c-lpv-pgn-text: #f7faf8;
  --c-lpv-side-border: #d5dfd8;
}
.opening-lesson-viewer .lpv { width: 100%; box-shadow: 0 .65rem 1.4rem rgba(16,38,28,.14); }
.opening-lesson-viewer .lpv__controls { border-color: #c9d6cd; background: #e7eee9; }
.opening-lesson-viewer .lpv__controls .lpv__fbt { border-color: #c3d0c7; background: #fff; color: #2d4938; }
.opening-lesson-viewer .lpv__controls .lpv__fbt.disabled,
.opening-lesson-viewer .lpv__controls .lpv__fbt[disabled] { background: #dfe7e1; color: #718078; }
.opening-viewer-error { padding: 1rem; border: 1px solid #f4b7b7; border-radius: .6rem; background: #fff3f3; color: #842029; }
.lesson-training { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,360px); align-items: center; gap: 1.25rem; margin-top: 1.25rem; padding: 1.15rem; border: 1px solid #cdd9e8; border-radius: .9rem; background: #f4f7fb; }
.lesson-training-copy span { color: #315f8d; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.lesson-training-copy h4 { margin: .2rem 0 .65rem; color: #1c3f63; font-size: 1.05rem; text-transform: none; }
.lesson-training-copy p { color: #4d5f71; }
.opening-training-viewer { width: 100%; min-width: 0; --board-color: #b58863; }
.opening-training-viewer .lpv { width: 100%; box-shadow: 0 .45rem 1rem rgba(23,43,66,.14); }
.opening-line { display: block; overflow-wrap: anywhere; padding: .9rem; color: #f5f3ea; border-radius: .65rem; background: #202823; font-size: .9rem; line-height: 1.65; }
.lesson-actions { margin-top: 1rem; }
.completed-note { color: #176836; font-weight: 800; }
.site-footer { color: #fff; background: #0b1510; }
.site-footer a { color: #fff; }
@media (max-width: 991px) { .academy-grid { grid-template-columns: 1fr; } .academy-heading { display: block; } .academy-heading p { margin-top: .5rem; text-align: left; } }
@media (max-width: 991px) {
  .lesson-guidance-grid, .lesson-training { grid-template-columns: minmax(0,1fr); }
  .opening-training-viewer { max-width: 360px; }
  .lesson-viewer-heading { display: block; }
  .lesson-viewer-heading p { margin-top: .45rem; text-align: left; }
  .opening-lesson-viewer .lpv--moves-auto { grid-template-areas: "board" "controls" "side"; grid-template-columns: minmax(0,1fr); grid-template-rows: auto var(--controls-height) minmax(8rem,auto); }
  .opening-lesson-viewer .lpv--players.lpv--moves-auto { grid-template-areas: "player-top" "board" "player-bot" "controls" "side"; grid-template-columns: minmax(0,1fr); grid-template-rows: 2em auto 2em var(--controls-height) minmax(8rem,auto); }
  .opening-lesson-viewer .lpv__side { max-height: 15rem; }
}
@media (max-width: 991px) {
  .opening-lesson-viewer.lpv { grid-template-areas: "board" "controls" "side" !important; grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto var(--controls-height) minmax(8rem,auto) !important; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
  .opening-lesson-viewer.lpv--players { grid-template-areas: "player-top" "board" "player-bot" "controls" "side" !important; grid-template-columns: minmax(0,1fr) !important; grid-template-rows: 2em auto 2em var(--controls-height) minmax(8rem,auto) !important; }
}
@media (max-width: 575px) { .academy-hero-piece { display: none; } .lesson-card { grid-template-columns: 42px 1fr; } .lesson-number { font-size: 1.15rem; } .lesson-body { padding: 1rem .75rem; } .lesson-title-row { display: grid; } .lesson-status { justify-self: start; } .score-madness > strong { display: none; } .btn { min-height: 48px; } }
@media (max-width: 575px) { .academy-filters { align-items: stretch; } .academy-filters label, .academy-filters select, .academy-filters .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
