/* ============================================================
   The Tribe — frontend styles
   Design tokens and component rules carried over verbatim from
   the approved Figma build. Additions for pages that did not
   exist in the static mock are grouped at the bottom and reuse
   the same tokens so nothing drifts.
   ============================================================ */
:root {
  --gold: #ddbf89;
  --navy: #21225f;
  --ink: #212327;
  --gray: #808292;
  --gray-2: #767c8e;
  --gray-3: #757c8e;
  --line: #eeeeee;
  --line-soft: rgba(0, 0, 0, 0.08);
  --chip-border: #cdcfd5;
  --bg-soft: #f5f5f5;
  --bg-tab: #f9f9f9;
  --footer-text: #666666;
  --font: 'Jost', sans-serif;
  --ok: #2f9e6b;
  --warn: #d9932f;
  --danger: #c94f4f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard focus must stay visible even though we restyle every control. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* ============================================================
   Header / Nav (shared)
   ============================================================ */
.site-header {
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.09);
  position: relative;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  height: 76px;
  padding: 10px 50px;
}

.nav__logo img { height: 56px; width: auto; }

.nav__links { flex: 1; display: flex; align-items: center; }

.nav__courses {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 50px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--gray);
  transition: color 0.2s ease;
}
.nav__courses:hover { color: var(--navy); }
.nav__courses svg { width: 18px; height: 18px; }

.nav__search { position: relative; width: 300px; margin-left: 50px; }
.nav__search input {
  width: 100%;
  height: 45px;
  border: 1px solid var(--bg-soft);
  background: var(--bg-soft);
  padding: 0 45px 0 16px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.nav__search input::placeholder { color: var(--gray); }
.nav__search button {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}
.nav__search svg { width: 22px; height: 22px; }

.btn-signup {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  padding: 10.8px 30.8px;
  transition: filter 0.2s ease;
  white-space: nowrap;
}
.btn-signup:hover { filter: brightness(1.05); }
.btn-signup svg { width: 18px; height: 18px; }

/* Signed-in user menu — sits in the slot the Sign Up button occupies. */
.nav__user { position: relative; }
.nav__user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 99px;
  transition: background 0.2s ease;
}
.nav__user-trigger:hover { background: var(--bg-soft); }
.nav__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
}
.nav__user-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav__user-trigger svg { width: 14px; height: 14px; color: var(--gray); transition: transform 0.2s ease; }
.nav__user[data-open="true"] .nav__user-trigger svg { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: none;
  z-index: 60;
}
.nav__user[data-open="true"] .nav__menu { display: block; }
.nav__menu a, .nav__menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__menu a:hover, .nav__menu button:hover { background: var(--bg-soft); color: var(--navy); }
.nav__menu svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--gray); }
.nav__menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.nav__menu .is-danger { color: var(--danger); }
.nav__menu .is-danger svg { color: var(--danger); }

/* Mobile header */
.mobile-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #000;
  height: 43px;
  padding: 0 16px;
}
.mobile-nav img { height: 23px; width: auto; }
.mobile-nav .hamburger svg { width: 22px; height: 22px; display: block; }

.mobile-drawer {
  display: none;
  background: #000;
  padding: 8px 16px 18px;
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer a, .mobile-drawer button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 0;
  font-size: 15px;
  line-height: 22px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-drawer a:last-child, .mobile-drawer button:last-child { border-bottom: 0; }

/* ============================================================
   Breadcrumb banner
   ============================================================ */
.banner {
  position: relative;
  height: 341px;
  background: #0c0c0c;
  overflow: hidden;
}
.banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}
.banner__content {
  position: absolute;
  left: 74px;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
}
.banner__robin {
  width: 253px;
  height: 253px;
  object-fit: contain;
  flex-shrink: 0;
}
.banner__text { margin-left: -32px; position: relative; }
.banner__text h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 38.4px;
  color: #fff;
}
.banner__text p {
  font-size: 18px;
  font-weight: 500;
  line-height: 38.4px;
  color: #fff;
}
.banner__text a { color: var(--gold); }

/* ============================================================
   Layout containers
   ============================================================ */
.page-body { padding-bottom: 60px; }

.main-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
}

.content-col {
  flex: 1;
  min-width: 0;
  padding: 60px 12px 0;
}

.sidebar {
  width: 439px;
  flex-shrink: 0;
  padding: 60px 19px 0;
}

.detail-sidebar {
  width: 439px;
  flex-shrink: 0;
  padding: 0 11px 0 28px;
  position: sticky !important;
  top: 250px;
}

/* ============================================================
   Course card (Detail page, right side)
   ============================================================ */
.course-card {
  width: 401px;
  max-width: 100%;
  margin-top: -248px;
  position: relative;
  z-index: 5;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 12px 12px 10px;
}
.course-card__thumb {
  width: 100%;
  aspect-ratio: 400 / 255;
  object-fit: cover;
}
.course-card__list { padding: 20px 20px 0; }

