:root {
  --ink: #20252b;
  --muted: #667176;
  --paper: #fbfbfa;
  --soft: #f1f2f0;
  --card: #ffffff;
  --line: #d8dddc;
  --slate: #3f4648;
  --graphite: #303638;
  --steel: #536466;
  --blue: #587d8a;
  --red: #d8172f;
  --red-dark: #a91125;
  --amber: #c39a4a;
  --green: #267a5a;
  --shadow: 0 18px 48px rgba(26, 35, 38, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Barlow, Arial, sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0, #ffffff 300px, var(--soft) 300px),
    var(--soft);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img {
  max-width: 100%;
}

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

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: 5rem;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.08;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.ghost-button,
.completion-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.primary-button {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(216, 23, 47, 0.22);
}

.primary-button:hover {
  background: var(--red-dark);
}

.secondary-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--red);
  color: var(--red-dark);
}

.ghost-button {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.26);
  background: transparent;
  color: #ffffff;
}

.full-width {
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(170px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px 52px;
  background: rgb(48, 62, 73);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(26, 35, 38, 0.18);
}

.brand-link {
  display: inline-flex;
  width: 224px;
  align-items: center;
}

.brand-link img {
  display: block;
  width: 224px;
  height: 72px;
  object-fit: contain;
}

.topnav {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
}

.topnav a {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  line-height: 34px;
}

.topnav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.account-cluster {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: end;
  gap: 12px;
}

.account-cluster span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  padding: 0 52px 60px;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 54px;
  align-items: center;
  padding: 42px 0 48px;
}

.course-hero-copy p:not(.eyebrow) {
  max-width: 720px;
  font-size: 1.2rem;
}

.hero-guide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
  margin-top: -6px;
  padding: 20px 22px;
  border: 1px solid rgba(83, 100, 102, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 26px rgba(26, 35, 38, 0.06);
}

.hero-guide-section {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.hero-guide-section .eyebrow {
  margin-bottom: 0;
}

.hero-guide-section p:not(.eyebrow) {
  max-width: 62ch;
  margin-bottom: 0;
  color: #5f6b70;
  font-size: 1rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: -34px;
}

.hero-media {
  position: relative;
  overflow: hidden;
  border: 1px solid #22343b;
  border-radius: 8px;
  background: var(--graphite);
  box-shadow: var(--shadow);
}

.hero-media img {
  display: block;
  width: 100%;
  min-height: 290px;
  object-fit: cover;
}

.progress-band,
.workbook-band {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.progress-band div:first-child,
.progress-band div:last-child {
  display: grid;
  gap: 2px;
}

.progress-band span {
  color: var(--red);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
}

.progress-band strong {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecec;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--amber));
}

.workbook-band {
  grid-template-columns: minmax(0, 1fr) auto;
}

.workbook-band h2 {
  max-width: 760px;
  margin-bottom: 4px;
  font-size: 2rem;
}

.workbook-band p:last-child {
  margin-bottom: 0;
}

.section-heading {
  margin: 36px 0 18px;
}

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

.module-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(26, 35, 38, 0.09);
}

.module-card a {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.module-card:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease;
}

.module-card.is-locked {
  opacity: 0.54;
}

.module-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.module-card p {
  margin-bottom: 18px;
}

.module-poster {
  position: relative;
  display: grid;
  min-height: 360px;
  align-content: end;
  overflow: hidden;
  padding: 28px;
  color: #ffffff;
  isolation: isolate;
}

.module-poster::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12)),
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.13), transparent 28%);
  content: "";
}

.module-poster.is-compact {
  min-height: 220px;
  align-content: center;
}

.tone-brand {
  background: #2e4350;
}

.tone-red {
  background: var(--red);
}

.tone-graphite {
  background: var(--graphite);
}

.tone-steel {
  background: var(--steel);
}

.tone-blue {
  background: var(--blue);
}

.poster-author {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  max-width: calc(100% - 32px);
  align-items: center;
  gap: 9px;
  padding: 7px 11px 7px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.76);
  font-weight: 900;
}

.poster-author img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 2px solid #111111;
  border-radius: 50%;
  object-fit: cover;
}

.poster-author span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-duration {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
}

.poster-title span {
  display: block;
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
}

