:root {
  --ink: #151b21;
  --muted: #526273;
  --blue: #118cee;
  --teal: #16babe;
  --accent: #087981;
  --paper: #f1f2f3;
  --surface: #fff;
  --wash: #edf3f6;
  --line: #e1e7ed;
  --gutter: clamp(16px, 4.2vw, 76px);
  --section-space: clamp(44px, 6vw, 92px);
  --display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 14px/1.75 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
button { border: 0; padding: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
img { display: block; width: 100%; object-fit: cover; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(17px, 1.5vw, 23px); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 1.12em; height: 1.12em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.17em; }
.training-card button .icon, .community li button .icon { width: 17px; height: 17px; }

.wrap { width: min(calc(100% - 2 * var(--gutter)), 1420px); margin-inline: auto; }

/* Hero copy sits above the storefront image. */
.hero {
  position: relative;
  margin-top: clamp(16px, 3vw, 46px);
  background: var(--surface);
  text-align: center;
}
.hero-inner { padding: clamp(28px, 4.5vw, 68px) 18px clamp(22px, 3.5vw, 48px); }
.hero h1 { font-size: clamp(37px, 4.4vw, 72px); line-height: 1.13; letter-spacing: -.045em; }
.hero em { color: #086bab; font-style: normal; }
.hero .action { margin-top: 20px; }
.hero-art { aspect-ratio: 3.15; object-position: center 76%; }
.action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #151b21;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s, color .2s;
}
.action:hover { background: #086bab; }
.dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; }
.dots button { display: grid; place-items: center; width: 30px; height: 32px; }
.dots button::before { content: ""; width: 7px; height: 7px; background: #ffffff80; border-radius: 50%; box-shadow: 0 0 0 1px #18262b60; }
.dots [aria-pressed=true]::before { background: #fff; }

.content { padding-bottom: var(--section-space); }
.content > section, .knowledge-grid { margin-top: var(--section-space); scroll-margin-top: 24px; }
.grid, .live-grid, .training-grid, .knowledge-grid { display: grid; gap: clamp(16px, 2.5vw, 40px); }
.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Compact headings and photo cards on white surfaces. */
.section-head { margin-bottom: clamp(17px, 2.2vw, 32px); }
.section-head h2 { font-size: clamp(28px, 3vw, 47px); letter-spacing: -.035em; }
#courses .section-head { text-align: center; }
.card p, .training-card p { color: var(--muted); }
.section-actions { margin-top: 19px; text-align: center; }
.panel-head > button { display: inline-flex; align-items: center; gap: 5px; color: #0768ac; white-space: nowrap; }
.panel-head > button:hover, .card h3 button:hover { text-decoration: underline; }
.card { background: var(--surface); min-width: 0; }
.card h3 button { text-align: inherit; }
.card-body { padding: 16px 18px 20px; }
.card p, .training-card p { margin-top: 6px; }

#course-cards, #teacher-cards, #news-cards { gap: clamp(7px, 1vw, 14px); }
#course-cards img { aspect-ratio: 1.14; object-position: center 35%; }
#course-cards h3 { font-size: clamp(16px, 1.5vw, 23px); }

/* Wide feature banners followed by detail cards. */
.live-grid, .training-grid { grid-template-columns: 1fr; gap: 9px; }
.knowledge-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(315px, 34vw, 500px);
  padding: clamp(26px, 5vw, 76px);
  color: white;
  background-position: right center;
  background-repeat: no-repeat;
  background-size: cover, 64% auto;
}
.live-promo {
  background-color: #132a3f;
  background-image: linear-gradient(90deg, #132a3f 28%, #132a3fdf 43%, #132a3f00 77%), url(assets/live.webp);
  background-position: center, right 31%;
}
.training-promo {
  background-color: #15474c;
  background-image: linear-gradient(90deg, #15474c 28%, #15474ce8 43%, #15474c00 76%), url(assets/shop.webp);
  background-position: center, right 42%;
}
.promo .action { background: #fff; color: var(--ink); }
.promo .action:hover { background: #d9f2fb; }
.promo h2 { margin-top: 8px; font-size: clamp(28px, 3.1vw, 48px); }
.promo p { margin-top: 8px; }
.promo button { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.panel-head > button { font-size: 12px; }

.agenda {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
  padding: clamp(21px, 3vw, 42px);
}
.agenda ul { margin-top: 19px; }
.agenda li { display: flex; justify-content: space-between; gap: 12px; padding-block: 11px; }
.agenda time { white-space: nowrap; color: var(--muted); }

.training-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.training-card {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(9px, 1.6vw, 24px);
  background: var(--surface);
  padding: clamp(12px, 2vw, 26px);
}
.training-card img { aspect-ratio: 1.65; }
.training-card button, .community li button { color: var(--accent); min-width: 30px; min-height: 32px; }

.exam, .knowledge { background: var(--surface); padding: clamp(20px, 3vw, 44px); }
.exam {
  background: linear-gradient(140deg, #fff 60%, #e8f5fa);
}
.exam ul { margin-top: 15px; }
.exam li { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: var(--muted); }
.exam li .icon { color: var(--accent); }
.knowledge .grid { margin-top: 16px; gap: 10px; }
.knowledge .grid button { text-align: left; font-size: 12px; }
.knowledge img { aspect-ratio: 2.1; margin-bottom: 7px; }

.teacher img { aspect-ratio: 1.6; object-position: center top; background: var(--wash); }
.teacher h3 span {
  display: block;
  margin-top: 5px;
  font: 12px/1.6 "PingFang SC", sans-serif;
  color: var(--accent);
}
.lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(12px, 1.4vw, 22px);
}
.rank, .community {
  min-width: 0;
  background: var(--surface);
  padding: clamp(22px, 2.25vw, 34px) clamp(16px, 2vw, 30px);
}
.lower-grid .panel-head { flex-wrap: wrap; gap: 8px 12px; }
.lower-grid .panel-head h3 { font-size: clamp(18px, 1.55vw, 23px); }
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: var(--wash);
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.tabs button { padding: 4px 8px; border-radius: 5px; }
.tabs [aria-pressed=true] { background: var(--surface); color: var(--accent); font-weight: 600; }
.rank ol, .community ul { display: grid; margin-top: 24px; }
.rank ol { gap: 13px; }
.rank li {
  display: grid;
  grid-template-columns: 16px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 1vw, 13px);
  min-height: 52px;
}
.rank li > span:first-child { color: var(--muted); text-align: center; }
.rank li:nth-child(-n+3) > span:first-child { color: var(--accent); font-weight: 650; }
.rank img { width: 48px; height: 48px; border-radius: 50%; }
.rank li > span:last-child { white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.community { display: flex; flex-direction: column; }
.community ul { flex: 1; align-content: space-between; gap: 16px; }
.community li {
  display: grid;
  grid-template-columns: clamp(94px, 9.5vw, 132px) minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  line-height: 1.45;
}
.community li img { aspect-ratio: 1.3; border-radius: 5px; }
.community li small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.community li button { min-width: 0; }

.news img { aspect-ratio: 2; }
.news time { margin-top: 12px; font-size: 12px; color: var(--muted); }
.date-line { display: flex; align-items: center; gap: 7px; }

dialog { border: 1px solid var(--line); max-width: min(460px, 90vw); color: var(--ink); padding: 25px 28px; background: var(--surface); }
dialog::backdrop { background: #1025438f; }
dialog form { display: flex; justify-content: flex-end; }
dialog form button { display: grid; place-items: center; width: 32px; height: 32px; }
dialog p { margin-top: 12px; color: var(--muted); }

@media (max-width: 1050px) {
  .lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .hero h1 { font-size: clamp(29px, 7.7vw, 49px); }
  .hero-art { aspect-ratio: 1.55; object-position: center 75%; }
  .dots { bottom: 5px; }
  .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-grid, .training-list, #news-cards { grid-template-columns: 1fr; }
  .promo {
    justify-content: flex-end;
    min-height: clamp(310px, 80vw, 415px);
    background-size: cover;
  }
  .live-promo {
    background-image: linear-gradient(0deg, #132a3ffa, #132a3f72 47%, #132a3f00 78%), url(assets/live.webp);
    background-position: center, center 35%;
  }
  .training-promo {
    background-image: linear-gradient(0deg, #15474cfa, #15474c72 47%, #15474c00 78%), url(assets/shop.webp);
    background-position: center, center 39%;
  }
  .exam { min-height: 156px; }
  .teacher img { aspect-ratio: 1.6; }
  .card-body { padding: 11px 10px 14px; }
  .card p { font-size: 12px; }
  .agenda li { font-size: 12px; }
}

@media (max-width: 650px) {
  .lower-grid { grid-template-columns: 1fr; }
  .community li { grid-template-columns: clamp(82px, 23vw, 110px) minmax(0, 1fr) 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .action { transition: none; }
}