.course-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14.4px 0 15.8px;
  border-bottom: 0.8px solid var(--line);
}
.course-card__row:first-child { padding-top: 6px; padding-bottom: 10.8px; }
.course-card__row--last { border-bottom: 0; padding-bottom: 15px; }

.course-card__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 500;
  line-height: 25.5px;
  color: var(--navy);
  white-space: nowrap;
}
.course-card__label svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  stroke: var(--gold);
}
.course-card__value {
  font-size: 17px;
  line-height: 25.5px;
  color: var(--gray);
  text-align: right;
}
.course-card__value--strong { color: var(--navy); font-weight: 500; }

.course-card__progress {
  margin-top: 15px;
  height: 6px;
  background: #ddd;
  border-radius: 8px;
  overflow: hidden;
}
.course-card__progress span {
  display: block;
  height: 100%;
  background: #111;
  border-radius: 8px;
}
.course-card__progress-label {
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--gray);
  text-align: center;
}

.btn-continue {
  margin-top: 10px;
  width: 100%;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 12.8px 32.8px;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  display: block;
  transition: filter 0.2s ease;
}
.btn-continue:hover { filter: brightness(1.05); }
.btn-continue[disabled] { opacity: 0.6; cursor: not-allowed; }

.btn-continue--ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--chip-border);
  margin-top: 8px;
}
.btn-continue--ghost:hover { border-color: var(--navy); filter: none; }

/* ============================================================
   Play page — hero / video area
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1521 / 645;
  overflow: hidden;
  background: #1a1a1a;
}
.hero__img,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
.hero__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border-radius: 99px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.hero__play:hover { transform: translate(-50%, -50%) scale(1.05); }
.hero__play svg { width: 62px; height: 62px; margin-left: 8px; }
.hero.is-playing .hero__play { opacity: 0; pointer-events: none; }

.hero__yt { position: absolute; inset: 0; display: none; z-index: 1; }
.hero__yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.hero.is-youtube .hero__yt { display: block; }
.hero.is-youtube .hero__video { visibility: hidden; }

.hero__locked {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(12, 12, 12, 0.82);
  color: #fff;
  text-align: center;
  padding: 24px;
  z-index: 3;
}
.hero__locked svg { width: 42px; height: 42px; }
.hero__locked p { font-size: 17px; line-height: 26px; max-width: 420px; }
.hero__locked .btn-continue { width: auto; padding: 11px 30px; margin-top: 4px; }

/* ============================================================
   Mobile-only course head
   ============================================================ */
.mobile-course-head { display: none; }

/* ============================================================
   Tabs
   ============================================================ */
.tablist {
  display: flex;
  align-items: stretch;
  height: 55px;
  background: var(--bg-tab);
  border-radius: 5px;
  padding: 0 30px;
  overflow-x: auto;
}
.tab {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 35px;
  font-size: 18px;
  font-weight: 700;
  line-height: 27px;
  color: var(--navy);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.tab:last-child { margin-right: 0; }
.tab:hover { color: var(--gold); }
.tab.is-active { color: var(--gold); }
.tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
}

.mobile-tabs { display: none; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.tab-placeholder {
  padding: 50px 0 30px;
  font-size: 16px;
  line-height: 28.8px;
  color: var(--gray);
}

/* ============================================================
   Tab panel content (Overview)
   ============================================================ */
.tabpanel {
  max-width: 796px;
  margin: 0 auto;
  padding-top: 35px;
}
/* Curriculum needs the full column width, unlike the prose tabs. */
.tabpanel--wide { max-width: none; }

.course-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 38.4px;
  color: var(--ink);
}

.course-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.course-meta__cats { font-size: 14px; line-height: 22.4px; color: var(--gray-2); }
.course-meta__cats b { font-weight: 500; color: var(--ink); }

.wishlist-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 19.25px;
  color: var(--gray-3);
  white-space: nowrap;
  padding: 1px;
  transition: color 0.2s ease;
}
.wishlist-link:hover { color: var(--navy); }
.wishlist-link svg { width: 18px; height: 18px; }
.wishlist-link.is-active { color: var(--gold); }

.about { margin-top: 44px; }
.about h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ink);
}
.about__clip {
  position: relative;
  max-height: 157px;
  overflow: hidden;
  margin-top: 11px;
  transition: max-height 0.4s ease;
}
.about__clip.is-open { max-height: 2000px; }
.about__clip p {
  font-size: 16px;
  line-height: 28.8px;
  color: var(--gray);
  margin-bottom: 14.4px;
}
.about__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 1.31%, rgba(255, 255, 255, 0.72) 15.41%, #fff);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.about__clip.is-open .about__fade { opacity: 0; }

.show-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 22px;
  color: var(--gray-3);
  padding: 1px;
  transition: color 0.2s ease;
}
.show-more:hover { color: var(--navy); }
.show-more svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.show-more.is-open svg { transform: rotate(45deg); }

.section { margin-top: 40px; }
.section h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 35.2px;
  color: var(--ink);
}

