:root {
  --ink: #101417;
  --muted: #5b6760;
  --paper: #f6f4ee;
  --surface: #ffffff;
  --line: #ded8ca;
  --mint: #13b981;
  --mint-dark: #087555;
  --blue: #2f6bff;
  --gold: #f5b94a;
  --coral: #f26d5b;
  --shadow: 0 20px 60px rgba(16, 20, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "DengXian",
    Arial,
    sans-serif;
}

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(16, 20, 23, 0.08);
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--ink);
  color: var(--mint);
  font-weight: 900;
}

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

.brand strong {
  font-size: 17px;
}

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

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

.topnav a {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 14px;
}

.topnav a:hover {
  color: var(--ink);
  background: rgba(19, 185, 129, 0.11);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 46px 0 28px;
}

.hero-copy,
.steps article,
.timeline article {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 300px;
  padding: clamp(28px, 5vw, 54px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.hero-text,
.section-text {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

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

.button,
.mini-button,
.filter {
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.button.primary {
  background: var(--mint);
  color: #fff;
}

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

.button:hover,
.mini-button:hover,
.filter:hover {
  transform: translateY(-1px);
}

.section {
  padding: 54px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head.compact {
  align-items: start;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 560px;
  justify-content: flex-end;
  gap: 12px;
}

.search {
  display: flex;
  flex: 1 1 460px;
  min-width: min(520px, 100%);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
}

.search span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 38px;
  padding: 0 12px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.filter.active {
  border-color: var(--mint);
  background: var(--mint);
  color: #fff;
}

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

.course-card {
  display: grid;
  min-height: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.course-card.active {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(19, 185, 129, 0.13);
}

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8e4da;
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(135deg, #101417, #153b31);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 9px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.meta span {
  padding: 5px 8px;
  background: rgba(47, 107, 255, 0.1);
  color: #244fc0;
  font-size: 12px;
  font-weight: 800;
}

.meta span.free {
  background: rgba(19, 185, 129, 0.12);
  color: var(--mint-dark);
}

.course-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}

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

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.link-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.link-button.resource {
  border-color: var(--mint);
  background: rgba(19, 185, 129, 0.1);
  color: var(--mint-dark);
}

.link-button.disabled {
  cursor: not-allowed;
  color: #9a9a9a;
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: start;
}

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

.steps article,
.timeline article {
  padding: 22px;
  box-shadow: none;
}

.steps span,
.timeline span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 18px;
  background: var(--mint);
  color: #fff;
  font-weight: 900;
}

.steps strong,
.timeline strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.steps p,
.timeline p {
  color: var(--muted);
  line-height: 1.7;
}

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

.timeline article:nth-child(2) span {
  background: var(--blue);
}

.timeline article:nth-child(3) span {
  background: var(--gold);
  color: var(--ink);
}

.timeline article:nth-child(4) span {
  background: var(--coral);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 23, 0.62);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  border: 1px solid var(--line);
  background: #fff;
  padding: 28px;
  box-shadow: var(--shadow);
}

.icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.modal-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 20px;
}

.qr-mock {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 12px solid #fff;
  outline: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--ink) 10px, transparent 10px) 0 0 / 28px 28px,
    linear-gradient(var(--ink) 10px, transparent 10px) 0 0 / 28px 28px,
    #f8f8f8;
}

.qr-mock span {
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

.keyword {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  border: 1px solid var(--line);
  padding: 14px;
}

.keyword span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.keyword strong {
  font-size: 28px;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  background: var(--ink);
  color: #fff;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
  }

  .course-list,
  .steps,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .topbar,
  .section-head,
  .tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    min-width: 0;
  }

  .topnav {
    overflow-x: auto;
  }

  .course-list,
  .steps,
  .timeline,
  .modal-body {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  .hero-copy {
    padding: 28px;
  }
}
