
:root{
  --lesson-ink:#103553;
  --lesson-blue:#145a86;
  --lesson-blue-dark:#103f67;
  --lesson-gold:#c9953e;
  --lesson-paper:#fffdf9;
  --lesson-cream:#f7f1e5;
  --lesson-line:rgba(16,53,83,.14);
  --lesson-muted:#667b87;
  --lesson-green:#2d715e;
  --lesson-amber:#9a681f;
}
.lessons-page{
  background:#f8f5ee;
  color:var(--lesson-ink);
  font-family:"Heebo","Noto Sans Hebrew",Arial,sans-serif;
}
.lessons-page *{box-sizing:border-box}
.lessons-page button,.lessons-page input{font:inherit}

/* Hero: historic background also gives the floating Breslov logo a visual surface. */
.lessons-hero{
  position:relative;
  min-height:390px;
  overflow:hidden;
  color:#fff;
  background:
    linear-gradient(90deg,rgba(7,31,48,.86),rgba(7,31,48,.48) 54%,rgba(7,31,48,.72)),
    url("/nav-history/assets/img/breslov-historic.jpg") center 48%/cover no-repeat;
  border-bottom:1px solid rgba(16,53,83,.14);
}
.lessons-hero::after{
  content:"";
  position:absolute;inset:0;
  background:
    radial-gradient(circle at 80% 25%,rgba(225,181,92,.18),transparent 16rem),
    linear-gradient(to top,rgba(8,28,41,.28),transparent 52%);
  pointer-events:none;
}
.lessons-hero-shade{position:absolute;inset:0;box-shadow:inset 0 -26px 54px rgba(0,0,0,.12)}
.lessons-hero-inner{
  position:relative;z-index:2;
  min-height:390px;
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(270px,.65fr);
  gap:42px;
  align-items:center;
  padding-top:94px;
  padding-bottom:42px;
}
.lessons-hero-copy{text-shadow:0 2px 13px rgba(0,0,0,.34)}
.lessons-eyebrow{
  display:inline-block;
  padding:5px 12px;
  margin:0 0 10px;
  border:1px solid rgba(255,255,255,.30);
  border-radius:999px;
  background:rgba(9,48,72,.43);
  font-size:14px;
  font-weight:800;
}
.lessons-hero h1{
  margin:0;
  font-size:clamp(52px,6vw,82px);
  line-height:1;
  letter-spacing:-.04em;
}
.lessons-hero-lead{
  max-width:760px;
  margin:17px 0 0;
  font-size:clamp(19px,2.1vw,27px);
  line-height:1.52;
  font-weight:650;
}
.hero-stats{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:21px;
  text-shadow:none;
}
.hero-stats span{
  min-width:112px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.21);
  border-radius:7px;
  background:rgba(250,245,235,.86);
  color:#244c65;
  text-align:center;
}
.hero-stats b{display:block;font-size:22px;line-height:1}
.hero-stats small{display:block;margin-top:4px;font-size:11px;font-weight:700}