.learn-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 378.79px));
  justify-content: space-between;
  column-gap: 38px;
  row-gap: 25px;
  margin-top: 15px;
}
.learn-list li {
  font-size: 16px;
  line-height: 25.6px;
  color: var(--gray);
  padding-left: 20px;
  position: relative;
}
.learn-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.req-aud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}
.req-aud p {
  font-size: 16px;
  line-height: 25.6px;
  color: var(--gray);
  margin-top: 15px;
  max-width: 365px;
}

.tags-list { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.tag-chip {
  display: inline-flex;
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  padding: 5.8px 20.8px;
  font-size: 14px;
  line-height: 26px;
  color: #000;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tag-chip:hover { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ============================================================
   Reviews
   ============================================================ */
.reviews-summary {
  display: flex;
  align-items: center;
  padding: 28px 0 44px;
}
.reviews-summary__score {
  flex-shrink: 0;
  padding: 12px 40px 12px 0;
  border-right: 1px solid #ddd;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.reviews-summary__score .score {
  font-size: 50px;
  font-weight: 700;
  line-height: 60px;
  color: var(--ink);
}
.reviews-summary__score .count {
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  margin-top: 12px;
  padding-left: 4px;
}
.reviews-summary__bars {
  margin-left: 56px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.rating-row {
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
}
.rating-row__label { width: 58px; flex-shrink: 0; }
.rating-row__track {
  width: 200px;
  max-width: 45%;
  height: 6px;
  background: #e3e3e3;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 16px;
  flex-shrink: 0;
}
.rating-row__fill { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.rating-row__pct { font-size: 14px; line-height: 20px; color: var(--gray); }

.review { border-top: 1px solid var(--line); padding: 28px 0 30px; }
.review__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.review__user { display: flex; align-items: center; gap: 20px; min-width: 0; }
.review__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
}
.review__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink);
}
.review__date { font-size: 14px; line-height: 22px; color: #55575d; margin-top: 8px; }
.review__meta { text-align: right; flex-shrink: 0; }
.review__stars { display: flex; gap: 3px; justify-content: flex-end; }
.review__stars svg { width: 20px; height: 20px; fill: var(--ink); }
.review__stars svg.is-empty { fill: #d8d8d8; }
.review__location { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--gray); }
.review__text {
  margin-top: 20px;
  font-size: 16px;
  line-height: 28px;
  color: var(--gray);
}

/* Review submission form */
.review-form {
  border-top: 1px solid var(--line);
  padding: 28px 0 10px;
}
.review-form h3 { font-size: 20px; font-weight: 700; line-height: 30px; color: var(--ink); }
.review-form__stars { display: flex; gap: 6px; margin: 14px 0 16px; }
.review-form__stars input { position: absolute; opacity: 0; pointer-events: none; }
.review-form__stars label { cursor: pointer; line-height: 0; }
.review-form__stars svg { width: 28px; height: 28px; fill: #d8d8d8; transition: fill 0.15s ease; }
.review-form__stars label.is-on svg { fill: var(--gold); }

/* ============================================================
   Lesson panel (Play page)
   ============================================================ */
.lesson-panel {
  width: 100%;
  max-width: 401px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson-panel__head {
  padding: 5px 10px 8px;
  border-bottom: 0.8px solid var(--line);
}
.lesson-panel__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.lesson-panel__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 25.5px;
  color: var(--navy);
}
.lesson-panel__title .title-suffix { display: none; }
.lesson-panel__close { display: none; }
.lesson-panel__count {
  margin-top: 8px;
  font-size: 16px;
  line-height: 25.5px;
  color: var(--gray);
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  max-height: 620px;
  overflow-y: auto;
}

.lesson-list__subhead {
  font-size: 18px;
  font-weight: 500;
  line-height: 25.5px;
  color: var(--navy);
  padding: 10px 10px 0;
  border-top: 0.8px solid var(--line);
}

.lesson-item {
  display: flex;
  align-items: center;
  min-height: 104px;
  padding: 16px 10px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
  width: 100%;
}
.lesson-item:last-child { border-bottom: 0; }
.lesson-item:hover { background: var(--bg-soft); }
.lesson-item.is-active { background: var(--bg-soft); border-bottom: 0; }

.lesson-item__thumb {
  width: 112px;
  height: 71px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-soft);
  border-radius: 3px;
}
.lesson-item__thumb--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.lesson-item__thumb--fallback svg { width: 26px; height: 26px; }
.lesson-item__info { flex: 1; min-width: 0; padding-left: 10px; }
.lesson-item__name {
  font-size: 22px;
  font-weight: 500;
  line-height: 25.5px;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 0.8px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-item__duration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 17px;
  line-height: 25.5px;
}
.lesson-item__duration .label { font-weight: 500; color: var(--navy); }
.lesson-item__duration .time { color: var(--gray); }
.lesson-item__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ok);
}
.lesson-item__badge svg { width: 14px; height: 14px; }
.lesson-item__lock { color: var(--gray); }
.lesson-item__lock svg { width: 15px; height: 15px; }

