:root {
  --blue: #083c7c;
  --blue-dark: #052b58;
  --ink: #152033;
  --muted: #59667a;
  --paper: #fbfbf6;
  --soft-blue: #e8f1f6;
  --line: #d8e2e8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px clamp(20px, 5vw, 72px);
  background: rgba(251, 251, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 114px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.98rem;
}

.nav a:hover {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-greeting {
  color: var(--blue-dark);
  font-weight: 800;
  white-space: nowrap;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 700;
  white-space: nowrap;
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
  font: inherit;
}

.header-cta,
.button.primary {
  background: var(--blue);
  color: var(--white);
}

button.header-cta,
button.button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.button.secondary {
  color: var(--blue);
  border-color: var(--line);
  background: var(--white);
}

.button.disabled-link {
  color: var(--muted);
  background: var(--paper);
  cursor: not-allowed;
  opacity: 0.72;
}

.button.solution-pending {
  color: #8a6d1d;
  border-color: #ead89a;
  background: #fff8df;
  opacity: 1;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 72px);
  overflow: hidden;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  color: var(--blue);
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  color: var(--blue-dark);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.15;
}

h3 {
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1.25;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--blue-dark);
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 18px;
  align-content: center;
  min-height: 430px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 14px 14px 0 var(--soft-blue);
}

.hero-panel img {
  width: min(260px, 100%);
  margin: 0 auto 8px;
}

.hero-panel div {
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.hero-panel span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-panel strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.18rem;
}

.start-panel {
  align-content: start;
}

.start-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
}

.start-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 2px;
  align-items: start;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.start-option span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
  font-weight: 900;
}

.start-option strong {
  font-size: 1.15rem;
}

.start-option small {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.teacher-hero {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: center;
}

.teacher-photo {
  width: min(360px, 100%);
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(180deg, rgba(8, 60, 124, 0.08), rgba(8, 60, 124, 0.02)),
    url("assets/joseph-profile.jpg") 60% 42% / 118% no-repeat,
    var(--white);
  border: 1px solid var(--line);
  border-radius: 46% 54% 48% 52% / 38% 40% 60% 62%;
  box-shadow: 14px 14px 0 var(--soft-blue);
}

.teacher-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.teacher-card img {
  width: 86px;
  height: auto;
}

.teacher-card p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.teacher-card strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1rem;
  line-height: 1.45;
}

.section {
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  min-height: 230px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card p,
.about p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  background: var(--white);
  border-block: 1px solid var(--line);
}

.steps {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step span {
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 900;
}

.step p {
  margin: 0;
  color: var(--ink);
}

.courses {
  overflow: hidden;
  background:
    linear-gradient(135deg, #083c7c 0%, #083c7c 54%, #052b58 100%);
  color: var(--white);
}

.courses .eyebrow,
.courses h2,
.courses .section-heading p {
  color: var(--white);
}

.course-library {
  display: grid;
  gap: 18px;
  width: 100%;
}

.single-rail-library {
  max-width: 1380px;
  margin-inline: auto;
}

.course-showcase-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.course-showcase-header h3 {
  margin: 4px 0 0;
  color: var(--white);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.course-group-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  color: var(--blue-dark);
  background: var(--soft-blue);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 900;
}

.course-group-label.physics-label {
  color: #243b12;
  background: #dff2d2;
}

.rail-controls {
  display: inline-flex;
  gap: 8px;
}

.rail-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  cursor: pointer;
  font: 900 1.8rem/1 Arial, sans-serif;
}

.rail-controls button:hover {
  background: var(--soft-blue);
}

.course-rail {
  width: 100%;
  padding: 4px 0 6px;
  direction: ltr;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.course-rail::-webkit-scrollbar {
  display: none;
}

.course-rail::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.course-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.48);
  border-radius: 999px;
}

.course-list {
  display: flex;
  gap: 18px;
  width: max-content;
  min-width: 0;
  padding-inline: 0;
}

.production-course-list {
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  direction: rtl;
}

.production-course-list .course-card {
  flex: 1 1 286px;
  max-width: 360px;
}

.course-card {
  flex: 0 0 clamp(286px, 22vw, 328px);
  min-height: 352px;
  display: grid;
  grid-template-rows: 132px auto auto 1fr auto;
  gap: 12px;
  direction: rtl;
  padding: 12px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  scroll-snap-align: start;
  box-shadow: 0 18px 38px rgba(3, 20, 45, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(3, 20, 45, 0.24);
}

.course-card-math {
  border-top: 0;
}

.course-card-physics {
  border-top: 0;
}

.course-card-bundle {
  border-color: rgba(255, 211, 111, 0.72);
  box-shadow: 0 20px 46px rgba(255, 211, 111, 0.18), 0 18px 38px rgba(3, 20, 45, 0.16);
}

.course-card-bundle .course-thumb {
  color: var(--blue-dark);
  background: linear-gradient(135deg, #fff3d2, #e8f1f6);
}

.course-card-bundle .course-badge {
  color: #6a4b00;
  background: #fff3c4;
  border-color: #ead89a;
}

.course-card-book {
  border-color: rgba(8, 60, 124, 0.34);
}

.course-card-book .course-thumb {
  color: var(--blue-dark);
  background: linear-gradient(135deg, #fbfbf6 0%, #e8f1f6 100%);
}

.course-thumb {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: flex-start;
  min-height: 132px;
  padding: 14px;
  overflow: hidden;
  color: var(--blue-dark);
  background: var(--soft-blue);
  border-radius: 7px;
  font-size: 1.35rem;
  font-weight: 900;
}

.course-thumb::after {
  content: "";
  position: absolute;
  inset-inline-end: -18px;
  bottom: -26px;
  width: 130px;
  height: 130px;
  background: url("assets/logo-mark.png") center / contain no-repeat;
  opacity: 0.1;
}

.course-card-physics .course-thumb {
  color: #223f16;
  background: #dff2d2;
}

.course-card-top,
.course-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.course-card-top {
  justify-content: space-between;
}

.course-badge,
.course-status,
.course-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
}

.course-badge {
  color: var(--blue);
  background: var(--soft-blue);
}

.course-card-physics .course-badge {
  color: #223f16;
  background: #dff2d2;
}

.course-status {
  color: #6a4b00;
  background: #fff3c4;
  border-color: #ead89a;
}

.course-card h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.28rem, 1.7vw, 1.65rem);
}

.course-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.course-meta {
  padding-top: 4px;
}

.course-meta span {
  color: var(--muted);
  background: var(--white);
}

.course-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
  font-weight: 800;
}

.book-page {
  background: var(--paper);
}

.book-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  gap: clamp(30px, 6vw, 82px);
  padding: clamp(52px, 8vw, 104px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(232, 241, 246, 0.7), rgba(251, 251, 246, 0.88)),
    var(--paper);
}

.book-hero-copy {
  max-width: 800px;
}

.book-hero-copy h1 {
  margin: 0 0 18px;
  color: var(--blue-dark);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
}