/* CSS-only open-book motif. */
.lessons-hero-art{position:relative;min-height:220px}
.open-book{
  position:absolute;
  width:250px;height:150px;
  left:50%;top:52%;transform:translate(-50%,-50%) rotate(-2deg);
  filter:drop-shadow(0 15px 20px rgba(0,0,0,.24));
}
.book-page{
  position:absolute;top:0;width:126px;height:145px;
  border:1px solid rgba(110,79,31,.34);
  background:linear-gradient(145deg,#fffaf0,#e8d6b6);
}
.book-right{right:0;border-radius:7px 24px 10px 4px;transform:skewY(-4deg)}
.book-left{left:0;border-radius:24px 7px 4px 10px;transform:skewY(4deg)}
.book-spine{
  position:absolute;left:50%;top:4px;bottom:2px;width:3px;
  background:rgba(115,75,25,.34);transform:translateX(-50%);z-index:3;
}
.open-book i{
  position:absolute;height:2px;background:rgba(85,76,58,.34);z-index:4;border-radius:3px;
}
.open-book .l1,.open-book .l2,.open-book .l3{right:20px;width:82px}
.open-book .l4,.open-book .l5,.open-book .l6{left:20px;width:82px}
.open-book .l1,.open-book .l4{top:46px}
.open-book .l2,.open-book .l5{top:72px}
.open-book .l3,.open-book .l6{top:98px}
.voice-ring{
  position:absolute;border:2px solid rgba(245,213,146,.45);border-radius:50%;
  left:50%;top:50%;transform:translate(-50%,-50%);
}
.vr1{width:295px;height:195px}
.vr2{width:350px;height:240px;opacity:.65}
.vr3{width:410px;height:290px;opacity:.32}

/* Controls */
.lessons-controls{
  padding:20px 0 16px;
  background:#f3ede2;
  border-bottom:1px solid var(--lesson-line);
}
.catalog-search{
  height:56px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) 112px 132px;
  align-items:center;
  border:1px solid #c9d5dc;
  border-radius:8px;
  background:#fff;
  box-shadow:0 3px 12px rgba(16,53,83,.045);
}
.catalog-search-icon{padding-inline:17px 5px;color:#286b93;font-size:28px}
.catalog-search input{
  min-width:0;border:0;outline:0;background:transparent;
  color:#173f59;font-size:17px;padding:10px;
}
.search-button,.browse-button{
  align-self:stretch;border:0;cursor:pointer;font-weight:800;
}
.search-button{background:var(--lesson-blue);color:#fff}
.browse-button{background:#eee5d8;color:#28566f;border-radius:7px 0 0 7px}
.lesson-filter-grid{
  display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;
}
.filter-chip{
  min-height:35px;padding:0 13px;border:1px solid #cbd6dc;border-radius:999px;
  background:#fff;color:#3d6177;font-size:13px;font-weight:800;cursor:pointer;
}
.filter-chip:hover,.filter-chip.is-active{
  border-color:#b79a6d;background:#efe5d5;color:#174e71;
}

/* General panels/layout */
.lessons-content{padding:22px 0 30px}
.lessons-content-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 290px;
  gap:19px;
  align-items:start;
}
.lessons-main{display:grid;gap:18px}
.lessons-side{display:grid;gap:16px}
.panel{
  border:1px solid var(--lesson-line);
  border-radius:8px;
  background:rgba(255,255,255,.95);
  box-shadow:0 3px 12px rgba(16,53,83,.045);
  overflow:visible;
}
.section-heading{
  min-height:57px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 15px;
  border-bottom:1px solid rgba(16,53,83,.09);
}
.section-heading>div{display:flex;align-items:center;gap:8px}
.section-heading h2{margin:0;font-size:21px}
.heading-icon{color:#b77b25;font-size:19px}
.editorial-tag{
  padding:4px 9px;border-radius:999px;
  background:#f1ece2;color:#697883;font-size:11px;font-weight:800;
}

/* Featured teacher */
.featured-teacher{padding:17px}
.featured-teacher-card{
  display:grid;
  grid-template-columns:86px minmax(0,1fr) minmax(180px,.55fr);
  gap:18px;align-items:center;
}
.featured-avatar{
  width:78px;height:78px;display:grid;place-items:center;
  border-radius:50%;
  background:linear-gradient(145deg,#e9f1f5,#f8efe0);
  border:1px solid #d8d1c4;color:#155a83;font-size:34px;font-weight:800;
}
.featured-copy h3{margin:0;font-size:25px}
.featured-copy p{margin:7px 0 0;color:#5e7481;line-height:1.6;font-size:14px}
.featured-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.mini-badge{
  padding:3px 8px;border-radius:999px;background:#f1ece4;
  color:#5d707b;font-size:11px;font-weight:800;
}
.featured-source-list{display:grid;gap:7px}
.featured-source-list a{
  padding:8px 10px;border:1px solid #dbe2e5;border-radius:6px;
  color:#1b5d84;text-decoration:none;background:#fff;font-size:12px;font-weight:700;
}
.featured-source-list a:hover{background:#f4f7f8}

/* Source spotlight */
.source-spotlight{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:14px;
}
.source-card{
  min-height:126px;padding:12px;border:1px solid #dbe2e5;border-radius:7px;
  background:#fff;display:flex;flex-direction:column;gap:6px;
}
.source-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.source-type{
  padding:3px 7px;border-radius:999px;font-size:10px;font-weight:900;
  background:#eef3f6;color:#286487;text-transform:uppercase;
}
.source-type.spotify{background:#eaf3ea;color:#33704d}
.source-type.youtube{background:#f6ece8;color:#934b3d}
.source-type.archive{background:#f6f0e5;color:#8a651f}
.source-card strong{font-size:14px;line-height:1.35}
.source-card small{color:#71818a;line-height:1.4}
.source-card a{
  margin-top:auto;color:#1a628b;text-decoration:none;font-weight:800;font-size:12px;
}

/* Teacher cards */
.teacher-list-note{
  margin:14px 14px 0;padding:10px 12px;border:1px solid #e6dccb;border-radius:6px;
  background:#faf6ee;color:#667883;font-size:12px;line-height:1.55;
}
.teachers-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:11px;padding:14px;
}
.teacher-card{
  border:1px solid #dae2e5;border-radius:7px;background:#fff;overflow:hidden;
  display:flex;flex-direction:column;min-height:182px;
}
.teacher-card-main{padding:13px}
.teacher-card-head{display:flex;gap:10px;align-items:flex-start}
.teacher-avatar{
  flex:0 0 42px;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;
  background:#edf3f6;color:#185d86;font-weight:900;font-size:18px;
}
.teacher-card h3{margin:0;font-size:16px;line-height:1.35}
.teacher-card .teacher-en{margin-top:1px;color:#73828a;font:500 11px/1.35 "Segoe UI",Arial,sans-serif;direction:ltr;text-align:right}
.teacher-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.lang-badge,.status-badge,.count-badge{
  padding:2px 6px;border-radius:999px;font-size:10px;font-weight:800;
}
.lang-badge{background:#f1ede6;color:#5e7079}
.count-badge{background:#eaf3f7;color:#1f648c}
.status-badge.verified{background:#e9f2ed;color:#33715d}
.status-badge.probable{background:#f7f0e2;color:#96661d}
.status-badge.ambiguous{background:#f5e9e7;color:#985148}
.status-badge.historical{background:#eeeaf5;color:#6a5686}
.teacher-note{margin:8px 0 0;color:#677983;font-size:11.5px;line-height:1.5}
.teacher-card-actions{
  margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:7px;
  padding:9px 12px;border-top:1px solid #edf0f2;background:#fbfaf6;
}
.teacher-toggle{
  min-height:32px;border:0;border-radius:5px;background:#103f67;color:#fff;
  padding:0 10px;font-size:11px;font-weight:800;cursor:pointer;
}
.teacher-toggle[disabled]{background:#aab4b9;cursor:default}
.teacher-alias{
  color:#7b898f;font-size:10px;
}
.teacher-sources{
  display:none;padding:10px 12px 12px;border-top:1px solid #e5eaec;background:#f8fafb;
}
.teacher-card.is-open .teacher-sources{display:grid;gap:7px}
.teacher-source-item{
  padding:8px;border:1px solid #dce4e7;border-radius:5px;background:#fff;
}
.teacher-source-item a{color:#165d86;text-decoration:none;font-size:12px;font-weight:800}
.teacher-source-item p{margin:4px 0 0;color:#71818a;font-size:10.5px;line-height:1.4}
.empty-state{padding:35px 18px;text-align:center;color:#657984}
.empty-state strong{display:block;color:#244f69}
.text-reset{margin-top:10px;border:0;background:transparent;color:#17638d;font-weight:800;cursor:pointer}
.result-count{color:#6e7f89;font-size:12px}

/* Sidebar */
.major-source-links{display:grid}
.major-source-links a{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 13px;border-bottom:1px solid rgba(16,53,83,.08);
  text-decoration:none;color:#195a80;
}
.major-source-links a:last-child{border-bottom:0}
.major-source-links strong{font-size:13px}
.major-source-links small{color:#839098;font-size:10px;direction:ltr}
.research-panel,.contribute-lessons-panel{
  padding:17px;text-align:center;background:linear-gradient(#fffdf9,#f6efe3);
}
.research-icon,.contribute-lessons-icon{
  width:46px;height:46px;margin:0 auto 7px;display:grid;place-items:center;
  border-radius:50%;background:#eaf2f6;color:#176087;font-size:23px;font-weight:900;
}
.research-panel h2,.contribute-lessons-panel h2{margin:0;font-size:17px}
.research-panel p,.contribute-lessons-panel p{
  margin:7px 0 0;color:#657782;font-size:12px;line-height:1.58;
}
.research-date{font:500 10px/1.4 "Segoe UI",Arial,sans-serif!important;direction:ltr}
.unresolved-list{display:grid;padding:8px 12px 12px}
.unresolved-item{
  padding:8px 0;border-bottom:1px solid rgba(16,53,83,.07);
  color:#5e737e;font-size:11.5px;
}
.unresolved-item:last-child{border-bottom:0}
.unresolved-item strong{color:#32576c}
.contribute-lessons-button{
  display:flex;align-items:center;justify-content:center;
  min-height:40px;margin-top:12px;border-radius:6px;
  background:#103f67;color:#fff;text-decoration:none;font-weight:800;font-size:12px;
}
.tsv-panel{display:grid;grid-template-columns:48px 1fr;gap:10px;padding:14px;align-items:start}
.tsv-badge{
  width:44px;height:44px;display:grid;place-items:center;border-radius:7px;
  background:#ece7dc;color:#6c6253;font:800 12px/1 "Segoe UI",Arial,sans-serif;
}
.tsv-panel strong{font-size:14px}
.tsv-panel p{margin:4px 0 0;color:#6b7e87;font-size:11.5px;line-height:1.5}

/* Closing */
.lessons-closing{
  border-top:1px solid rgba(16,53,83,.12);
  background:
    linear-gradient(90deg,rgba(232,216,189,.96),rgba(248,239,220,.94),rgba(223,205,175,.96)),
    url("/nav-history/assets/img/breslov-historic.jpg") center 67%/cover no-repeat;
}
.lessons-closing-inner{
  min-height:130px;display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding-top:22px;padding-bottom:22px;
}
.closing-he{margin:0;font-size:23px;font-weight:800}
.closing-small{margin:5px 0 0;color:#62747d;font-size:13px}
.closing-contribute{
  min-width:150px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:6px;background:#103f67;color:#fff;text-decoration:none;font-weight:800;
}

@media(max-width:1080px){
  .lessons-content-grid{grid-template-columns:minmax(0,1fr) 250px}
  .teachers-grid{grid-template-columns:repeat(2,1fr)}
  .source-spotlight{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:850px){
  .lessons-hero-inner{grid-template-columns:1fr;min-height:360px}
  .lessons-hero-art{display:none}
  .lessons-content-grid{grid-template-columns:1fr}
  .lessons-side{grid-template-columns:repeat(2,1fr)}
  .major-sources-panel,.unresolved-panel{grid-column:1/-1}
  .featured-teacher-card{grid-template-columns:70px 1fr}
  .featured-source-list{grid-column:1/-1}
}
@media(max-width:700px){
  .catalog-search{height:auto;grid-template-columns:auto 1fr}
  .catalog-search-icon{grid-row:1}
  .catalog-search input{min-height:52px}
  .search-button,.browse-button{min-height:42px;border-radius:0}
  .search-button{grid-column:1/2}
  .browse-button{grid-column:2/3}
  .teachers-grid,.source-spotlight{grid-template-columns:1fr}
  .lessons-side{grid-template-columns:1fr}
  .major-sources-panel,.unresolved-panel{grid-column:auto}
  .lessons-closing-inner{align-items:flex-start;flex-direction:column}
  .closing-contribute{width:100%}
}