/* ============================================================
   Curriculum calendar
   Weeks down the left, days across the top, section cards in cells.
   ============================================================ */
.curriculum { padding-top: 30px; }

.curriculum__head { margin-bottom: 22px; }
.curriculum__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gray);
}
.curriculum__title {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 36px;
  color: var(--ink);
}

.curriculum__legend {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.curriculum__legend-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gray);
  padding-top: 7px;
  margin-right: 4px;
  flex-shrink: 0;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 13px;
  line-height: 20px;
  color: var(--ink);
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.legend-chip:hover { filter: brightness(0.97); }
.legend-chip__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.curriculum.is-filtered .legend-chip:not(.is-active) { opacity: 0.45; }

/* The grid is a real table so week/day headers stay aligned when cells
   grow to different heights. It scrolls horizontally on narrow screens. */
.calendar-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.calendar {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  table-layout: fixed;
}
.calendar th, .calendar td {
  border: 1px solid var(--line);
  vertical-align: top;
  padding: 0;
}
.calendar thead th {
  background: #fff;
  padding: 16px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--gray);
  text-align: left;
}
.calendar thead th.is-today { background: #fbfaf8; color: var(--navy); }
.calendar__weekcol { width: 118px; }
.calendar__daycol { width: calc((100% - 118px) / 7); }

.calendar__weekcell {
  padding: 24px 12px;
  background: #fff;
}
.calendar__weeknum {
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  color: var(--ink);
  text-transform: uppercase;
}
.calendar__weekmeta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--gray);
}
.calendar__weekphase {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 17px;
  color: var(--gold);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.calendar__cell { padding: 12px 10px; min-height: 130px; }
.calendar__cell--empty { background: #fcfcfc; }
.calendar__rest {
  font-size: 12px;
  line-height: 18px;
  color: #b4b7c2;
  padding: 10px 2px;
}

/* Section card inside a day cell */
.sec-card {
  border-radius: 8px;
  border: 1px solid;
  padding: 12px 12px 10px;
  margin-bottom: 10px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.sec-card:last-child { margin-bottom: 0; }
.sec-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07); }
.curriculum.is-filtered .sec-card.is-dimmed { opacity: 0.25; }

.sec-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ink);
}
.sec-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.sec-card__stats {
  font-size: 11.5px;
  line-height: 17px;
  color: var(--gray-2);
}
.sec-card__toggle {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  color: var(--gray-2);
  transition: background 0.15s ease, transform 0.25s ease;
}
.sec-card__toggle:hover { background: rgba(0, 0, 0, 0.06); }
.sec-card__toggle svg { width: 13px; height: 13px; }
.sec-card.is-open .sec-card__toggle { transform: rotate(180deg); }

.sec-card__lessons {
  display: none;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.sec-card.is-open .sec-card__lessons { display: block; }

.sec-lesson {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--ink);
  text-align: left;
}
.sec-lesson:hover { color: var(--navy); }
.sec-lesson__icon { width: 11px; height: 11px; flex-shrink: 0; color: var(--gray-2); }
.sec-lesson__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sec-lesson__time { color: var(--gray-2); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sec-lesson.is-done .sec-lesson__icon { color: var(--ok); }

.sec-card__more {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--navy);
  font-weight: 500;
}
.sec-card__more:hover { color: var(--gold); }

.curriculum__empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--gray);
  font-size: 16px;
  line-height: 26px;
}

/* ============================================================
   Instructor tab
   ============================================================ */
.instructor-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 35px 0 10px;
}
.instructor-card__avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 600;
}
.instructor-card__name { font-size: 22px; font-weight: 700; line-height: 32px; color: var(--ink); }
.instructor-card__headline { font-size: 15px; line-height: 24px; color: var(--gold); margin-top: 2px; }
.instructor-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 14px;
}
.instructor-card__stat { font-size: 14px; line-height: 22px; color: var(--gray); }
.instructor-card__stat b { display: block; font-size: 18px; font-weight: 700; color: var(--ink); }
.instructor-card__bio { margin-top: 18px; font-size: 16px; line-height: 28.8px; color: var(--gray); }
.instructor-card__bio p + p { margin-top: 14px; }

/* ============================================================
   Announcements tab
   ============================================================ */
.announcement {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.announcement:last-child { border-bottom: 0; }
.announcement__head { display: flex; align-items: center; gap: 10px; }
.announcement__title { font-size: 18px; font-weight: 700; line-height: 27px; color: var(--ink); }
.announcement__pin {
  font-size: 11px;
  line-height: 18px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 99px;
  padding: 0 9px;
}
.announcement__date { margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--gray); }
.announcement__body { margin-top: 12px; font-size: 16px; line-height: 28px; color: var(--gray); }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: #000; padding-top: 100px; }
.footer__grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 260px;
}
.footer__col { padding: 0 12px; }