.book-hero-copy p {
  max-width: 690px;
  color: var(--muted);
  font-size: 1.18rem;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.book-cover {
  position: relative;
  min-height: 580px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 44px 34px;
  overflow: hidden;
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 74px rgba(5, 43, 88, 0.16);
}

.book-cover::after {
  content: "";
  position: absolute;
  inset-inline-start: -60px;
  bottom: -86px;
  width: 330px;
  height: 330px;
  background: url("assets/logo-mark.png") center / contain no-repeat;
  opacity: 0.055;
}

.book-cover img {
  width: 180px;
  margin-bottom: 36px;
}

.book-cover span {
  color: var(--muted);
  font-weight: 900;
}

.book-cover strong {
  max-width: 320px;
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  line-height: 0.9;
}

.book-cover p {
  max-width: 330px;
  color: var(--muted);
  font-weight: 700;
}

.book-cover-formula {
  margin-top: auto;
  padding: 18px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.book-strip div {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 28px;
  background: var(--white);
}

.book-strip strong {
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.book-strip span {
  color: var(--muted);
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(42px, 7vw, 84px) clamp(20px, 5vw, 72px);
}

.book-sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-sidebar h2 {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.book-sidebar a {
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 800;
}

.book-sidebar a:hover {
  color: var(--blue-dark);
  background: var(--soft-blue);
}

.book-content {
  display: grid;
  gap: 28px;
}

.book-section {
  padding: clamp(26px, 4vw, 42px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-section h2 {
  margin: 0 0 20px;
  color: var(--blue-dark);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.book-chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.book-chapter-grid article,
.book-example-grid article {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-chapter-grid span {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 900;
}

.book-chapter-grid h3,
.book-example-grid h3 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: 1.35rem;
}

.book-chapter-grid p,
.book-example-grid p,
.sample-chapter > p {
  margin: 0;
  color: var(--muted);
}

.book-math-card {
  display: grid;
  gap: 14px;
  margin: 26px 0;
  padding: 22px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  overflow-x: auto;
}

.book-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.algebra-book-document {
  background: #eceff3;
  --book-page-width: 210mm;
  --book-page-height: 297mm;
  --book-page-pad-top: 15mm;
  --book-page-pad-x: 15mm;
  --book-page-pad-bottom: 20mm;
  --book-page-footer-bottom: 6mm;
  --book-page-gap: 10mm;
}

.book-document {
  display: grid;
  gap: var(--book-page-gap);
  width: var(--book-page-width);
  margin: 0 auto;
  padding: 12mm 0 24mm;
  counter-reset: book-page;
}

.book-doc-page {
  position: relative;
  counter-increment: book-page;
  width: var(--book-page-width);
  min-height: 0;
  height: var(--book-page-height);
  margin-inline: auto;
  padding: var(--book-page-pad-top) var(--book-page-pad-x) var(--book-page-pad-bottom);
  overflow: visible;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(21, 32, 51, 0.1);
}

.book-doc-page::before {
  content: counter(book-page) " · © 2026 האקדמיה יוסף בוחניק. כל הזכויות שמורות. אין להעתיק, להפיץ או לפרסם ללא אישור.";
  position: absolute;
  z-index: 2;
  inset-inline: var(--book-page-pad-x);
  bottom: var(--book-page-footer-bottom);
  padding-top: 3mm;
  border-top: 1px solid rgba(216, 226, 232, 0.85);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.book-doc-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-inline-start: 6mm;
  bottom: 18mm;
  width: 72mm;
  height: 72mm;
  background: url("assets/logo-mark.png") center / contain no-repeat;
  opacity: 0.035;
  pointer-events: none;
}

.book-doc-page[data-layout-overflow="true"] {
  outline: 3px solid #c2410c;
  outline-offset: 4px;
}

.book-draft-only,
.book-toc-draft-link {
  display: none !important;
}

.book-doc-page > * {
  position: relative;
  z-index: 1;
}

.book-doc-cover {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.book-doc-cover img {
  width: min(360px, 70%);
}

.book-doc-kicker {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.book-doc-cover h1,
.book-doc-page h2 {
  margin: 0;
  color: var(--blue-dark);
  line-height: 0.95;
}

.book-doc-cover h1 {
  font-size: clamp(4rem, 10vw, 8rem);
}

.book-doc-page h2 {
  margin-bottom: 16px;
  font-size: 2.45rem;
}

.book-doc-page h3 {
  margin: 18px 0 8px;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.book-doc-page h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.05rem;
}

.book-doc-page p,
.book-doc-page li {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

.book-doc-subtitle {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.28rem;
  font-weight: 800;
}

.book-doc-author {
  margin-top: 48px;
  color: var(--blue);
  font-weight: 900;
}

.book-doc-cover-equation,
.book-doc-math,
.book-doc-warning {
  margin: 18px 0;
  padding: 18px 22px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  text-align: center;
}

.book-doc-math math[display="block"],
.book-doc-warning math[display="block"],
.book-doc-cover-equation math[display="block"] {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  line-height: 1.55;
  text-align: center;
  font-size: 1.45rem;
}

.book-doc-math math[display="block"] + math[display="block"],
.book-doc-warning math[display="block"] + math[display="block"],
.book-doc-cover-equation math[display="block"] + math[display="block"] {
  margin-top: 12px;
}

.book-doc-math math[display="block"]:has(mfrac),
.book-doc-warning math[display="block"]:has(mfrac) {
  margin-block: 10px;
}

.book-doc-warning {
  background: #fff3c4;
  border-color: #ead89a;
}

.book-doc-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 900;
}

.book-doc-page-head a {
  color: var(--blue);
}

.book-doc-rule,
.book-doc-final {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--blue);
  border-radius: 8px;
  color: var(--ink);
}

.book-doc-final {
  border-inline-start-color: #ead89a;
}

.book-inline-strong {
  color: var(--blue-dark);
  font-weight: 900;
}

.book-doc-toc {
  display: grid;
  gap: 10px;
}

.book-doc-toc-section {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.book-doc-toc-section:first-child {
  margin-top: 0;
}

.book-doc-toc-section h3 {
  margin: 0 0 2px;
  color: var(--blue-dark);
  font-size: 1.18rem;
}

.book-doc-toc a {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-doc-toc strong {
  color: var(--blue-dark);
  font-size: 1rem;
}

.book-doc-toc span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.book-topic-map {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.book-topic-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  break-inside: avoid;
}

.book-topic-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.book-topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.book-topic-status {
  width: max-content;
  padding: 5px 10px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.book-doc-practice {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0 22px 0 0;
}

.book-practice-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.book-practice-chapter {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  break-inside: avoid;
}

.book-practice-chapter > h3 {
  margin-top: 0;
}

.book-practice-tier {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.book-practice-tier h4 {
  margin: 0 0 6px;
  color: var(--blue-dark);
}

.book-practice-tier ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0 22px 0 0;
}

.book-practice-focus {
  margin-top: 8px;
  padding: 10px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-practice-focus h4 {
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.book-practice-focus ol {
  columns: 2;
  column-gap: 34px;
  margin: 0;
  padding: 0 22px 0 0;
}

.book-practice-focus li {
  break-inside: avoid;
  margin-bottom: 6px;
}

.book-practice-mini-test {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.book-practice-mini-test h4 {
  margin: 0 0 6px;
  color: var(--blue-dark);
}

.book-practice-mini-test ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0 22px 0 0;
}

.book-answer-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.book-answer-chapter {
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  break-inside: avoid;
}

.book-answer-chapter > h3 {
  margin-top: 0;
  color: var(--blue-dark);
}

.book-answer-tier {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.book-answer-tier h4 {
  margin: 0 0 6px;
  color: var(--muted);
}

.book-answer-tier ol {
  display: grid;
  gap: 3px;
  counter-reset: answer-item;
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-answer-tier li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  counter-increment: answer-item;
  direction: rtl;
  unicode-bidi: isolate;
}

.book-answer-tier li::before {
  content: counter(answer-item) ".";
  direction: ltr;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.book-doc-page:has(.book-practice-bank) h2,
.book-doc-page:has(.book-answer-bank) h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.book-doc-page:has(.book-practice-bank) > p,
.book-doc-page:has(.book-answer-bank) > p {
  font-size: 1rem;
  line-height: 1.55;
}

.book-practice-chapter > h3,
.book-answer-chapter > h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.book-practice-chapter li,
.book-answer-chapter li {
  font-size: 0.86rem;
  line-height: 1.32;
}

.book-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.book-doc-grid article {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-doc-graph {
  margin: 28px 0;
  padding: 24px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-doc-graph svg {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  direction: ltr;
}

.book-doc-graph .graph-grid {
  stroke: rgba(89, 102, 122, 0.22);
  stroke-width: 1;
}

.book-doc-graph .graph-axis {
  stroke: #59667a;
  stroke-width: 2.4;
}

.book-doc-graph .graph-curve,
.book-doc-graph .graph-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.book-doc-graph .graph-point {
  fill: var(--blue);
  stroke: var(--paper);
  stroke-width: 4;
}

.book-doc-graph text {
  fill: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .book-document {
    width: 100%;
    padding-inline: 10px;
  }

  .book-doc-page {
    width: 100%;
    height: auto;
    min-height: 0;
    padding-inline: 22px;
  }

  .book-practice-bank,
  .book-answer-bank,
  .book-doc-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body.algebra-book-document {
    background: var(--paper);
  }

  .book-document {
    width: var(--book-page-width);
    padding: 0;
    gap: 0;
  }

  .book-doc-page {
    width: var(--book-page-width);
    min-height: 0;
    height: var(--book-page-height);
    margin: 0;
    padding: var(--book-page-pad-top) var(--book-page-pad-x) var(--book-page-pad-bottom);
    break-after: page;
    page-break-after: always;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .book-topic-card,
  .book-practice-chapter,
  .book-answer-chapter,
  .book-doc-rule,
  .book-doc-final,
  .book-doc-math,
  .book-doc-warning {
    page-break-inside: avoid;
  }
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
}

.about-copy {
  max-width: 760px;
}

.about .button {
  width: fit-content;
  margin-top: 10px;
}

.about-teaser {
  background: var(--white);
  border-block: 1px solid var(--line);
}

.about-page {
  background: var(--paper);
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(46px, 8vw, 94px) clamp(20px, 5vw, 72px);
}

.about-hero-copy {
  max-width: 780px;
}

.about-hero-copy p {
  color: var(--muted);
  font-size: clamp(1.1rem, 1.5vw, 1.28rem);
}

.about-portrait .teacher-photo {
  width: min(420px, 100%);
}

.about-story {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 60px);
  background: var(--white);
  border-block: 1px solid var(--line);
}

.story-lead {
  position: sticky;
  top: 110px;
  align-self: start;
}

.story-body {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.story-body p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.06rem, 1.4vw, 1.22rem);
}

.about-principles {
  padding-top: clamp(50px, 7vw, 84px);
}

.course-page {
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 72px);
}

.course-product-page {
  display: grid;
  gap: 28px;
}

.course-learning-page {
  min-height: calc(100vh - 78px);
  background: var(--paper);
}

.learning-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: calc(100vh - 78px);
}

.learning-sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  height: calc(100vh - 78px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 22px;
  background: var(--white);
  border-inline-start: 1px solid var(--line);
  overflow-y: auto;
}

.learning-sidebar .panel-heading {
  align-items: start;
}

.learning-progress {
  height: 10px;
}

.learning-progress-label {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.learning-main {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 42px);
}

.lesson-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.lesson-header h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.4vw, 4.4rem);
}

.lesson-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lesson-video-card {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 12px 12px 0 var(--soft-blue);
}

.lesson-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lesson-support-card {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lesson-support-card h2 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.lesson-support-card p {
  color: var(--muted);
}

.lesson-resource-list {
  display: grid;
  gap: 10px;
}

.lesson-resource-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--blue-dark);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.course-watch-page {
  min-height: calc(100vh - 78px);
  background:
    linear-gradient(180deg, rgba(8, 60, 124, 0.08) 0, rgba(251, 251, 246, 0) 340px),
    var(--paper);
}

.cinema-shell {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 36px) clamp(18px, 4vw, 58px) 24px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(8, 60, 124, 0.12), rgba(44, 142, 139, 0.1) 44%, rgba(255, 211, 111, 0.16)),
    #f7faf8;
  border-bottom: 1px solid rgba(8, 60, 124, 0.12);
}

.cinema-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cinema-topbar .back-to-cover {
  color: var(--blue);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(8, 60, 124, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
}

.cinema-progress {
  display: grid;
  grid-template-columns: auto minmax(120px, 190px) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.cinema-progress .progress {
  height: 8px;
  background: #d9e6ee;
}

.cinema-progress .progress span {
  background: linear-gradient(90deg, #083c7c, #2c8e8b, #ffd36f);
}

.cinema-player {
  width: min(940px, 100%);
  margin-inline: auto;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 211, 111, 0.8), rgba(44, 142, 139, 0.75), rgba(8, 60, 124, 0.95));
  border: 1px solid rgba(8, 43, 87, 0.2);
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(8, 43, 87, 0.2);
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
  width: min(1320px, 100%);
  margin-inline: auto;
}

.watch-main {
  display: grid;
  gap: 14px;
}

.cinema-player .course-video-player {
  border: 0;
  border-radius: 6px;
}

.lesson-video-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: min(940px, 100%);
  margin-inline: auto;
}

.video-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.video-nav-button:hover:not(:disabled) {
  background: #f2f8f4;
  border-color: rgba(8, 60, 124, 0.28);
  transform: translateY(-1px);
}

.video-nav-button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), #0c5f83);
  border-color: rgba(8, 60, 124, 0.82);
}

.video-nav-button.review {
  min-width: 132px;
}

.video-nav-button.review.active {
  color: #2a1b00;
  background: #ffd36f;
  border-color: #ffd36f;
}

.video-nav-button.review.understood {
  color: #0f3b24;
  background: #9de8b2;
  border-color: #9de8b2;
  animation: understood-pop 0.82s cubic-bezier(0.2, 1.45, 0.4, 1) both;
  box-shadow: 0 0 0 0 rgba(157, 232, 178, 0.55);
}

.video-nav-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@keyframes understood-pop {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(157, 232, 178, 0.55);
  }

  24% {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 0 0 9px rgba(157, 232, 178, 0.24);
  }

  48% {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 0 15px rgba(157, 232, 178, 0.12);
  }

  72% {
    transform: translateY(-2px) scale(1.03);
  }

  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(157, 232, 178, 0);
  }
}

.cinema-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  width: min(940px, 100%);
  margin-inline: auto;
}

.cinema-meta .eyebrow {
  color: var(--muted);
}

.cinema-meta h1 {
  margin-bottom: 0;
  color: var(--blue-dark);
  font-size: clamp(1.55rem, 2.8vw, 2.8rem);
}

.cinema-meta .button.secondary {
  color: var(--blue);
  border-color: var(--line);
  background: var(--white);
}

.cinema-meta .lesson-header-actions {
  align-items: center;
}

.cinema-meta .lesson-header-actions .button {
  min-height: 42px;
}

.course-clean-content {
  display: grid;
  gap: 18px;
  padding: 22px clamp(18px, 4vw, 58px) clamp(42px, 6vw, 72px);
  background: var(--paper);
}

.video-playlist {
  max-height: min(66vh, 590px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(8, 60, 124, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 43, 87, 0.1);
}

.playlist-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  color: var(--blue-dark);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 246, 0.92));
  border-bottom: 1px solid rgba(8, 60, 124, 0.12);
  font-weight: 900;
}

.playlist-heading strong {
  color: #2c8e8b;
}

.playlist-list {
  display: grid;
  gap: 2px;
  padding: 8px;
}

.playlist-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 8px;
}

.playlist-item:has(.playlist-lesson-button:hover),
.playlist-item.active {
  background: linear-gradient(135deg, rgba(232, 241, 246, 0.9), rgba(255, 248, 225, 0.88));
  border-color: rgba(8, 60, 124, 0.14);
}

.playlist-item.active {
  box-shadow: inset 4px 0 0 #ffd36f, inset 0 0 0 1px rgba(8, 60, 124, 0.06);
}

.playlist-item.needs-review {
  background: rgba(255, 211, 111, 0.22);
  border-color: rgba(255, 211, 111, 0.34);
}

.lesson-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--white);
  background: #2c8e8b;
  border: 2px solid #2c8e8b;
  border-radius: 50%;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 1000;
  cursor: pointer;
}

