:root {
  --nn-bg: #FBFAF6;
  --nn-ink: #20271F;
  --nn-accent: #8B5C66;
  --nn-olive: #DCE8AD;
  --nn-green: #344436;
  --nn-line: #E5E5DA;
  --nn-white: #FFF;
  --nn-muted: #667064;
  --nn-card-radius: 26px;
}

body.nn-lms { background: var(--nn-bg) !important; color: var(--nn-ink); font-family: 'Manrope', sans-serif !important; }
body.nn-lms :is(p, li, a, button, input, label, select, textarea) { font-family: 'Manrope', sans-serif; }
body.nn-lms :is(h1, h2, h3, h4, .course-title, .course-section__title) { color: var(--nn-ink); }
body.nn-lms :is(h1, h2, .course-title, .course-section__title) { font-family: 'Prata', Georgia, serif !important; font-weight: 400 !important; letter-spacing: -.035em; line-height: 1.22; }
body.nn-lms a { color: var(--nn-green); }
body.nn-lms a:hover { color: var(--nn-accent); }
body.nn-lms :focus-visible { outline: 3px solid var(--nn-accent) !important; outline-offset: 3px; }

body.nn-lms > .wp-site-blocks > header, body.nn-lms > .wp-site-blocks > footer { display: none !important; }
body.nn-lms .wp-block-post-content > .wp-block-group:first-child { background-color: transparent; }
.nn-lms-nav { position: relative; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 20px 32px; color: var(--nn-ink); }
body.nn-lms.admin-bar .nn-lms-nav { margin-top: 32px; }
.nn-lms-brand { font-family: 'Prata', Georgia, serif !important; font-size: 31px; text-decoration: none !important; white-space: nowrap; }
.nn-lms-brand span { color: var(--nn-accent); }
.nn-lms-nav-links { display: flex; gap: 32px; align-items: center; }
.nn-lms-nav-links a { font-weight: 700; font-size: 14px; text-decoration: none; }
.nn-lms-profile { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 17px; border: 1px solid var(--nn-line); border-radius: 999px; background: var(--nn-white); font-size: 13px; font-weight: 700; text-decoration: none !important; }