.footer__logo { height: 56px; width: auto; }
.footer__desc {
  font-size: 16px;
  line-height: 28.8px;
  color: var(--footer-text);
  max-width: 306px;
  margin-top: 18px;
}
.footer__social { display: flex; gap: 7.8px; margin-top: 20px; }
.footer__social a {
  width: 35px;
  height: 35px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s ease;
}
.footer__social a:hover { filter: brightness(1.1); }
.footer__social svg { width: 18px; height: 18px; }

.footer__heading {
  position: relative;
  font-size: 22px;
  font-weight: 700;
  line-height: 26.4px;
  color: #fff;
  padding-bottom: 10.8px;
  border-bottom: 0.8px solid rgba(231, 233, 234, 0.25);
  margin-bottom: 25px;
}
.footer__heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 45px;
  height: 1.2px;
  background: var(--gold);
}

.footer__links li + li { margin-top: 12px; }
.footer__links a {
  position: relative;
  display: inline-block;
  padding-left: 17px;
  font-size: 16px;
  line-height: 24px;
  color: var(--footer-text);
  transition: color 0.2s ease;
}
.footer__links a:hover { color: var(--gold); }
.footer__links a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--footer-text);
  transition: background 0.2s ease;
}
.footer__links a:hover::before { background: var(--gold); }

.footer__address li { display: flex; align-items: flex-start; gap: 6px; }
.footer__address li + li { margin-top: 12px; }
.footer__address svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; }
.footer__address span {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--gray);
}

.footer__bottom {
  margin-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding: 35px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 16px;
  line-height: 28.8px;
  color: var(--gray);
}
.footer__bottom .credit b { font-weight: 400; color: var(--gold); }

/* ============================================================
   Shared UI: flash messages, forms, buttons, pagination
   ============================================================ */
.flash-stack {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 12px 0;
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 23px;
  border: 1px solid;
  margin-bottom: 12px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; }
.alert--success { background: #eaf6ef; border-color: #bfe3ce; color: #1d6d48; }
.alert--error   { background: #fdecec; border-color: #f3c9c9; color: #9c2f2f; }
.alert--info    { background: #eef2fb; border-color: #cbd8f2; color: #2b4a8a; }
.alert ul { margin-top: 4px; }
.alert li { list-style: disc; margin-left: 18px; }

.field { margin-bottom: 18px; }
.field__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: var(--navy);
  margin-bottom: 7px;
}
.field__label .req { color: var(--danger); }
.field__hint { margin-top: 6px; font-size: 12.5px; line-height: 19px; color: var(--gray); }
.field__error { margin-top: 6px; font-size: 13px; line-height: 20px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  background: #fff;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input::placeholder, .textarea::placeholder { color: #a9acb8; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(221, 191, 137, 0.22);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 120px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23808292' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  line-height: 22px;
  color: var(--gray);
  cursor: pointer;
}
.checkbox input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 11px 26px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  border: 1px solid transparent;
  transition: filter 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--primary:hover { filter: brightness(1.05); }
.btn--dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--dark:hover { filter: brightness(1.12); }
.btn--ghost { background: #fff; border-color: var(--chip-border); color: var(--navy); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--danger { background: #fff; border-color: #e8b4b4; color: var(--danger); }
.btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 16px; font-size: 13.5px; line-height: 20px; }
.btn[disabled], .btn.is-loading { opacity: 0.65; pointer-events: none; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .is-current { background: var(--gold); border-color: var(--gold); color: #fff; }
.pagination .is-disabled { opacity: 0.4; pointer-events: none; }

/* ============================================================
   Auth pages
   ============================================================ */
.auth {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  background: var(--bg-soft);
}
.auth__card {
  width: 100%;
  max-width: 452px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.09);
  padding: 40px 38px 34px;
}
.auth__head { text-align: center; margin-bottom: 28px; }
.auth__head img { height: 46px; width: auto; margin: 0 auto 20px; }
.auth__head h1 { font-size: 25px; font-weight: 700; line-height: 34px; color: var(--ink); }
.auth__head p { margin-top: 7px; font-size: 15px; line-height: 24px; color: var(--gray); }
.auth__foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14.5px;
  line-height: 23px;
  color: var(--gray);
}
.auth__foot a { color: var(--navy); font-weight: 500; }
.auth__foot a:hover { color: var(--gold); }
.auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.auth__row a { font-size: 14px; color: var(--navy); }
.auth__row a:hover { color: var(--gold); }

/* ============================================================
   Account / My Courses
   ============================================================ */
.account { max-width: 1320px; margin: 0 auto; padding: 46px 12px 70px; }
.account__head { margin-bottom: 30px; }
.account__head h1 { font-size: 28px; font-weight: 700; line-height: 40px; color: var(--ink); }
.account__head p { margin-top: 4px; font-size: 15px; line-height: 24px; color: var(--gray); }

.account__tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  overflow-x: auto;
}
.account__tabs a {
  position: relative;
  padding: 0 0 13px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: var(--gray);
  white-space: nowrap;
  transition: color 0.18s ease;
}
.account__tabs a:hover { color: var(--navy); }
.account__tabs a.is-active { color: var(--gold); }
.account__tabs a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--gold);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}
.stat-tile {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px 22px;
  background: #fff;
}
.stat-tile__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray);
}
.stat-tile__value {
  margin-top: 9px;
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  color: var(--ink);
}
.stat-tile__sub { margin-top: 3px; font-size: 13px; line-height: 20px; color: var(--gray); }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 24px;
}
.course-tile {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.course-tile:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09); transform: translateY(-2px); }
.course-tile__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-soft);
}
.course-tile__body { padding: 17px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.course-tile__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  color: var(--ink);
}
.course-tile__meta { margin-top: 5px; font-size: 13.5px; line-height: 21px; color: var(--gray); }
.course-tile__progress {
  margin-top: 15px;
  height: 6px;
  background: #e6e6e6;
  border-radius: 8px;
  overflow: hidden;
}
.course-tile__progress span { display: block; height: 100%; background: var(--gold); border-radius: 8px; }
.course-tile__foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.empty-state {
  border: 1px dashed var(--chip-border);
  border-radius: 10px;
  padding: 56px 24px;
  text-align: center;
}
.empty-state svg { width: 46px; height: 46px; color: var(--chip-border); margin: 0 auto 16px; }
.empty-state h3 { font-size: 19px; font-weight: 600; line-height: 28px; color: var(--ink); }
.empty-state p { margin: 6px auto 20px; font-size: 15px; line-height: 24px; color: var(--gray); max-width: 420px; }