.lesson-check:empty {
  background: transparent;
  border-color: #9fb4c6;
}

.lesson-check:hover:not(:disabled) {
  border-color: #2c8e8b;
  box-shadow: 0 0 0 4px rgba(44, 142, 139, 0.12);
}

.playlist-item.needs-review .lesson-check:empty {
  border-color: rgba(255, 211, 111, 0.9);
}

.lesson-check:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.playlist-lesson-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: start;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.playlist-lesson-button:disabled {
  cursor: not-allowed;
}

.playlist-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--blue);
  background: linear-gradient(135deg, #eef5f8, #fff3d2);
  border-radius: 8px;
  font-weight: 900;
}

.playlist-item strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1rem;
  line-height: 1.25;
}

.playlist-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.playlist-item em {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  color: var(--muted);
  background: #eef5f8;
  border-radius: 8px;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.playlist-item.active em {
  color: var(--white);
  background: #2c8e8b;
}

.playlist-item.needs-review em {
  color: #2a1b00;
  background: #ffd36f;
}

.lesson-strip,
.lesson-assist {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.clean-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.clean-section-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.clean-section-heading span {
  color: var(--muted);
  font-weight: 800;
}

.lesson-rail {
  direction: ltr;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.compact-lesson {
  flex: 0 0 clamp(190px, 20vw, 250px);
  direction: rtl;
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  scroll-snap-align: start;
}

.compact-lesson span {
  color: var(--muted);
  font-weight: 900;
}

.compact-lesson strong {
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.compact-lesson.active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.compact-lesson.active span,
.compact-lesson.active strong {
  color: var(--white);
}

.compact-lesson.done {
  border-color: rgba(45, 130, 63, 0.28);
}

.lesson-drawer {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(8, 60, 124, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(8, 43, 87, 0.07);
}

.lesson-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 243, 210, 0.38));
}

.lesson-drawer summary::-webkit-details-marker {
  display: none;
}

.lesson-drawer summary span {
  color: var(--blue-dark);
  font-size: 1.18rem;
  font-weight: 900;
}

.lesson-drawer summary strong {
  color: var(--muted);
  font-size: 0.95rem;
}

.assist-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  overflow-x: auto;
}

.assist-tabs button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  color: var(--blue);
  background: rgba(232, 241, 246, 0.72);
  border: 1px solid rgba(8, 60, 124, 0.12);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
}