body.nn-lms :is(.wp-block-button__link, .lp-button, button.button, .button-enroll-course, .course-button-read-more a, .course-button-read-more button, .nn-primary) { background: var(--nn-green) !important; border: 1px solid var(--nn-green) !important; border-radius: 999px !important; color: #fff !important; font-weight: 700 !important; padding: 14px 25px !important; box-shadow: none !important; transition: transform .2s ease, background-color .2s ease; }
body.nn-lms :is(.wp-block-button__link, .lp-button, button.button, .button-enroll-course, .course-button-read-more a, .course-button-read-more button, .nn-primary):hover { background: var(--nn-ink) !important; transform: translateY(-2px); }
body.nn-lms input:is([type=search],[type=text]), body.nn-lms select { border: 1px solid var(--nn-line); border-radius: 999px; background: #fff; min-height: 46px; padding: 10px 17px; }

/* Catalogue: visual hierarchy and card layout, preserving LearnPress links and filters. */
body.nn-lms.post-type-archive-lp_course main { max-width: 1280px; margin: 0 auto; padding: 12px 32px 80px; }
body.nn-lms.post-type-archive-lp_course main h1 { font-size: clamp(34px, 4vw, 58px); margin: 22px 0 28px; }
body.nn-lms .learn-press-courses { gap: 24px !important; }
body.nn-lms .learn-press-courses > .course { overflow: hidden; border: 1px solid var(--nn-line) !important; border-radius: var(--nn-card-radius) !important; background: var(--nn-white) !important; box-shadow: 0 13px 32px rgba(32,39,31,.05); }
body.nn-lms .learn-press-courses .course-img { background: var(--nn-olive); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
body.nn-lms .learn-press-courses .course-title { font-size: clamp(21px, 2vw, 28px) !important; line-height: 1.35; }
body.nn-lms .learn-press-courses .course .wp-block-learnpress-course-item-template { padding: 0 20px 22px; }
body.nn-lms .learn-press-courses .course :is(.course-count-item, .course-count-student, .course-instructor) { color: var(--nn-muted); font-size: 13px; }
body.nn-lms .lp-archive-courses-sidebar .widget { border: 1px solid var(--nn-line); border-radius: var(--nn-card-radius); background: #fff; padding: 20px; }

/* Course overview follows the programme-card rhythm in the supplied screens. */
body.nn-lms.single-lp_course:not(.course-item-popup) .wp-site-blocks main { max-width: 1240px; margin: auto; padding: 18px 32px 80px; }
body.nn-lms.single-lp_course:not(.course-item-popup) .wp-block-learnpress-course-title { background: var(--nn-olive); border-radius: var(--nn-card-radius); padding: clamp(30px, 5vw, 66px) !important; margin: 0 0 18px !important; }
body.nn-lms.single-lp_course:not(.course-item-popup) .wp-block-learnpress-course-title .course-title { font-size: clamp(34px, 4vw, 60px); }
body.nn-lms.single-lp_course:not(.course-item-popup) .lp-course-description { font-size: 16px; line-height: 1.8; color: var(--nn-muted); }
body.nn-lms .lp-course-curriculum__title { font-size: clamp(26px, 3vw, 38px); margin: 32px 0 14px; }
body.nn-lms .course-curriculum-info { color: var(--nn-muted); font-size: 13px; }
body.nn-lms .course-curriculum .course-section { border: 1px solid var(--nn-line) !important; border-radius: 20px !important; background: #fff !important; margin: 0 0 12px !important; overflow: hidden; }
body.nn-lms .course-section-header { background: #fff !important; padding: 18px 22px !important; }
body.nn-lms .course-section__title { font-size: clamp(17px, 1.7vw, 22px) !important; }
body.nn-lms .course-section__items { border-top: 1px solid var(--nn-line); padding: 8px 16px 16px !important; }
body.nn-lms .course-item__link { display: block; padding: 12px 14px !important; border-radius: 13px; text-decoration: none; }
body.nn-lms .course-item__link:hover, body.nn-lms .course-item.current .course-item__link { background: #F2F5E8; }
body.nn-lms .course-item.has-status-completed .course-item__link,
body.nn-lms .course-item.item-completed .course-item__link { background: #ECF8F1; }
body.nn-lms .course-item.has-status-completed .course-item__status,
body.nn-lms .course-item.item-completed .course-item__status { color: #267C5B; }
body.nn-lms .course-item.current .course-item__link { border-left: 3px solid var(--nn-accent); }
body.nn-lms .course-item .locked { color: #9AA29A; }
body.nn-lms :is(.learn-press-progress, .lp-course-progress, .lp-progress-bar) { border-radius: 999px; overflow: hidden; background: #E7EBDD; }
body.nn-lms :is(.learn-press-progress, .lp-course-progress, .lp-progress-bar) :is(.progress-bg, .lp-progress-value, .progress-active) { background: var(--nn-green) !important; border-radius: 999px; }
body.nn-lms .lp-block-course-sidebar { background: #fff !important; border: 1px solid var(--nn-line) !important; border-radius: var(--nn-card-radius) !important; padding: 22px !important; box-shadow: 0 13px 32px rgba(32,39,31,.05); }
body.nn-lms .lp-block-course-sidebar .course-price { font-family: 'Prata', Georgia, serif; color: var(--nn-ink); font-size: 26px; }

/* LearnPress lesson shell. All existing completion, sidebar and navigation controls stay native. */
body.nn-lms.course-item-popup #popup-course { background: var(--nn-bg) !important; color: var(--nn-ink); }
body.nn-lms.course-item-popup #popup-course { flex-direction: row-reverse; }
body.nn-lms.course-item-popup #popup-header { background: #fff !important; border-bottom: 1px solid var(--nn-line); box-shadow: none !important; }
body.nn-lms.course-item-popup.lp-sidebar-toggle__open :is(#popup-header, #popup-footer) { left: 0 !important; right: 300px !important; }
body.nn-lms.course-item-popup:not(.lp-sidebar-toggle__open) :is(#popup-header, #popup-footer) { left: 0 !important; right: 0 !important; }
body.nn-lms.course-item-popup #popup-header .course-title { font-size: 20px !important; }
body.nn-lms.course-item-popup #popup-sidebar { background: #fff !important; border-left: 1px solid var(--nn-line); border-right: 0; }
body.nn-lms.course-item-popup #popup-sidebar .course-section { box-shadow: none; border-radius: 0 !important; border: 0 !important; border-bottom: 1px solid var(--nn-line) !important; }
body.nn-lms.course-item-popup #popup-sidebar .course-section__title { font-family: 'Manrope', sans-serif !important; font-size: 14px !important; font-weight: 700 !important; line-height: 1.45; letter-spacing: 0; }
body.nn-lms.course-item-popup #popup-sidebar .course-item__link { font-size: 13px; line-height: 1.5; }
body.nn-lms.course-item-popup #popup-content { background: var(--nn-bg) !important; }
body.nn-lms.course-item-popup .content-item-wrap { max-width: 1050px !important; margin: 0 auto !important; padding: clamp(22px, 3.5vw, 50px) !important; }
body.nn-lms.course-item-popup .content-item-summary { background: #fff; border: 1px solid var(--nn-line); border-radius: var(--nn-card-radius); overflow: hidden; padding: clamp(20px, 3vw, 42px); }
body.nn-lms.course-item-popup .lesson-title { font-size: clamp(27px, 3vw, 41px) !important; margin: 0 0 22px; }
body.nn-lms.course-item-popup .lesson-description { font-size: 15px; line-height: 1.8; }
body.nn-lms.course-item-popup .lesson-description h3 { font-family: 'Prata', Georgia, serif !important; font-weight: 400; font-size: clamp(21px, 2.2vw, 29px); line-height: 1.4; margin: 0 0 15px; }
body.nn-lms.course-item-popup .lesson-description p { color: var(--nn-muted); }
body.nn-lms.course-item-popup .lesson-description a[href] { overflow-wrap: anywhere; }
body.nn-lms.course-item-popup #popup-footer { background: #fff; border-top: 1px solid var(--nn-line); }

.nn-lecture-layout { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: 26px; align-items: start; }
.nn-lecture-list { position: sticky; top: 24px; display: grid; gap: 8px; max-height: 68vh; overflow: auto; }
.nn-lecture-tab { text-align: left; font: 700 13px/1.5 'Manrope', sans-serif; color: var(--nn-ink); background: #F5F6F1; border: 1px solid transparent; border-radius: 14px; padding: 12px 13px; cursor: pointer; }
.nn-lecture-tab[aria-selected=true] { background: var(--nn-olive); border-color: #C9D99B; }
.nn-lecture-panel[hidden] { display: none !important; }
.nn-lecture-panel { min-width: 0; }
.nn-video { margin: 0 0 25px; }
.nn-video iframe { display: block; width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 18px; background: var(--nn-ink); }
.nn-video figcaption { margin-top: 10px; font-size: 12px; color: var(--nn-muted); }
.nn-video figcaption a { color: var(--nn-accent) !important; }
.nn-resource-list { list-style: none !important; margin: 20px 0 !important; padding: 0 !important; display: grid; gap: 9px; }
.nn-resource-list li { margin: 0 !important; border: 1px solid var(--nn-line); border-radius: 14px; background: #fff; padding: 0 !important; }
.nn-resource-list li a { display: block; padding: 13px 16px; text-decoration: none; font-weight: 700; }
.nn-resource-list li a::before { content: '↗'; color: var(--nn-accent); margin-right: 10px; }
.nn-resource-list li a:hover { background: #F6F8F0; border-radius: 14px; }
.nn-lesson-tabs { display: flex; gap: 22px; margin-top: 28px; border-bottom: 1px solid var(--nn-line); }
.nn-lesson-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--nn-muted); padding: 12px 0; font: 700 14px 'Manrope', sans-serif; cursor: pointer; }
.nn-lesson-tabs button[aria-selected=true] { color: var(--nn-green); border-color: var(--nn-accent); }
.nn-comments-panel[hidden] { display: none !important; }
body.nn-lms .comment-respond { border-radius: 18px; background: #F7F8F2; padding: 22px; }

/* Existing LearnPress profile remains the source of truth for student progress. */
body.nn-lms.page main { max-width: 1240px; margin: 0 auto; padding: 18px 32px 80px; }
body.nn-lms #learn-press-profile, body.nn-lms .lp-profile-content { background: #fff; border: 1px solid var(--nn-line); border-radius: var(--nn-card-radius); padding: 20px; }
body.nn-lms .lp-profile-nav-tabs li.active, body.nn-lms .lp-profile-nav-tabs a:hover { background: var(--nn-olive); }
body.nn-lms.learnpress-profile main > .wp-block-group.alignfull { margin: 0 !important; padding: 20px 0 70px !important; }
body.nn-lms.learnpress-profile .wp-block-post-title { max-width: none !important; margin: 0 0 26px !important; font-size: clamp(32px, 4vw, 52px); }
body.nn-lms.learnpress-profile #learn-press-profile { max-width: 100%; box-sizing: border-box; }
body.nn-lms.learnpress-profile #learn-press-profile .lp-content-area { max-width: 100%; }
body.nn-lms.learnpress-profile .lp-profile-nav-tabs { border: 1px solid var(--nn-line); border-radius: var(--nn-card-radius); overflow: hidden; background: #fff; }
body.nn-lms.learnpress-profile .lp-profile-nav-tabs li { border-bottom: 1px solid var(--nn-line); }
body.nn-lms.learnpress-profile .lp-profile-nav-tabs li:last-child { border-bottom: 0; }
body.nn-lms.learnpress-profile .lp-profile-nav-tabs li.active a { color: var(--nn-ink) !important; }
body.nn-lms.learnpress-profile .lp-profile-content { min-width: 0; }
body.nn-lms.learnpress-profile .dashboard-statistic > * { background: var(--nn-bg); border-radius: 18px; }

@media (max-width: 800px) {
  .nn-lms-nav { padding: 14px 18px; gap: 10px; }
  .nn-lms-brand { font-size: 26px; }
  .nn-lms-nav-links { gap: 13px; }
  .nn-lms-nav-links a { font-size: 12px; }
  .nn-lms-profile { font-size: 0; min-width: 38px; min-height: 38px; padding: 0; }
  .nn-lms-profile::before { content: '◉'; font-size: 20px; }
  body.nn-lms.post-type-archive-lp_course main, body.nn-lms.single-lp_course:not(.course-item-popup) .wp-site-blocks main, body.nn-lms.page main { padding-left: 18px; padding-right: 18px; }
  body.nn-lms.course-item-popup .content-item-wrap { padding: 16px !important; }
  .nn-lecture-layout { grid-template-columns: 1fr; }
  .nn-lecture-list { position: static; display: flex; max-height: none; overflow: auto; padding-bottom: 6px; }
  .nn-lecture-tab { min-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  body.nn-lms *, body.nn-lms *::before, body.nn-lms *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