/* ============================================================
   Checkout
   ============================================================ */
.checkout { max-width: 940px; margin: 0 auto; padding: 50px 20px 80px; }
.checkout__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 34px;
  align-items: start;
}
.checkout__panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 28px;
  background: #fff;
}
.checkout__panel h2 { font-size: 19px; font-weight: 700; line-height: 28px; color: var(--ink); margin-bottom: 16px; }
.checkout__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 24px;
  color: var(--gray);
}
.checkout__line:last-of-type { border-bottom: 0; }
.checkout__line b { color: var(--ink); font-weight: 500; }
.checkout__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.checkout__course {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.checkout__course img {
  width: 108px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-soft);
}
.checkout__course h3 { font-size: 16px; font-weight: 600; line-height: 24px; color: var(--ink); }
.checkout__course p { margin-top: 3px; font-size: 13px; line-height: 20px; color: var(--gray); }
.checkout__secure {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--gray);
}
.checkout__secure svg { width: 16px; height: 16px; color: var(--ok); }

.receipt { max-width: 620px; margin: 0 auto; padding: 70px 20px 90px; text-align: center; }
.receipt__icon {
  width: 78px; height: 78px;
  border-radius: 50%;
  background: #eaf6ef;
  color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.receipt__icon svg { width: 38px; height: 38px; }
.receipt h1 { font-size: 27px; font-weight: 700; line-height: 38px; color: var(--ink); }
.receipt p { margin-top: 10px; font-size: 16px; line-height: 26px; color: var(--gray); }
.receipt__box {
  margin: 28px 0 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px 24px;
  text-align: left;
}
.receipt__row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0;
  font-size: 14.5px; line-height: 22px; color: var(--gray);
}
.receipt__row b { color: var(--ink); font-weight: 500; }

/* ============================================================
   Blog
   ============================================================ */
.blog-wrap { max-width: 1320px; margin: 0 auto; padding: 50px 12px 80px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 28px;
}
.blog-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-card:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09); transform: translateY(-2px); }
.blog-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-soft); }
.blog-card__body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card__cat {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}
.blog-card__title { margin-top: 8px; font-size: 18px; font-weight: 600; line-height: 27px; color: var(--ink); }
.blog-card__excerpt { margin-top: 8px; font-size: 14.5px; line-height: 23px; color: var(--gray); }
.blog-card__foot { margin-top: auto; padding-top: 15px; font-size: 13px; line-height: 20px; color: var(--gray); }

.article { max-width: 796px; margin: 0 auto; padding: 50px 20px 80px; }
.article__title { font-size: 34px; font-weight: 700; line-height: 46px; color: var(--ink); }
.article__meta { margin-top: 12px; font-size: 14px; line-height: 22px; color: var(--gray); }
.article__cover { width: 100%; border-radius: 10px; margin: 26px 0 30px; object-fit: cover; }
.article__body { font-size: 17px; line-height: 31px; color: #3c3f47; }
.article__body p { margin-bottom: 20px; }
.article__body h2 { font-size: 24px; font-weight: 700; line-height: 34px; color: var(--ink); margin: 32px 0 12px; }
.article__body h3 { font-size: 20px; font-weight: 700; line-height: 30px; color: var(--ink); margin: 26px 0 10px; }
.article__body ul, .article__body ol { margin: 0 0 20px 22px; }
.article__body li { list-style: disc; margin-bottom: 8px; }
.article__body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  margin: 0 0 20px;
  color: var(--gray);
  font-style: italic;
}
.article__body img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0 20px; }

/* ============================================================
   Static pages
   ============================================================ */