.assist-tabs button.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), #2c8e8b);
  border-color: transparent;
}

.assist-panel {
  padding: 0 18px 18px;
}

.assist-panel article {
  min-height: 150px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(251, 251, 246, 0.96), rgba(232, 241, 246, 0.72));
  border: 1px solid rgba(8, 60, 124, 0.12);
  border-radius: 8px;
}

.assist-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.lesson-help-note {
  margin-top: 12px !important;
  padding: 12px 14px;
  color: var(--blue-dark) !important;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.assist-panel .eyebrow {
  margin-bottom: 8px;
  color: var(--blue);
}

.assist-panel a {
  color: var(--blue-dark);
  font-weight: 900;
}

.assist-panel h2 {
  margin-bottom: 10px;
  font-size: clamp(1.24rem, 2vw, 1.65rem);
}

.mini-practice {
  display: grid;
  gap: 14px;
}

.mini-practice fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-practice legend {
  padding: 0 4px;
  color: var(--blue-dark);
  font-weight: 900;
}

.mini-practice label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.practice-feedback {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.practice-feedback[data-state="success"] {
  color: #245d2a;
  background: #dff2d2;
  border-color: rgba(36, 93, 42, 0.24);
}

.practice-feedback[data-state="review"] {
  color: #8a5c0a;
  background: #fff3d2;
  border-color: rgba(138, 92, 10, 0.24);
}

.practice-feedback[data-state="pending"] {
  color: var(--blue-dark);
  background: var(--soft-blue);
}

.lesson-file-list {
  display: grid;
  gap: 10px;
}

.lesson-file-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
  padding-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.course-command {
  grid-template-columns: 1fr;
  min-height: calc(100vh - 108px);
  align-items: start;
  padding-bottom: clamp(24px, 4vw, 42px);
}

.course-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.56fr);
  gap: 18px;
  align-items: end;
}

.course-hero-copy {
  max-width: 760px;
}

.course-hero-copy h1 {
  margin-bottom: 16px;
}

.course-hero-copy p {
  color: var(--muted);
  font-size: 1.12rem;
}