.poster-title strong {
  display: block;
  max-width: 680px;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.module-poster.is-compact .poster-title span {
  font-size: 2.1rem;
}

.module-poster.is-compact .poster-title strong {
  font-size: 1rem;
  line-height: 1.1;
}

.module-page {
  padding-top: 28px;
}

.module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.video-shell,
.lesson-panel,
.module-rail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.video-shell {
  padding: 18px;
}

.video-title-row {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.video-title-row h2 {
  max-width: 980px;
  margin-bottom: 0;
}

.duration-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.video-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #101010;
}

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

.video-placeholder {
  position: relative;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.video-placeholder .module-poster {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 28px;
}

.video-placeholder .poster-title span {
  font-size: 4rem;
}

.video-placeholder .poster-title strong {
  font-size: 2rem;
}

.play-control {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 74px;
  height: 56px;
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
}

.play-control::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid #ffffff;
  content: "";
  transform: translate(-38%, -50%);
}

.video-placeholder.was-played .play-control {
  background: var(--red);
}

.video-placeholder-label {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.completion-button {
  width: 100%;
  margin-top: 14px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.completion-button.is-complete {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.module-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.module-side {
  display: grid;
  gap: 18px;
}

.lesson-panel {
  padding: 24px;
}

.lesson-panel h3 {
  margin-bottom: 18px;
  font-size: 2rem;
  font-weight: 600;
}

.lesson-panel p:not(.eyebrow) {
  color: #4f5a60;
  font-size: 1.08rem;
}

.lesson-panel .primary-button {
  margin-top: 6px;
}

.lesson-panel .completion-button {
  margin-top: 2px;
  margin-bottom: 18px;
}

.module-rail {
  display: grid;
  overflow: hidden;
}

.module-rail a {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.module-rail a:last-child {
  border-bottom: 0;
}

.module-rail a:hover,
.module-rail a.is-active {
  background: #f7fafb;
}

.module-rail a.is-locked {
  opacity: 0.45;
}

.module-rail span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
}

.module-rail a.is-active span {
  background: var(--red);
  color: #ffffff;
}

.module-rail a.is-complete span {
  background: var(--green);
  color: #ffffff;
}

.module-rail strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.locked-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(48, 54, 56, 0.95), rgba(88, 125, 138, 0.82)),
    var(--graphite);
}

.locked-panel {
  width: min(640px, 100%);
  padding: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.locked-logo {
  display: block;
  width: 330px;
  max-width: 100%;
  margin-bottom: 34px;
  border-radius: 8px;
}

.locked-panel h1 {
  font-size: 3.6rem;
}

.status-message {
  padding: 12px 14px;
  border-radius: 6px;
  background: #fff3f5;
  color: var(--red-dark);
  font-weight: 800;
}

.loading-mark {
  width: 28px;
  height: 28px;
  border: 3px solid #d8e1e5;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1120px) {
  h1 {
    font-size: 4rem;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding-inline: 28px;
  }

  .topnav,
  .account-cluster {
    justify-content: start;
  }

  main {
    padding-inline: 28px;
  }

  .course-hero,
  .module-layout {
    grid-template-columns: 1fr;
  }

  .hero-guide {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

@media (max-width: 760px) {
  body {
    background: var(--soft);
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  main {
    padding-inline: 14px;
  }

  .topbar {
    padding-inline: 14px;
  }

  .brand-link,
  .brand-link img {
    width: 188px;
    height: 60px;
  }

  .topnav {
    width: 100%;
    overflow-x: auto;
  }

  .course-hero {
    padding-top: 28px;
  }

  .hero-guide {
    padding: 18px;
  }

  .hero-guide-section p:not(.eyebrow) {
    font-size: 0.96rem;
  }

  .hero-actions {
    margin-top: -40px;
  }

  .hero-media img {
    min-height: 220px;
  }

  .progress-band,
  .workbook-band {
    grid-template-columns: 1fr;
  }

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

  .module-poster,
  .module-poster.is-compact {
    min-height: 250px;
  }

  .poster-title span,
  .module-poster.is-compact .poster-title span,
  .video-placeholder .poster-title span {
    font-size: 2.35rem;
  }

  .poster-title strong,
  .module-poster.is-compact .poster-title strong,
  .video-placeholder .poster-title strong {
    font-size: 1.15rem;
  }

  .video-title-row,
  .module-nav-row {
    flex-direction: column;
  }

  .module-nav-row .primary-button,
  .module-nav-row .secondary-button {
    width: 100%;
  }

  .locked-panel {
    padding: 28px;
  }

  .locked-panel h1 {
    font-size: 2.6rem;
  }
}