.page-wrap { max-width: 900px; margin: 0 auto; padding: 50px 20px 80px; }
.page-wrap h1 { font-size: 30px; font-weight: 700; line-height: 42px; color: var(--ink); margin-bottom: 18px; }
.page-wrap h2 { font-size: 21px; font-weight: 700; line-height: 32px; color: var(--ink); margin: 30px 0 10px; }
.page-wrap p { font-size: 16px; line-height: 29px; color: var(--gray); margin-bottom: 15px; }
.page-wrap ul { margin: 0 0 18px 22px; }
.page-wrap li { list-style: disc; font-size: 16px; line-height: 29px; color: var(--gray); margin-bottom: 7px; }

/* ============================================================
   Error page
   ============================================================ */
.error-page {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 20px;
}
.error-page__code {
  font-size: 92px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -2px;
}
.error-page h1 { margin-top: 14px; font-size: 26px; font-weight: 700; line-height: 36px; color: var(--ink); }
.error-page p { margin-top: 10px; font-size: 16px; line-height: 26px; color: var(--gray); max-width: 480px; }
.error-page .btn { margin-top: 26px; }
.error-page__trace {
  margin-top: 30px;
  text-align: left;
  max-width: 900px;
  width: 100%;
  background: #1e1f26;
  color: #e6e6e6;
  border-radius: 8px;
  padding: 18px 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 20px;
  overflow-x: auto;
}

/* ============================================================
   Responsive — tablet
   ============================================================ */
@media (max-width: 1360px) {
  .nav { padding: 10px 24px; }
  .footer__grid { padding: 0 12px; }
}

@media (max-width: 1100px) {
  .nav__search { width: 220px; margin-left: 30px; }
  .main-container { flex-direction: column; align-items: stretch; }
  .sidebar { width: 100%; display: flex; justify-content: center; padding-top: 50px; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); row-gap: 45px; }

  .detail-sidebar {
    order: -1;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: center;
  }
  .course-card { margin-top: -140px; }

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

@media (max-width: 860px) {
  .nav__search { display: none; }
  .detail-sidebar { position: static !important; }
  .instructor-card { flex-direction: column; gap: 18px; }
  .instructor-card__avatar { width: 96px; height: 96px; font-size: 32px; }
}

/* ============================================================
   Responsive — mobile
   ============================================================ */