.course-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.compact-stats div {
  min-height: 82px;
}

.course-stats div {
  min-height: 92px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-stats strong {
  display: block;
  color: var(--blue);
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1;
}

.course-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.course-player-preview {
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 12px 12px 0 var(--soft-blue);
}

.course-studio {
  min-height: 560px;
}

.course-video-placeholder {
  display: grid;
  align-content: end;
  min-height: 290px;
  padding: 22px;
  color: var(--white);
  background:
    linear-gradient(140deg, rgba(8, 60, 124, 0.96), rgba(5, 43, 88, 0.76)),
    var(--blue);
  border-radius: 8px;
}

.course-video-stage {
  min-height: 410px;
  background:
    linear-gradient(180deg, rgba(5, 43, 88, 0.14), rgba(5, 43, 88, 0.86)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    var(--blue-dark);
  background-size: auto, 34px 34px, 34px 34px, auto;
}

.course-video-placeholder span {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 4px 10px;
  color: var(--blue-dark);
  background: var(--white);
  border-radius: 8px;
  font-weight: 900;
}

.course-video-placeholder strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.12;
}

.course-video-placeholder small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.course-player-preview p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.course-watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  gap: 18px;
  align-items: stretch;
}

.course-main-video {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 12px 12px 0 var(--soft-blue);
}

