:root {
  --c-bg: #f6f8fb;
  --c-surface: #ffffff;
  --c-ink: #0f1b2d;
  --c-ink-soft: #4a5a72;
  --c-muted: #8493a8;
  --c-primary: #1c5fe0;
  --c-primary-dark: #1346a8;
  --c-accent: #0fb39a;
  --c-gold: #d9a441;
  --c-line: #e3e9f2;
  --c-line-strong: #cdd7e6;
  --shadow-sm: 0 1px 3px rgba(15,27,45,.06), 0 1px 2px rgba(15,27,45,.04);
  --shadow-md: 0 8px 24px rgba(15,27,45,.08);
  --shadow-lg: 0 18px 48px rgba(15,27,45,.12);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,system-ui,sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.5px; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; color: var(--c-ink-soft); }
.muted { color: var(--c-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-line-strong); }
.btn-ghost:hover { border-color: var(--c-primary); background: #eef3fe; }
.btn-gold { background: var(--c-gold); color: #2a1d00; }
.btn-gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--c-ink); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px;
}
.brand small { display:block; font-size: 11px; font-weight: 500; color: var(--c-muted); letter-spacing: 1px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 8px; color: var(--c-ink-soft); font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--c-primary); background: #eef3fe; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--c-gold); color: #2a1d00;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
}
.hamburger { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--c-ink); }
.switcher { display: flex; gap: 6px; align-items: center; }
.switcher select {
  border: 1px solid var(--c-line-strong); background: #fff; color: var(--c-ink-soft);
  border-radius: 8px; padding: 6px 8px; font-size: 13px; font-family: inherit; cursor: pointer;
}
.switcher select:hover { border-color: var(--c-primary); }
@media (max-width: 640px) { .switcher select { padding: 5px 6px; font-size: 12px; } }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 520px;
  background: radial-gradient(60% 80% at 70% 0%, rgba(28,95,224,.10), transparent 70%),
              radial-gradient(50% 70% at 10% 10%, rgba(15,179,154,.10), transparent 70%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .eyebrow {
  display: inline-block; background: #eef3fe; color: var(--c-primary); font-weight: 600;
  font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero p.lead { font-size: 17px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; }
.hero-stats .num { font-size: 26px; font-weight: 800; color: var(--c-ink); }
.hero-stats .label { font-size: 13px; color: var(--c-muted); }
.hero-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 26px;
}
.hero-card .tag { font-size: 12px; color: var(--c-accent); font-weight: 700; letter-spacing: 1px; }
.hero-card .price { font-size: 32px; font-weight: 800; margin: 6px 0; }
.hero-card ul { list-style: none; padding: 0; margin: 16px 0 0; }
.hero-card li { padding: 8px 0; border-top: 1px dashed var(--c-line); font-size: 14px; color: var(--c-ink-soft); display: flex; gap: 8px; }
.hero-card li::before { content: "✓"; color: var(--c-accent); font-weight: 800; }

/* ---------- Sections / grids ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow { color: var(--c-primary); font-weight: 700; font-size: 13px; letter-spacing: 2px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: all .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-line-strong); }
.feature .ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: #eef3fe; color: var(--c-primary); font-size: 22px; margin-bottom: 16px;
}
.feature h3 { margin-bottom: 6px; }

/* ---------- Course cards ---------- */
.course-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: all .18s ease; display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-thumb { height: 150px; position: relative; display: grid; place-items: center; color: #fff; }
.course-thumb .lvl { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.28); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.course-thumb .cat { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.9); color: #0f1b2d; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.course-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 17px; margin-bottom: 8px; }
.course-meta { font-size: 13px; color: var(--c-muted); display: flex; gap: 14px; margin-bottom: 14px; }
.course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.course-price { font-size: 20px; font-weight: 800; color: var(--c-ink); }
.course-price s { font-size: 13px; color: var(--c-muted); font-weight: 400; margin-left: 6px; }
.course-price .free { color: var(--c-accent); }

/* ---------- Pricing ---------- */
.plan {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 18px;
  padding: 30px 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative;
}
.plan.popular { border-color: var(--c-primary); box-shadow: var(--shadow-md); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--c-primary); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 16px; border-radius: 999px; }
.plan .pname { font-size: 18px; font-weight: 800; }
.plan .pprice { font-size: 34px; font-weight: 800; margin: 10px 0 2px; }
.plan .pperiod { color: var(--c-muted); font-size: 13px; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan li { padding: 8px 0; font-size: 14px; color: var(--c-ink-soft); display: flex; gap: 8px; }
.plan li::before { content: "✓"; color: var(--c-accent); font-weight: 800; }

/* ---------- Steps (how it works) ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.step { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px; position: relative; }
.step .n { width: 36px; height: 36px; border-radius: 10px; background: var(--c-primary); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }
.step h3 { font-size: 16px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--c-muted); padding: 18px 0 0; }
.breadcrumb a:hover { color: var(--c-primary); }

/* ---------- Course detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; align-items: start; }
.detail-hero { border-radius: var(--radius); padding: 34px; color: #fff; margin-bottom: 26px; }
.detail-hero .lvl { display:inline-block; background: rgba(0,0,0,.25); padding: 4px 12px; border-radius: 999px; font-size: 12px; margin-bottom: 12px; }
.module { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; }
.module .mt { font-weight: 700; display: flex; justify-content: space-between; }
.module .ml { font-size: 13px; color: var(--c-muted); margin-top: 4px; }
.detail-side { position: sticky; top: 86px; }
.detail-side .box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.detail-side .big-price { font-size: 32px; font-weight: 800; }
.detail-side ul { list-style: none; padding: 0; margin: 16px 0; }
.detail-side li { padding: 7px 0; font-size: 14px; color: var(--c-ink-soft); display: flex; gap: 8px; }
.detail-side li::before { content: "✓"; color: var(--c-accent); font-weight: 800; }

/* ---------- Checkout / cart ---------- */
.cart-item { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
.cart-item .ci-thumb { width: 64px; height: 64px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; text-align: center; }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-title { font-weight: 700; }
.cart-item .ci-sub { font-size: 13px; color: var(--c-muted); }
.cart-item .ci-price { font-weight: 800; }
.cart-item .ci-remove { background: none; border: none; color: var(--c-muted); cursor: pointer; font-size: 18px; }
.cart-item .ci-remove:hover { color: #e23b3b; }
.summary-box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.summary-row.total { border-top: 1px solid var(--c-line); margin-top: 8px; padding-top: 14px; font-size: 18px; font-weight: 800; }
.empty { text-align: center; padding: 60px 20px; color: var(--c-muted); }
.empty .big { font-size: 48px; margin-bottom: 10px; }

/* payment placeholder */
.pay-method { border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 10px; }
.pay-method.active { border-color: var(--c-primary); background: #eef3fe; }
.pay-method .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--c-line-strong); }
.pay-method.active .radio { border-color: var(--c-primary); background: radial-gradient(circle, var(--c-primary) 40%, transparent 45%); }
.qr-box { text-align: center; padding: 20px; border: 1px dashed var(--c-line-strong); border-radius: var(--radius-sm); margin-top: 14px; }
.qr-box .qr { width: 160px; height: 160px; margin: 0 auto 12px; background: #fff; border: 1px solid var(--c-line); display: grid; place-items: center; color: var(--c-muted); font-size: 13px; }
.notice { background: #fff8e9; border: 1px solid #f3dca0; color: #7a5a00; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin-top: 14px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--c-line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; background: #fff; color: var(--c-ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(28,95,224,.12); }

/* ---------- FAQ / accordion ---------- */
.faq { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--c-muted); }
.faq[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 0 16px; color: var(--c-ink-soft); font-size: 14px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--c-primary), var(--c-accent)); color: #fff; border-radius: 20px; padding: 48px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); }
.cta-band .btn-gold { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: #0c1726; color: #b9c4d4; margin-top: 40px; padding: 54px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: #b9c4d4; font-size: 14px; display: block; padding: 5px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid #1c2a3d; margin-top: 36px; padding-top: 20px; font-size: 13px; color: #7d8aa0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0f1b2d; color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .detail-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--c-line); padding: 10px; gap: 2px; }
  .hamburger { display: block; }
  .grid-3, .grid-4, .grid-2, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 18px; }
  .cta-band { padding: 32px 22px; }
}

/* ---------- Footer legal links ---------- */
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 16px; }
.footer-legal a { color: #9fb0c8; font-size: 13px; display: inline; padding: 0; }
.footer-legal a:hover { color: #fff; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #0c1726; color: #e8eef7; box-shadow: 0 -8px 28px rgba(0,0,0,.28); padding: 14px 0; display: none; }
.cookie-banner.show { display: block; }
.cookie-banner .container { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 13.5px; flex: 1; min-width: 240px; color: #c4d0e2; }
.cookie-banner a { color: #7fd1ff; text-decoration: underline; }
.cookie-banner .ck-actions { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 9px 18px; font-size: 13px; }

/* ---------- Legal pages (privacy / terms) ---------- */
.legal { max-width: 840px; margin: 0 auto; line-height: 1.78; }
.legal h2 { font-size: 21px; margin: 30px 0 10px; }
.legal h3 { font-size: 16.5px; margin: 20px 0 6px; }
.legal p, .legal li { font-size: 14.5px; color: var(--c-ink); }
.legal ul { padding-left: 22px; }
.legal .updated { color: var(--c-muted); font-size: 13px; margin-bottom: 18px; }
.legal .note-box { background: #fff7e6; border: 1px solid #f0d9a; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13.5px; color: #6b5a1a; margin: 18px 0; }