@media (max-width: 767px) {
  .nav { display: none; }
  .mobile-nav { display: flex; }

  .banner { height: 200px; }
  .banner__content { left: 16px; }
  .banner__robin { width: 140px; height: 140px; }
  .banner__text { margin-left: -14px; }
  .banner__text h2 { font-size: 20px; line-height: 26px; }
  .banner__text p { font-size: 13px; line-height: 24px; }

  .course-card { margin-top: -56px; }
  .course-card__label { font-size: 14px; }
  .course-card__label svg { width: 16px; height: 16px; }
  .course-card__value { font-size: 14px; }
  .course-card__list { padding: 14px 8px 0; }
  .btn-continue { font-size: 14px; padding: 11px 20px; }

  .hero { aspect-ratio: 375 / 181; }
  .hero__play { width: 50px; height: 50px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
  .hero__play svg { width: 22px; height: 22px; margin-left: 3px; }
  .hero__locked p { font-size: 14px; line-height: 22px; }

  .mobile-course-head { display: block; padding: 12px 20px 10px; }
  .mobile-course-head h1 {
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    color: var(--ink);
  }
  .mobile-course-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
  }
  .mobile-course-head__cats { font-size: 11px; line-height: 15px; color: var(--gray-2); }
  .mobile-course-head__cats b { font-weight: 500; color: var(--ink); }
  .wishlist-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gold);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    border-radius: 99px;
    padding: 1px 15px 1px 13px;
    white-space: nowrap;
  }
  .wishlist-pill svg { width: 14px; height: 14px; }

  .mobile-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-tabs::-webkit-scrollbar { display: none; }
  .mobile-tab {
    flex-shrink: 0;
    background: var(--bg-soft);
    color: var(--ink);
    font-size: 12px;
    line-height: 20px;
    border-radius: 99px;
    padding: 1px 17px;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .mobile-tab.is-active { background: var(--gold); color: #fff; }

  .page-body { padding-bottom: 0; }
  .main-container { display: flex; flex-direction: column; }
  .content-col { padding: 0 20px; }
  .tablist { display: none; }
  .tabpanel { padding-top: 4px; max-width: none; }

  .course-title, .course-meta { display: none; }

  .about { margin-top: 12px; }
  .about h2 { font-size: 16px; line-height: 32px; }
  .about__clip { max-height: 92px; margin-top: 6px; }
  .about__clip p { font-size: 12px; line-height: 18px; margin-bottom: 8px; }
  .about__fade { height: 36px; }
  .show-more { font-size: 12px; margin-top: 14px; }
  .show-more svg { width: 14px; height: 14px; }

  .section { margin-top: 26px; }
  .section h3 { font-size: 14px; line-height: 18px; }

  .learn-list { grid-template-columns: 1fr; row-gap: 8px; margin-top: 8px; }
  .learn-list li { font-size: 12px; line-height: 18px; padding-left: 0; }
  .learn-list li::before { display: none; }

  .req-aud { grid-template-columns: 1fr; row-gap: 22px; }
  .req-aud p { font-size: 12px; line-height: 18px; margin-top: 10px; }

  .tags-list { gap: 8px; margin-top: 8px; }
  .tag-chip { font-size: 12px; line-height: 18px; padding: 5.8px 13px; }

  .tab-placeholder { padding: 24px 0; font-size: 12px; line-height: 18px; }

  .reviews-summary { padding: 18px 0 26px; }
  .reviews-summary__score { padding: 6px 14px 6px 0; }
  .reviews-summary__score .score { font-size: 30px; line-height: 34px; }
  .reviews-summary__score .count { font-size: 12px; line-height: 18px; margin-top: 8px; padding-left: 0; }
  .reviews-summary__bars { margin-left: 16px; gap: 4px; }
  .rating-row { font-size: 11px; line-height: 24px; }
  .rating-row__label { width: 36px; }
  .rating-row__track { flex: 1; width: auto; max-width: none; height: 4px; margin-right: 8px; }
  .rating-row__pct { font-size: 11px; line-height: 16px; }

  .review { padding: 16px 0 20px; }
  .review__user { gap: 10px; }
  .review__avatar { width: 50px; height: 50px; font-size: 17px; }
  .review__name { font-size: 14px; line-height: 20px; letter-spacing: 0.3px; }
  .review__date { font-size: 11px; line-height: 16px; margin-top: 6px; }
  .review__stars { gap: 2px; }
  .review__stars svg { width: 16px; height: 16px; }
  .review__location { font-size: 11px; line-height: 15px; margin-top: 6px; }
  .review__text { margin-top: 14px; font-size: 12px; line-height: 18px; }

  /* Curriculum: the table would be unreadable at this width, so each week
     becomes a stacked list of days instead. */
  .curriculum { padding-top: 10px; }
  .curriculum__title { font-size: 18px; line-height: 26px; }
  .curriculum__legend { padding: 12px 0 16px; gap: 7px; }
  .legend-chip { font-size: 11.5px; padding: 4px 11px; }
  .calendar-scroll { overflow-x: visible; }
  .calendar, .calendar tbody, .calendar tr, .calendar td, .calendar th { display: block; width: auto; }
  .calendar { min-width: 0; }
  .calendar thead { display: none; }
  .calendar tr { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 14px; overflow: hidden; }
  .calendar td { border: 0; border-bottom: 1px solid var(--line); }
  .calendar td:last-child { border-bottom: 0; }
  .calendar__weekcell { background: var(--bg-tab); padding: 13px 15px; }
  .calendar__cell { padding: 12px 15px; }
  .calendar__cell::before {
    content: attr(data-day);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 8px;
  }
  .calendar__cell--empty { display: none; }

  .page-play .content-col { padding-bottom: 110px; }
  .sidebar { padding: 0; }

  .lesson-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    max-width: none;
    height: min(62vh, 540px);
    border-radius: 14px 14px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
  }
  .lesson-panel.is-collapsed { transform: translateY(calc(100% - 80px)); }

  .lesson-panel__head { padding: 4px 10px 8px; cursor: pointer; }
  .lesson-panel__title { font-size: 14px; font-weight: 700; line-height: 20px; color: var(--ink); }
  .lesson-panel__title .title-suffix { display: inline; }
  .lesson-panel__count { font-size: 12px; line-height: 20px; margin-top: 6px; }

  .lesson-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    margin-top: -2px;
  }
  .lesson-panel__close svg { width: 14px; height: 14px; transition: transform 0.35s ease; }
  .lesson-panel.is-collapsed .lesson-panel__close svg { transform: rotate(45deg); }

  .lesson-list { overflow-y: auto; padding-bottom: 16px; max-height: none; }
  .lesson-list__subhead { font-size: 13px; padding: 8px 10px 0; }
  .lesson-item { min-height: 92px; padding: 10px; }
  .lesson-item__name { font-size: 14px; line-height: 20px; padding-bottom: 7px; }
  .lesson-item__duration { font-size: 12px; line-height: 18px; margin-top: 8px; }

  .footer { padding-top: 55px; }
  .footer__grid { grid-template-columns: 1fr; row-gap: 40px; padding: 0 20px; }
  .footer__bottom {
    padding: 25px 20px;
    flex-direction: column;
    text-align: center;
    font-size: 13px;
    line-height: 22px;
    gap: 2px;
  }

  .auth__card { padding: 30px 22px 26px; }
  .account { padding: 28px 20px 60px; }
  .account__head h1 { font-size: 22px; line-height: 32px; }
  .article__title { font-size: 25px; line-height: 35px; }
  .article__body { font-size: 15.5px; line-height: 28px; }
  .error-page__code { font-size: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .footer, .lesson-panel, .btn, .pagination { display: none !important; }
  body { color: #000; }
}