.video-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.video-label-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.video-label-row strong {
  color: var(--blue-dark);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

.course-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--blue-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-watch-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.watch-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.watch-card h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.watch-card p {
  color: var(--muted);
}

.watch-next-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 22px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.progress-card {
  display: grid;
  gap: 12px;
}

.progress-card strong {
  color: var(--blue-dark);
}

.course-player-meta {
  display: grid;
  gap: 12px;
}

.course-player-meta strong {
  color: var(--blue-dark);
}

.course-tabs {
  position: sticky;
  top: 78px;
  z-index: 8;
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(251, 251, 246, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  backdrop-filter: blur(12px);
}

.course-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.course-tabs a:hover {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.course-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  gap: 18px;
  align-items: start;
}

.course-focus-panel,
.course-progress-panel,
.course-practice-lab,
.course-tests-panel,
.course-bagrut-panel {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.learning-plan {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-plan li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.learning-plan span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
  font-weight: 900;
}

.learning-plan strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.1rem;
}

.learning-plan p {
  margin: 3px 0 0;
  color: var(--muted);
}

.skill-map {
  display: grid;
  gap: 10px;
}

.skill-map div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skill-map span {
  color: var(--ink);
  font-weight: 800;
}

.skill-map strong {
  color: var(--blue);
  font-size: 0.92rem;
  white-space: nowrap;
}

.course-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 18px;
  align-items: start;
  padding-top: 28px;
}

.course-lessons-panel,
.course-side-panel .dashboard-card {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-lesson-list,
.course-side-panel {
  display: grid;
  gap: 12px;
}

.course-lesson {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.advanced-lesson-list .course-lesson {
  grid-template-columns: 56px minmax(0, 1fr) auto;
}

.course-lesson span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 8px;
  font-weight: 900;
}

.course-lesson strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.course-lesson p {
  margin: 2px 0 0;
  color: var(--muted);
}

.course-lesson small {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.course-lesson.done {
  border-color: rgba(45, 130, 63, 0.28);
}

.course-lesson.done span {
  color: #245d2a;
  background: #dff2d2;
}

.course-lesson.active {
  border-color: rgba(8, 60, 124, 0.5);
  box-shadow: inset 0 0 0 1px rgba(8, 60, 124, 0.3);
}

.mentor-card {
  background:
    linear-gradient(135deg, rgba(232, 241, 246, 0.74), rgba(255, 255, 255, 0.96)),
    var(--white);
}

.practice-grid,
.assessment-list,
.linked-papers {
  display: grid;
  gap: 12px;
}

.practice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.practice-card,
.assessment-list article,
.linked-papers a {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.practice-card span,
.assessment-list span,
.linked-papers span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 900;
}

.practice-card h3 {
  margin: 12px 0 8px;
}

.practice-card p,
.assessment-list p,
.linked-papers small {
  color: var(--muted);
}

.practice-card strong {
  display: block;
  color: var(--blue-dark);
}

.assessment-list article,
.linked-papers a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 16px;
  align-items: center;
}

.assessment-list strong,
.linked-papers strong {
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.assessment-list p,
.linked-papers small {
  grid-column: 2;
  margin: 0;
}

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(8, 60, 124, 0.08), rgba(232, 241, 246, 0.42)),
    var(--paper);
}

.auth-shell {
  display: grid;
  align-items: start;
  justify-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(24px, 5vw, 64px) clamp(20px, 5vw, 72px);
}

.auth-card {
  width: min(560px, 100%);
  padding: clamp(26px, 5vw, 46px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 12px 12px 0 var(--soft-blue);
}

.auth-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.auth-intro,
.auth-note {
  color: var(--muted);
}

.auth-text-link {
  display: inline-flex;
  margin: 0 0 16px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.auth-switch label {
  cursor: pointer;
}

.auth-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-switch span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.auth-switch input:checked + span {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.auth-form {
  display: grid;
  gap: 10px;
  margin: 26px 0 18px;
}

.auth-form label {
  color: var(--blue-dark);
  font-weight: 800;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.auth-form select {
  appearance: none;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: 3px solid rgba(8, 60, 124, 0.16);
  border-color: var(--blue);
}

.signup-fields {
  display: grid;
  gap: 10px;
}

.signup-fields[hidden] {
  display: none;
}

.student-only[hidden] {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-form .button {
  margin-top: 10px;
  cursor: pointer;
}

.dashboard {
  padding: clamp(42px, 7vw, 84px) clamp(20px, 5vw, 72px);
}

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.dashboard-hero div {
  max-width: 760px;
}

.dashboard-hero h1 {
  margin-bottom: 14px;
}

.dashboard-hero p {
  color: var(--muted);
  font-size: 1.12rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.student-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.dashboard-card {
  min-height: 240px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-dashboard-panel {
  grid-column: 1 / -1;
  min-height: 0;
  overflow: hidden;
}

.dashboard-rail-controls button {
  color: var(--blue);
  border-color: var(--line);
}

.dashboard-course-rail {
  margin-inline: -26px;
  padding-inline: 26px;
}

.dashboard-course-card {
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.dashboard-course-card:hover {
  border-color: rgba(8, 60, 124, 0.42);
  transform: translateY(-2px);
}

.empty-dashboard-course {
  max-width: 360px;
}

.empty-dashboard-course .course-meta {
  align-items: start;
}

.course-progress {
  height: 8px;
  margin: 0;
}

.dashboard-card h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.2rem);
}

.dashboard-card p,
.dashboard-card small {
  color: var(--muted);
}

.main-panel,
.side-panel {
  min-height: 0;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.lesson-list,
.file-list,
.task-list {
  display: grid;
  gap: 12px;
}

.lesson-item,
.file-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lesson-item:hover,
.file-item:hover {
  border-color: rgba(8, 60, 124, 0.42);
}

.lesson-date,
.file-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 8px;
  font-weight: 900;
}

.lesson-item strong,
.file-item strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.lesson-item p,
.file-item p {
  margin: 2px 0 0;
}

.task-list {
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.task-list li {
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-form {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.task-form input,
.task-form select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.task-form input:focus,
.task-form select:focus {
  outline: 3px solid rgba(8, 60, 124, 0.16);
  border-color: var(--blue);
}

.task-suggestions {
  display: grid;
  gap: 6px;
}

.task-suggestion {
  width: 100%;
  padding: 10px 12px;
  color: var(--blue-dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-align: right;
  cursor: pointer;
}

.task-suggestion small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

.task-suggestion:hover {
  border-color: rgba(8, 60, 124, 0.42);
}

.todo-list {
  display: grid;
  gap: 10px;
}

.todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.todo-item label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.todo-item input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--blue);
}

.todo-item strong,
.todo-item small {
  display: block;
}

.todo-item strong {
  color: var(--blue-dark);
  line-height: 1.35;
}

.todo-item small {
  margin-top: 2px;
  color: var(--muted);
}

.todo-item.done {
  opacity: 0.72;
}

.todo-item.done strong {
  text-decoration: line-through;
}

.task-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.task-delete:hover {
  color: var(--blue);
  border-color: rgba(8, 60, 124, 0.42);
}

.mini-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mini-form label {
  color: var(--blue-dark);
  font-weight: 800;
}

.mini-form input,
.mini-form select,
.mini-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.mini-form textarea {
  resize: vertical;
}

.mini-form input[type="file"] {
  padding: 12px;
  background: var(--white);
}

.form-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-button {
  min-height: 38px;
  padding: 8px 14px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 999px;
  font-weight: 800;
}

.journal-card {
  grid-column: 1 / -1;
}

.journal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.journal-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(220px, 1.4fr);
  gap: 12px;
  margin-bottom: 18px;
}

.journal-controls label {
  display: grid;
  gap: 6px;
  color: var(--blue-dark);
  font-weight: 800;
}

.journal-controls select,
.journal-controls input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.wide-control {
  min-width: 0;
}

.filter-chip {
  min-height: 36px;
  padding: 6px 14px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.exam-journal {
  display: grid;
  gap: 12px;
}

.exam-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 92px 130px minmax(220px, 0.9fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.exam-main strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.04rem;
}

.exam-main p {
  margin: 2px 0 0;
  color: var(--muted);
}

.exam-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.exam-state span,
.exam-state small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 999px;
  font-weight: 900;
}

.exam-state small {
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
}

.check-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-dark);
  font-weight: 800;
}

.check-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.exam-row select,
.exam-row textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.exam-row textarea {
  resize: vertical;
}

.exam-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.bank-page {
  padding: clamp(42px, 7vw, 84px) clamp(20px, 5vw, 72px);
}

.bank-hero {
  max-width: 900px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.bank-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 4.8vw, 4.5rem);
}

.bank-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

.bank-shell {
  display: grid;
  gap: 18px;
}

.bank-tabs,
.bank-track-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.math-questionnaire-tabs {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  padding-top: 4px;
  align-items: center;
}

.math-questionnaire-tabs.is-hidden {
  display: none;
}

.bank-tabs {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.bank-tabs button,
.bank-track-tabs button,
.math-questionnaire-tabs button {
  min-width: 84px;
  min-height: 42px;
  padding: 8px 16px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bank-tabs button.active,
.bank-track-tabs button.active,
.math-questionnaire-tabs button.active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.bank-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: end;
}

.bank-filters {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(180px, 1fr);
  gap: 10px;
}

.bank-tools {
  display: grid;
  gap: 10px;
}

.formula-link {
  justify-self: end;
}

.bank-filters label {
  display: grid;
  gap: 6px;
  color: var(--blue-dark);
  font-weight: 800;
}

.bank-filters select,
.bank-filters input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.bank-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
}

.topic-preview {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-preview h2 {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 1.2rem;
}

.topic-preview p:last-child {
  margin: 0;
  color: var(--muted);
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topic-chips button {
  min-height: 38px;
  padding: 7px 12px;
  color: var(--blue);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.topic-chips button.active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.topic-chips .clear-topics {
  color: var(--muted);
  background: var(--white);
}

.bank-heading h2 {
  margin-bottom: 0;
}

.bank-message {
  margin: 0;
  padding: 12px 14px;
  color: var(--blue-dark);
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.bank-list {
  display: grid;
  gap: 18px;
}

.bank-year {
  display: grid;
  gap: 10px;
}

.bank-year h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.bank-paper {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bank-paper-main {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.season-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 136px;
  min-height: 42px;
  padding: 6px 12px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 8px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.season-main {
  white-space: nowrap;
}

.season-note {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  white-space: nowrap;
  opacity: 0.84;
}

.bank-paper-main strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.bank-paper-main p {
  grid-column: 2;
  width: 100%;
  margin: -6px 0 0;
  color: var(--muted);
}

.bank-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.solution-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.solution-review-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 8px;
  color: #8a6d1d;
  border: 1px solid #ead89a;
  border-radius: 999px;
  background: #fff8df;
  font-size: 0.82rem;
  font-weight: 900;
}

.solution-approved-badge {
  color: #0b5d3b;
  border-color: #b8e2cc;
  background: #eaf8f0;
}

.solution-workdoc-badge {
  color: #823b14;
  border-color: #f1c9ad;
  background: #fff0e6;
}

.solution-draft-badge {
  color: #475467;
  border-color: #d0dbe7;
  background: #f3f6fa;
}

.video-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 23, 48, 0.52);
}

.video-preview-modal {
  position: relative;
  width: min(1180px, 100%);
  height: min(800px, calc(100vh - 32px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(10, 32, 70, 0.28);
}

.video-close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  width: 38px;
  height: 38px;
  color: var(--blue);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
}

.video-preview-heading {
  padding-inline-start: 50px;
}

.video-preview-heading h2 {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.05;
}

.video-preview-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.video-preview-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  min-height: 0;
}

.video-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 100%;
  overflow-y: auto;
  padding-inline-end: 4px;
}

.video-option {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  text-align: start;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.video-option.active {
  color: var(--blue-dark);
  background: var(--soft-blue);
  border-color: var(--blue);
}

.video-option span {
  color: var(--blue);
  font-weight: 900;
}

.video-option strong {
  color: inherit;
}

.video-option small {
  color: var(--muted);
  font-weight: 700;
}

.video-player-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 0;
  height: 100%;
  padding: clamp(14px, 2vw, 22px);
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: 8px;
}

.video-player-preview span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 6px 18px;
  color: var(--blue-dark);
  background: var(--white);
  border-radius: 999px;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(8, 37, 74, 0.18);
}

.video-player-preview strong {
  margin-top: 14px;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
}

.local-video-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-top: 12px;
  overflow: hidden;
  background: var(--blue-dark);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.local-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player-preview p {
  max-width: 560px;
  display: none;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.course-preview {
  position: relative;
  overflow: hidden;
}

.course-preview-page {
  background: var(--paper);
}

.course-preview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(52px, 8vw, 98px) clamp(20px, 5vw, 72px);
  color: var(--white);
  background: linear-gradient(135deg, #082b57 0%, #07182f 100%);
}

.course-preview-copy {
  max-width: 760px;
}

.course-preview-copy .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.course-preview-copy h1 {
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.95;
}

.course-preview-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.2rem;
  line-height: 1.8;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.preview-access-note {
  margin-top: 14px;
  font-size: 0.95rem;
}

.course-preview-player {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.preview-video-frame {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 36px;
  background: #fbfbf6;
}

.preview-video-frame img {
  width: min(280px, 72%);
  opacity: 0.96;
}

.preview-video-frame span {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 14px;
  color: var(--blue);
  background: #e8f1f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
}

.preview-player-meta {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.preview-player-meta strong {
  font-size: 1.15rem;
}

.preview-player-meta small {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px clamp(20px, 5vw, 72px) 0;
  margin-top: -44px;
}

.preview-stats article {
  display: grid;
  gap: 4px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 43, 87, 0.1);
}

.preview-stats strong {
  color: var(--blue);
  font-size: 2.4rem;
  line-height: 1;
}

.preview-stats span {
  color: var(--muted);
  font-weight: 900;
}

.preview-section {
  padding: clamp(44px, 7vw, 80px) clamp(20px, 5vw, 72px);
}

.preview-bundles-section {
  background: var(--paper);
}

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bundle-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 43, 87, 0.08);
}

.bundle-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.35rem;
}

.bundle-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.bundle-price {
  display: grid;
  gap: 4px;
  padding-block: 12px;
  border-block: 1px solid var(--line);
}

.bundle-price span {
  color: var(--muted);
  font-weight: 900;
  text-decoration: line-through;
}

.bundle-price strong {
  color: var(--blue-dark);
  font-size: 2rem;
  line-height: 1;
}

.bundle-price em {
  color: #0f6b3d;
  font-style: normal;
  font-weight: 900;
}

.preview-purchase-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-top: clamp(48px, 7vw, 72px);
  padding-bottom: clamp(48px, 7vw, 72px);
  background: #eef5f8;
}

.purchase-copy {
  max-width: 720px;
}

.purchase-copy h2 {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  line-height: 1;
}

.purchase-copy p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.purchase-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.subscription-term-picker {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(8, 60, 124, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(8, 43, 87, 0.08);
}

.term-picker-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.term-picker-heading strong {
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.term-picker-heading span {
  color: var(--muted);
  font-weight: 900;
}

.term-options,
.cart-term-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.term-options button,
.cart-term-picker button {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 13px;
  color: var(--blue-dark);
  text-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.term-options button.active,
.cart-term-picker button.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), #2c8e8b);
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(8, 60, 124, 0.18);
}

.term-options button span,
.cart-term-picker button span {
  font-size: 1.08rem;
  font-weight: 1000;
}

.term-options button strong,
.cart-term-picker button strong {
  color: #0f6b3d;
  font-size: 0.9rem;
}

.term-options button.active strong,
.cart-term-picker button.active strong,
.term-options button.active small {
  color: rgba(255, 255, 255, 0.86);
}

.term-options button small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.purchase-plan {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 15px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 43, 87, 0.1);
}

.purchase-plan.featured {
  border: 2px solid var(--blue);
  box-shadow: 0 24px 58px rgba(8, 60, 124, 0.18);
}

.plan-ribbon {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  padding: 5px 10px;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 1000;
}

.purchase-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(8, 43, 87, 0.14);
}

.purchase-label {
  justify-self: start;
  padding: 6px 12px;
  color: var(--blue);
  background: #e8f1f6;
  border-radius: 999px;
  font-weight: 900;
}

.purchase-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.55rem;
}

.purchase-plan h3 {
  margin: 0;
  max-width: 82%;
  color: var(--blue);
  font-size: 1.45rem;
  line-height: 1.16;
}

.purchase-plan p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.purchase-price {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}

.purchase-price strong {
  color: var(--blue-dark);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.purchase-price small {
  color: var(--muted);
  font-weight: 900;
}

.purchase-price em {
  color: #0f6b3d;
  font-style: normal;
  font-weight: 1000;
}

.purchase-card ul,
.purchase-plan ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.purchase-card li,
.purchase-plan li {
  position: relative;
  padding-inline-start: 28px;
  color: var(--ink);
  font-weight: 800;
}

.purchase-card li::before,
.purchase-plan li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  color: var(--blue);
  font-weight: 1000;
}

.purchase-button {
  width: 100%;
  justify-content: center;
}

.purchase-actions {
  display: grid;
  gap: 10px;
}

.purchase-fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cart-page {
  min-height: 100vh;
  background: var(--paper);
}

.cart-hero {
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 72px) 30px;
  background: #eef5f8;
}

.cart-hero h1 {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.95;
}

.cart-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  align-items: start;
  padding: 32px clamp(20px, 5vw, 72px) clamp(54px, 8vw, 88px);
}

