/* Learning Hub: navigation bar, dashboard, teaching view and catalogue.
   Same design language as reader.css (course/material pages). Flat colours only. */
.lh2, .lh2-nav {
  --red: #9C1C1C; --red-dark: #7a1515; --green: #008A48; --yellow: #ECA72C;
  --ink: #151515; --muted: #6b6f76; --line: #ececf0; --bg: #f5f5f7; --sand: #F8F1E7;
  --radius: 18px; --shadow: 0 10px 30px rgba(21, 21, 21, .07);
}
.lh2 { background: var(--bg); color: var(--ink); padding-bottom: 72px; }
.lh2-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ── Nav bar ── */
.lh2-nav { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.lh2-nav-inner { display: flex; align-items: center; gap: 18px; min-height: 58px; }
.lh2-nav-brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; font-weight: 800; color: var(--ink) !important; text-decoration: none !important; white-space: nowrap; }
.lh2-nav-brand i { width: 32px !important; height: 32px; line-height: 32px !important; border-radius: 10px; display: inline-grid !important; place-items: center; background: var(--red) !important; color: #fff !important; font-size: .9rem; flex: none; }
.lh2-nav-links { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; scrollbar-width: none; }
.lh2-nav-links a { display: inline-flex; align-items: center; gap: 8px; padding: 18px 14px 16px; color: var(--muted); font-weight: 700; font-size: .92rem; text-decoration: none !important; border-bottom: 3px solid transparent; white-space: nowrap; }
.lh2-nav-links a:hover { color: var(--red); }
.lh2-nav-links a.is-on { color: var(--red); border-bottom-color: var(--red); }
.lh2-nav-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--red); color: #fff !important; font-weight: 700; font-size: .88rem; text-decoration: none !important; }

