:root {
  color-scheme: light;
  --ink: #15222a;
  --muted: #62737c;
  --line: #d7e2e6;
  --surface: #ffffff;
  --soft: #f3f8f8;
  --teal: #006b70;
  --cyan: #0e99a4;
  --coral: #bf5142;
  --gold: #cf9430;
  --blue: #244f8f;
  --leaf: #5d7c49;
  --shadow: 0 20px 52px rgba(20, 37, 45, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(191, 81, 66, 0.13), transparent 28%),
    linear-gradient(125deg, rgba(0, 107, 112, 0.14), transparent 34%),
    linear-gradient(180deg, #fbfcfb 0%, #eef5f5 100%);
}

.elearning-body {
  min-height: 100vh;
  overflow-x: hidden;
}

.slide-app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.slide-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 48px);
}

.page-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

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

.top-actions a,
.top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(0, 107, 112, 0.22);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.slide-stage {
  display: grid;
  align-items: center;
  padding: clamp(18px, 4vw, 48px);
}

.learning-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.slide-copy h1 {
  max-width: 820px;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.98;
}

.slide-subtitle {
  margin: 20px 0 0;
  color: var(--teal);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.25;
}

.slide-body {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.slide-copy .button {
  margin-top: 26px;
}

.slide-card-grid {
  display: grid;
  gap: 16px;
}

.learning-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.link-card {
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(20, 37, 45, 0.16);
}

.simple-slide .slide-card-grid {
  align-self: stretch;
}

.original-link-grid {
  grid-template-columns: 1fr;
}

.original-link-grid .learning-card {
  min-height: 84px;
}

.original-link-grid .learning-card span {
  min-width: auto;
  height: auto;
  min-height: 42px;
  padding: 8px 14px;
  text-align: center;
}

.learning-card span {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 800;
}

.learning-card p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.slide-controls {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 14px;
  padding: 18px clamp(18px, 4vw, 48px) 24px;
}

.icon-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.icon-button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.slide-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b8c7ce;
  cursor: pointer;
}

.slide-dots button.active {
  width: 34px;
  border-radius: 999px;
  background: var(--teal);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(216, 226, 230, 0.84);
  background: rgba(251, 252, 252, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  color: var(--teal);
  background: rgba(0, 109, 119, 0.08);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 430px);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(42px, 7vw, 88px) clamp(18px, 4vw, 48px) 56px;
}

.hero-copy {
  max-width: 980px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 940px;
  font-size: clamp(54px, 9vw, 124px);
  line-height: 0.96;
}

h2 {
  font-size: clamp(30px, 4.2vw, 52px);
}

h3 {
  font-size: 24px;
}

.lead {
  max-width: 820px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.button.secondary {
  color: var(--teal);
  border: 1px solid rgba(0, 109, 119, 0.32);
  background: #fff;
}

.hero-panel,
.course-stats div,
.module-panel,
.access-grid article,
.timeline li,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-panel {
  overflow: hidden;
}

.panel-header {
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 107, 112, 0.96), rgba(36, 79, 143, 0.94)),
    linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15));
}

.panel-header h2 {
  font-size: 32px;
}

.panel-header .panel-kicker,
.panel-header p {
  color: rgba(255, 255, 255, 0.82);
}

.panel-header p {
  margin: 10px 0 0;
  line-height: 1.55;
}

.course-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.course-stats div {
  min-height: 124px;
  padding: 14px;
  box-shadow: none;
}

.metric {
  display: block;
  color: var(--coral);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.course-stats p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section {
  padding: 54px clamp(18px, 4vw, 48px);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 22px;
}

.section-heading.compact {
  max-width: 720px;
}

.section-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.module-player {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.embed-frame {
  width: 100%;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #101820;
  box-shadow: var(--shadow);
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

.module-panel {
  padding: 22px;
  align-content: center;
}

.module-panel p,
.access-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  font-weight: 700;
}

.catalog-grid,
.access-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.module-card,
.resource-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-height: 210px;
}

.module-card .number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 800;
}

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

.module-card .status {
  align-self: end;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.module-card .status.planned {
  background: var(--gold);
}

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

.resource-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(20, 37, 45, 0.16);
}

.resource-type {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--leaf);
  font-size: 12px;
  font-weight: 800;
}

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

.resource-card a,
.card-action {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.module-card .card-action {
  background: var(--teal);
}

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

.access-grid article {
  padding: 20px;
}

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

.timeline li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.timeline span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-weight: 800;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
  font-weight: 800;
}

.lesson-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 48px) 64px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px clamp(18px, 4vw, 48px) 72px;
}

.lesson-nav {
  position: sticky;
  top: 86px;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.lesson-nav a {
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.lesson-nav a:hover,
.lesson-nav a.active {
  color: var(--teal);
  border-color: rgba(0, 107, 112, 0.22);
  background: rgba(0, 107, 112, 0.08);
}

.lesson-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.lesson-content h1,
.page-shell h1 {
  font-size: clamp(42px, 7vw, 86px);
}

.lesson-lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.72;
}

.content-block {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.content-block h2 {
  font-size: clamp(26px, 3.2vw, 38px);
}

.learning-grid,
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.learning-grid div,
.prompt-grid div,
.table-card,
.quiz-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.learning-grid div {
  padding: 18px;
}

.learning-grid strong {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-size: 18px;
}

.learning-grid p,
.resource-callout p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.step-list li {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.step-list span {
  color: var(--teal);
  font-weight: 800;
}

.step-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.table-card {
  overflow-x: auto;
  margin-top: 18px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--teal);
  background: var(--soft);
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill-grid span {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--teal);
  border: 1px solid rgba(0, 107, 112, 0.24);
  background: #fff;
  font-weight: 800;
}

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

.prompt-grid div {
  padding: 18px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.5;
}

.resource-callout {
  padding: 24px;
  border: 1px solid rgba(0, 107, 112, 0.22);
  border-radius: 8px;
  background: rgba(0, 107, 112, 0.08);
}

.lesson-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
}

.quiz-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
}

.quiz-card fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quiz-card legend {
  padding: 0 6px;
  color: var(--teal);
  font-weight: 800;
}

.quiz-card label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1040px) {
  .hero,
  .module-player,
  .catalog-grid,
  .access-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

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

  .lesson-shell,
  .learning-grid,
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .lesson-nav {
    position: static;
  }

  .learning-slide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
  }

  .course-stats {
    grid-template-columns: 1fr;
  }

  .embed-frame,
  .embed-frame iframe {
    min-height: 280px;
  }

  .lesson-actions,
  .step-list li {
    grid-template-columns: 1fr;
  }

  .lesson-actions {
    flex-direction: column;
  }

  .slide-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

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