.cart-items {
  display: grid;
  gap: 12px;
}

.cart-item,
.cart-empty,
.cart-summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.cart-item span {
  color: var(--muted);
  font-weight: 900;
}

.cart-item h2 {
  margin: 4px 0;
  color: var(--blue);
  font-size: 1.35rem;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
}

.cart-item strong {
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.cart-item button {
  min-height: 38px;
  padding: 8px 14px;
  color: var(--blue);
  background: #eef5f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.cart-empty {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 28px;
}

.cart-empty h2 {
  margin: 0;
  color: var(--blue);
}

.cart-empty p {
  margin: 0;
  color: var(--muted);
}

.cart-summary {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  padding: 22px;
  box-shadow: 0 18px 42px rgba(8, 43, 87, 0.08);
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 900;
}

.cart-summary-line.total {
  padding-top: 14px;
  color: var(--blue-dark);
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
}

.cart-summary-line.discount {
  color: #0f6b3d;
}

.cart-discounts {
  display: grid;
  gap: 8px;
}

.cart-checkout-message {
  margin: 0;
  padding: 10px 12px;
  color: #0f3b24;
  background: #dff7e6;
  border: 1px solid #9de8b2;
  border-radius: 8px;
  font-weight: 900;
}

.cart-added-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  align-items: center;
  padding: clamp(14px, 3vw, 28px);
  overflow-y: auto;
  background: rgba(7, 12, 18, 0.66);
}

.cart-added-modal {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(860px, 100%);
  margin-inline: auto;
  padding: clamp(18px, 3vw, 28px);
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.cart-modal-close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.cart-added-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-inline-end: 46px;
}

.cart-added-check {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #0f3b24;
  background: #9de8b2;
  border-radius: 50%;
  font-size: 1.45rem;
  font-weight: 1000;
}

.cart-added-head h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.cart-added-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.cart-added-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
}