/* ── Header band ── */
.lh2-head { background: var(--sand) url("../assets/images/bg/contours-red.074c6603e79f.svg") center / cover no-repeat; padding: 40px 0 88px; }
.lh2-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.lh2-title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; margin: 0 0 8px; color: var(--ink); }
.lh2-sub { color: #545a63; font-size: 1.02rem; margin: 0; max-width: 640px; line-height: 1.6; }
.lh2-search { display: flex; gap: 8px; margin-top: 22px; max-width: 620px; }
.lh2-search input { flex: 1; height: 50px !important; padding: 0 18px 0 46px !important; border: 1px solid #e4dccf !important; border-radius: 999px !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='16' height='16'%3E%3Cpath fill='%236b6f76' d='M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") 18px center no-repeat !important; font-size: 1rem; max-width: none !important; width: auto !important; }
.lh2-search input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.lh2-search button { height: 50px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; cursor: pointer; width: auto !important; max-width: none !important; }
.lh2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lh2-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid #e4dccf; background: #fff; color: #444 !important; font-size: .85rem; font-weight: 700; text-decoration: none !important; }
.lh2-chip small { color: #9a9ea6; font-weight: 700; }
.lh2-chip:hover { border-color: var(--red); color: var(--red) !important; }
.lh2-chip.is-on { background: var(--red); border-color: var(--red); color: #fff !important; }
.lh2-chip.is-on small { color: rgba(255, 255, 255, .75); }

/* Stats */
.lh2-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.lh2-stat { background: #fff; border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 6px 18px rgba(122, 21, 21, .06); }
.lh2-stat i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem; flex: none; }
.lh2-stat b { display: block; font-family: 'Montserrat', sans-serif; font-size: 1.4rem; line-height: 1.1; }
.lh2-stat span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.tone-red { background: rgba(156, 28, 28, .1); color: var(--red); }
.tone-green { background: rgba(0, 138, 72, .1); color: var(--green); }
.tone-amber { background: rgba(236, 167, 44, .16); color: #b45309; }
.tone-blue { background: rgba(29, 78, 216, .1); color: #1d4ed8; }

/* ── Body layout ── */
.lh2-body { margin-top: -56px; position: relative; z-index: 2; }
.lh2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.lh2-section-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.lh2-section-hd h2 { font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 800; margin: 0; }
.lh2-section-hd a { color: var(--red); font-weight: 700; font-size: .9rem; text-decoration: none; }

/* Continue card */
.lh2-continue { padding: 0 !important; margin: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lh2-continue .lh2-continue-cover { position: relative; min-height: 200px; aspect-ratio: auto; width: 100%; height: 100%; }
.lh2-continue-body { padding: 24px 26px; display: flex; flex-direction: column; justify-content: center; }
.lh2-continue-body .lh2-eyebrow { margin-bottom: 6px; }
.lh2-continue-body h3 { font-family: 'Montserrat', sans-serif; font-size: 1.35rem; margin: 0 0 6px; }
.lh2-next { color: #444; margin: 0 0 14px; }
.lh2-next b { color: var(--ink); }
.lh2-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Buttons */
.lh2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none !important; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; width: auto !important; max-width: none !important; }
.lh2-btn-primary { background: var(--red); color: #fff !important; }
.lh2-btn-primary:hover { background: var(--red-dark); }
.lh2-btn-ghost { background: #fff; color: var(--ink) !important; border-color: var(--line); }
.lh2-btn-ghost:hover { border-color: var(--red); color: var(--red) !important; }
.lh2-btn-sm { padding: 8px 14px; font-size: .84rem; }
.lh2-btn-block { width: 100% !important; }

/* Progress bar */
.lh2-prog { display: flex; align-items: center; gap: 10px; }
.lh2-prog-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.lh2-prog-bar span { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.lh2-prog.is-done .lh2-prog-bar span { background: var(--green); }
.lh2-prog b { font-size: .85rem; min-width: 40px; text-align: right; }

/* Course cards */
.lh2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.lh2-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.lh2-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(21, 21, 21, .1); }
.lh2-cover { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; color: #fff; text-decoration: none !important; }
.lh2-cover img { width: 100%; height: 100%; object-fit: cover; }
.lh2-cover-code { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: .04em; color: rgba(255, 255, 255, .95); }
.lh2-cover.t0, .lh2-cover.t5 { background: #9C1C1C; }
.lh2-cover.t1, .lh2-cover.t6 { background: #0f766e; }
.lh2-cover.t2, .lh2-cover.t7 { background: #1e3a8a; }
.lh2-cover.t3, .lh2-cover.t8 { background: #b45309; }
.lh2-cover.t4, .lh2-cover.t9 { background: #5b21b6; }
.lh2-cover-tags { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.lh2-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: .74rem; font-weight: 800; }
.lh2-tag.is-live { background: #e11d48; color: #fff; }
.lh2-tag.is-done { background: var(--green); color: #fff; }
.lh2-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lh2-card-code { font-size: .74rem; font-weight: 800; color: var(--muted); letter-spacing: .06em; }
.lh2-card-title { font-family: 'Montserrat', sans-serif; font-size: 1.05rem; font-weight: 800; line-height: 1.3; margin: 0; }
.lh2-card-title a { color: var(--ink); text-decoration: none; }
.lh2-card-title a:hover { color: var(--red); }
.lh2-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .82rem; }
.lh2-card-meta i { color: var(--red); margin-right: 4px; }
.lh2-card-desc { color: #545a63; font-size: .9rem; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lh2-card-foot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.lh2-card-next { font-size: .84rem; color: #545a63; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Side panels */
.lh2-side { display: flex; flex-direction: column; gap: 18px; }
.lh2-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.lh2-panel h3 { display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; font-size: 1rem; margin: 0 0 12px; }
.lh2-panel h3 i { color: var(--red); }
.lh2-panel h3 .lh2-count { margin-left: auto; font-size: .75rem; line-height: 1.5; padding: 1px 9px; border-radius: 999px; background: rgba(156, 28, 28, .1); color: var(--red); align-self: center; }
.lh2-list { list-style: none; margin: 0; padding: 0; }
.lh2-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.lh2-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lh2-list a.lh2-item { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); text-decoration: none; }
.lh2-list a.lh2-item:hover strong { color: var(--red); }
.lh2-dot { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: .85rem; }
.lh2-item-text { min-width: 0; }
.lh2-item-text strong { display: block; font-size: .9rem; line-height: 1.35; }
.lh2-item-text small { color: var(--muted); font-size: .78rem; }
.lh2-item-text small.is-late { color: #b42318; font-weight: 700; }
.lh2-empty-note { color: var(--muted); font-size: .88rem; margin: 0; }
.lh2-live { border: 2px solid #e11d48; }
.lh2-live h3 { color: #e11d48; }
.lh2-live h3 i { color: #e11d48; animation: lh2-pulse 1.3s infinite; }
@keyframes lh2-pulse { 50% { opacity: .35; } }

/* Teaching table */
.lh2-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.lh2-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lh2-table th { text-align: left; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lh2-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lh2-table tr:last-child td { border-bottom: 0; }
.lh2-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: rgba(156, 28, 28, .1); color: var(--red); }
.lh2-badge.is-zero { background: #f2f3f5; color: var(--muted); }

/* Catalogue extras */
.lh2-banner { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 20px; }
.lh2-banner i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 138, 72, .1); color: var(--green); font-size: 1.1rem; flex: none; }
.lh2-steps { padding: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.lh2-step { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.lh2-step span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; margin-bottom: 12px; }
.lh2-step h3 { font-family: 'Montserrat', sans-serif; font-size: 1.02rem; margin: 0 0 6px; }
.lh2-step p { color: #545a63; margin: 0; font-size: .92rem; line-height: 1.6; }
.lh2-empty { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 56px 20px; }
.lh2-empty i { font-size: 2rem; color: var(--red); margin-bottom: 12px; }
.lh2-empty h3 { font-family: 'Montserrat', sans-serif; margin: 0 0 6px; }
.lh2-empty p { color: var(--muted); margin: 0 0 16px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .lh2-grid { grid-template-columns: minmax(0, 1fr); }
  .lh2-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .lh2-container { padding: 0 14px; }
  .lh2-head { padding: 28px 0 76px; }
  .lh2-continue { grid-template-columns: 1fr; }
  .lh2-continue-cover { min-height: 140px; }
  .lh2-steps { grid-template-columns: 1fr; }
  .lh2-nav-brand span { display: none; }
  .lh2-nav-links { margin-left: 0; }
  .lh2-nav-links a { padding: 16px 10px 14px; font-size: .86rem; }
  .lh2-search button { padding: 0 18px; }
  .lh2-stat { padding: 12px 14px; }
  .lh2-stat b { font-size: 1.2rem; }
}

/* ── Open Learning Hub (no login) ── */
.oh-live { display: grid; gap: 10px; margin-top: 22px; }
.oh-live-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: #fff1f2; border: 1px solid #fecdd3; text-decoration: none !important; color: var(--ink) !important; }
.oh-live-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 0 rgba(225, 29, 72, .5); animation: oh-pulse 1.6s infinite; }
@keyframes oh-pulse { 70% { box-shadow: 0 0 0 10px rgba(225, 29, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); } }
.oh-live-text { flex: 1; min-width: 0; }
.oh-live-text small { display: block; font-size: .74rem; font-weight: 800; color: #be123c; text-transform: uppercase; letter-spacing: .05em; }
.oh-live-text b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oh-live-go { flex: none; padding: 9px 16px; border-radius: 12px; background: #e11d48; color: #fff; font-weight: 800; font-size: .88rem; }
.lh2-muted { color: var(--muted); font-size: .84rem; font-weight: 600; }
.oh-up { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.oh-up-item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 6px 22px rgba(21, 21, 21, .06); text-decoration: none !important; color: var(--ink) !important; }
.oh-up-date { flex: none; width: 50px; text-align: center; border-radius: 12px; background: var(--sand); padding: 6px 0; }
.oh-up-date small { display: block; font-size: .68rem; font-weight: 800; color: var(--red); text-transform: uppercase; }
.oh-up-date b { font-size: 1.15rem; }
.oh-up-text { min-width: 0; }
.oh-up-text b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oh-up-text small { color: var(--muted); }
.lh2-card .oh-star { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px !important; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #9a9ea6; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); padding: 0; }
.lh2-card .oh-star[aria-pressed="true"] { color: #f59e0b; }
.lh2-card { position: relative; }
.lh2-nav-teacher { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted) !important; text-decoration: none !important; padding: 6px 10px; border-radius: 10px; }
.lh2-nav-teacher:hover { color: var(--red) !important; background: var(--sand); }
@media (max-width: 760px) { .lh2-nav-teacher span, .lh2-nav-teacher { font-size: 0; gap: 0; } .lh2-nav-teacher i { font-size: 1rem; } }