.cart-added-product {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fbfbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-added-thumb,
.cart-suggestion-thumb {
  display: grid;
  place-items: center;
  min-height: 74px;
  color: var(--blue);
  background: #eef5f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 1000;
}

.cart-added-product span,
.cart-suggestion-card span {
  color: var(--muted);
  font-weight: 900;
}

.cart-added-product h3,
.cart-suggestion-card h3 {
  margin: 4px 0;
  color: var(--ink);
  line-height: 1.15;
  font-size: 1.16rem;
}

.cart-added-product p,
.cart-suggestion-card p {
  margin: 0;
  color: var(--muted);
}

.cart-added-product strong {
  color: var(--blue);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  white-space: nowrap;
}

.cart-mini-summary {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
}

.cart-mini-summary span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.cart-mini-summary strong {
  font-size: 1.45rem;
}

.cart-mini-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.cart-mini-summary a {
  color: var(--white);
  font-weight: 900;
}

.cart-added-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-added-actions .button {
  min-width: 210px;
  justify-content: center;
}

.cart-suggestions {
  display: grid;
  gap: 12px;
}

.cart-suggestions > h3 {
  margin: 0;
  color: var(--blue);
  font-size: 1.15rem;
}

.cart-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cart-suggestion-card {
  display: grid;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  background: #fbfbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-suggestion-card button {
  min-height: 36px;
  margin-top: 0;
  padding: 7px 12px;
  color: #42aeea;
  background: var(--white);
  border: 2px solid #42aeea;
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 1000;
  cursor: pointer;
}

.cart-suggestion-card button:disabled {
  opacity: 0.6;
  cursor: default;
}

.preview-included {
  padding-bottom: 24px;
}

.preview-lesson-list {
  display: grid;
  gap: 10px;
  max-width: 1080px;
}

.preview-lesson-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-lesson-item span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--blue);
  background: #eef5f8;
  border-radius: 8px;
  font-weight: 1000;
}

.preview-lesson-item h3 {
  margin: 0 0 4px;
  color: var(--blue);
}

.preview-lesson-item p {
  margin: 0;
  color: var(--muted);
}

.preview-lesson-item small {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: 18px;
  padding: 4px 12px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: 999px;
  font-weight: 800;
}

.progress {
  height: 10px;
  margin: 24px 0 8px;
  overflow: hidden;
  background: var(--soft-blue);
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--white);
  background: var(--blue-dark);
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
  }

  .header-actions {
    margin-inline-start: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
  }

  .hero,
  .split,
  .about,
  .about-hero,
  .about-story,
  .course-hero,
  .course-topline,
  .course-watch-layout,
  .course-preview-hero,
  .book-hero,
  .book-strip,
  .book-layout,
  .book-chapter-grid,
  .book-example-grid,
  .book-doc-grid,
  .book-practice-focus ol,
  .book-answer-tier ol,
  .book-doc-toc a,
  .preview-purchase-section,
  .cart-layout,
  .course-overview-grid,
  .course-content-layout,
  .learning-shell,
  .lesson-support-grid {
    grid-template-columns: 1fr;
  }

  .learning-sidebar {
    position: static;
    height: auto;
    border-inline-start: 0;
    border-bottom: 1px solid var(--line);
  }

  .lesson-header {
    align-items: stretch;
    flex-direction: column;
  }

  .cinema-topbar,
  .cinema-meta,
  .clean-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .watch-grid {
    grid-template-columns: 1fr;
  }

  .preview-stats {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .bundle-grid,
  .purchase-options,
  .cart-suggestions-grid,
  .term-options,
  .cart-term-picker {
    grid-template-columns: 1fr;
  }

  .term-picker-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .cart-added-main {
    grid-template-columns: 1fr;
  }

  .cart-added-product,
  .cart-suggestion-card {
    grid-template-columns: 1fr;
  }

  .cart-added-actions {
    flex-direction: column;
  }

  .cart-added-actions .button {
    width: 100%;
    min-width: 0;
  }

  .preview-lesson-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .preview-lesson-item small {
    grid-column: 2;
  }

  .cart-summary {
    position: static;
  }

  .book-sidebar {
    position: static;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .cinema-progress {
    grid-template-columns: 1fr;
  }

  .video-playlist {
    max-height: none;
  }

  .lesson-assist {
    grid-template-columns: 1fr;
  }

  .assist-panel {
    grid-template-columns: 1fr;
  }

  .story-lead {
    position: static;
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .journal-controls {
    grid-template-columns: 1fr 1fr;
  }

  .bank-toolbar,
  .bank-paper,
  .topic-preview,
  .video-preview-body {
    grid-template-columns: 1fr;
  }

  .bank-actions {
    justify-content: flex-start;
  }

  .topic-chips {
    justify-content: flex-start;
  }

  .video-preview-heading {
    padding-inline-start: 0;
    padding-top: 46px;
  }

  .hero {
    min-height: auto;
  }

  .grid.three,
  .practice-grid,
  .dashboard-grid,
  .student-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .brand img {
    width: 104px;
  }

  .book-doc-math,
  .book-doc-warning,
  .book-doc-cover-equation {
    padding: 22px 18px;
  }

  .book-doc-math math[display="block"],
  .book-doc-warning math[display="block"],
  .book-doc-cover-equation math[display="block"] {
    font-size: 1.2rem;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 14px;
  }

  .header-actions {
    width: 100%;
    margin-inline-start: 0;
  }

  .header-actions a {
    flex: 1;
  }

  .auth-card {
    padding: 22px;
  }

  .auth-form {
    margin-top: 18px;
  }

  .auth-switch,
  .form-row {
    grid-template-columns: 1fr;
  }

  .nav {
    font-size: 0.9rem;
  }

  .hero-actions,
  .about,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .course-command {
    min-height: auto;
  }

  .course-tabs {
    top: 0;
  }

  .course-stats,
  .practice-grid,
  .assessment-list article,
  .linked-papers a {
    grid-template-columns: 1fr;
  }

  .compact-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .video-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .assessment-list p,
  .linked-papers small {
    grid-column: auto;
  }

  .advanced-lesson-list .course-lesson {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .course-lesson small {
    grid-column: 2;
  }

  .button {
    width: 100%;
  }

  .teacher-photo {
    min-height: 320px;
    box-shadow: 8px 8px 0 var(--soft-blue);
  }

  .grid.three,
  .practice-grid,
  .dashboard-grid,
  .student-layout {
    grid-template-columns: 1fr;
  }

  .journal-controls {
    grid-template-columns: 1fr;
  }

  .exam-row {
    grid-template-columns: 1fr;
  }

  .bank-filters,
  .bank-paper-main {
    grid-template-columns: 1fr;
  }

  .formula-link {
    justify-self: stretch;
  }

  .bank-paper-main p {
    grid-column: auto;
    margin-top: 0;
  }

  .bank-actions .button {
    width: auto;
    flex: 1 1 42%;
  }

  .panel-heading {
    display: grid;
  }

  .lesson-item,
  .file-item {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .step {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}
