:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #165dff;          /* 品牌蓝（克制、非渐变） */
  --brand-2: #0b2f7a;        /* 深色标题 */
  --cta: #ff4d4f;            /* 下单/购买按钮 */
  --price: #ff4d4f;
  --ok: #16a34a;
  --warn: #f59e0b;
  --shadow: 0 6px 18px rgba(17,24,39,.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --max: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}
a{color:inherit}
img{max-width:100%;display:block}

.container{
  width:min(100%, var(--max));
  margin:0 auto;
  padding:0 16px;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:16px;
  top:12px;
  width:auto;
  height:auto;
  padding:8px 12px;
  border-radius:8px;
  background:#111827;
  color:#fff;
  z-index:9999;
}

/* Header */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(246,247,251,.92);
  backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 0;
  gap:12px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.brand-badge{
  width:36px;height:36px;
  border-radius:10px;
  background:var(--brand);
  box-shadow:0 10px 18px rgba(22,93,255,.18);
  display:grid;place-items:center;
  color:#fff;
  font-weight:800;
  letter-spacing:.5px;
}
.brand-title{
  display:flex;
  flex-direction:column;
  line-height:1.2;
}
.brand-title strong{font-size:14px;color:var(--brand-2)}
.brand-title span{font-size:12px;color:var(--muted)}

.nav{
  display:flex;
  align-items:center;
  gap:14px;
}
.nav a{
  text-decoration:none;
  font-size:14px;
  color:#111827;
  padding:8px 10px;
  border-radius:10px;
}
.nav a:hover{background:#eef2ff}
.nav a.active{background:#e8efff;color:#0b2f7a}

.nav-cta{
  display:flex;
  align-items:center;
  gap:10px;
}
.btn{
  appearance:none;
  border:1px solid transparent;
  background:#111827;
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-weight:650;
  font-size:14px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{transform:translateY(-1px); box-shadow:0 10px 18px rgba(17,24,39,.10)}
.btn:active{transform:translateY(0)}
.btn-secondary{
  background:#fff;
  color:#111827;
  border-color:var(--border);
}
.btn-secondary:hover{background:#fafafa}
.btn-brand{
  background:var(--brand);
}
.btn-cta{
  background:var(--cta);
}
.btn-cta:hover{box-shadow:0 10px 18px rgba(255,77,79,.18)}
.btn-small{padding:8px 12px;border-radius:10px;font-size:13px}

.menu-btn{
  display:none;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
.menu-btn span{display:block;width:18px;height:2px;background:#111827;position:relative}
.menu-btn span::before,
.menu-btn span::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;height:2px;
  background:#111827;
}
.menu-btn span::before{top:-6px}
.menu-btn span::after{top:6px}

/* Hero */
.hero{
  padding:22px 0 14px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:16px;
  align-items:stretch;
}
.hero-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.hero-copy{
  padding:18px 18px 14px;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#0b2f7a;
  background:#e8efff;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(22,93,255,.25);
}
.hero-copy h1{
  margin:10px 0 8px;
  font-size:26px;
  line-height:1.2;
  color:#0b2f7a;
  letter-spacing:-.2px;
}
.hero-copy p{margin:0;color:var(--muted);font-size:14px}
.hero-actions{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.hero-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  background:#f9fafb;
  border:1px solid var(--border);
  color:#111827;
  font-size:12px;
}
.pill b{color:#0b2f7a}

.hero-media{
  position:relative;
  min-height:240px;
}
.hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hero-stamp{
  position:absolute;
  right:12px;
  bottom:12px;
  background:rgba(17,24,39,.86);
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-size:12px;
  max-width:78%;
}
.hero-stamp b{display:block;font-size:13px}

/* Sections */
.section{
  padding:14px 0;
}
.section-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.section-title h2{
  margin:0;
  font-size:18px;
  color:#0b2f7a;
}
.section-title p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.grid{
  display:grid;
  gap:12px;
}
.grid-3{grid-template-columns: repeat(3, 1fr)}
.grid-2{grid-template-columns: repeat(2, 1fr)}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card-pad{padding:14px}

.course-card{
  text-decoration:none;
  display:flex;
  flex-direction:column;
  height:100%;
}
.course-media{
  position:relative;
  aspect-ratio: 16/10;
  overflow:hidden;
}
.course-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1);
  transition:transform .25s ease;
}
.course-card:hover .course-media img{transform:scale(1.03)}
.tag{
  position:absolute;
  top:10px; left:10px;
  font-size:12px;
  background:#111827;
  color:#fff;
  padding:4px 8px;
  border-radius:999px;
  opacity:.92;
}
.tag-cta{background:var(--cta)}
.tag-new{background:var(--ok)}
.tag-hot{background:#7c3aed}
.course-body{padding:12px 12px 10px}
.course-title{
  margin:0;
  font-size:14px;
  color:#111827;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:38px;
}
.course-desc{
  margin:6px 0 0;
  color:var(--muted);
  font-size:12px;
}
.price-row{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-top:10px;
}
.price{
  color:var(--price);
  font-weight:800;
  font-size:18px;
}
.price small{font-weight:700;font-size:12px}
.price-del{
  color:#9ca3af;
  font-size:12px;
  text-decoration:line-through;
}
.meta-row{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:8px;
  color:#9ca3af;
  font-size:12px;
}
.stars{color:#f59e0b}

.banner{
  background:linear-gradient(0deg, #ffffff, #ffffff);
  border:1px solid rgba(22,93,255,.18);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.banner-inner{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:12px;
  padding:14px;
  align-items:center;
}
.banner h3{margin:0;color:#0b2f7a;font-size:16px}
.banner p{margin:6px 0 0;color:var(--muted);font-size:13px}
.banner .right{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Course detail */
.crumbs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:13px;
  padding:12px 0 6px;
}
.crumbs a{color:#0b2f7a;text-decoration:none}
.detail-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:12px;
  align-items:start;
}
.detail-cover{
  aspect-ratio: 16/9;
  border-radius:var(--radius-md);
  overflow:hidden;
  border:1px solid var(--border);
}
.detail-cover img{width:100%;height:100%;object-fit:cover}
.detail-title{
  margin:10px 0 4px;
  font-size:20px;
  color:#0b2f7a;
  letter-spacing:-.2px;
}
.detail-sub{margin:0;color:var(--muted);font-size:13px}
.list{
  margin:10px 0 0;
  padding-left:18px;
  color:#111827;
  font-size:14px;
}
.list li{margin:6px 0}
.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:8px 10px;
  font-size:13px;
  color:#111827;
}
.kv div:nth-child(odd){color:var(--muted)}
.kv strong{color:#0b2f7a}

.panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow);
  padding:14px;
}
.panel h3{margin:0 0 10px;font-size:15px;color:#0b2f7a}
.divider{
  height:1px;
  background:var(--border);
  margin:12px 0;
}
.badge-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f9fafb;
  color:#111827;
}
.badge b{color:#0b2f7a}

/* Reviews */
.review{
  display:grid;
  grid-template-columns: 44px 1fr;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.avatar{
  width:44px;height:44px;border-radius:14px;
  background:#e8efff;
  display:grid;place-items:center;
  color:#0b2f7a;
  font-weight:800;
}
.review h4{margin:0;font-size:13px}
.review p{margin:6px 0 0;color:var(--muted);font-size:13px}
.review .small{margin-top:6px;font-size:12px;color:#9ca3af}

/* Order */
.order-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:12px;
  align-items:start;
}
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:10px;
}
.field label{font-size:13px;color:#111827;font-weight:650}
.field input,
.field select,
.field textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  font-size:14px;
  outline:none;
}
.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:rgba(22,93,255,.55);
  box-shadow:0 0 0 3px rgba(22,93,255,.12);
}
.help{font-size:12px;color:var(--muted)}
.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:13px;
  color:#111827;
  margin:10px 0 0;
}
.check input{margin-top:4px}
.summary{
  border:1px dashed rgba(255,77,79,.45);
  background:#fff;
  border-radius:16px;
  padding:14px;
}
.sum-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:14px;
  margin:8px 0;
}
.sum-row b{color:#0b2f7a}
.sum-total{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  padding-top:10px;
  margin-top:10px;
  border-top:1px solid var(--border);
}
.sum-total strong{font-size:18px;color:var(--cta)}
.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:#111827;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
  z-index:120;
  display:none;
  max-width:min(92vw,520px);
}

/* Footer */
.footer{
  margin-top:18px;
  background:#fff;
  border-top:1px solid var(--border);
}
.footer-inner{
  padding:16px 0;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:12px;
  align-items:start;
}
.footer p{margin:0;color:var(--muted);font-size:13px}
.footer a{color:#0b2f7a}
.foot-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  justify-content:flex-end;
}
.foot-links a{
  font-size:13px;
  color:#0b2f7a;
  text-decoration:none;
}
.foot-links a:hover{text-decoration:underline}
.beian{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
}

/* Floating buttons */
.back-to-top{
  position:fixed;
  right:14px;
  bottom:14px;
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:var(--shadow);
  cursor:pointer;
  display:none;
  z-index:110;
}
.back-to-top:hover{transform:translateY(-1px)}

.chat-fab{
  position:fixed;
  left:14px;
  bottom:14px;
  z-index:111;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-start;
}
.chat-btn{
  border:none;
  background:#111827;
  color:#fff;
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
  box-shadow:0 14px 24px rgba(0,0,0,.14);
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
}
.chat-btn small{
  display:block;
  font-size:11px;
  color:rgba(255,255,255,.78);
  margin-top:2px;
}
.chat-panel{
  width:min(92vw, 360px);
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  overflow:hidden;
  display:none;
}
.chat-head{
  padding:10px 12px;
  background:#0b2f7a;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.chat-head b{font-size:13px}
.chat-close{
  background:transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,.25);
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
  font-size:12px;
}
.chat-body{
  padding:10px 12px;
  background:#f9fafb;
  height:260px;
  overflow:auto;
}
.msg{
  display:flex;
  margin:8px 0;
  gap:8px;
}
.msg .bubble{
  max-width:85%;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  font-size:13px;
  color:#111827;
}
.msg.ai .bubble{background:#fff}
.msg.me{justify-content:flex-end}
.msg.me .bubble{
  background:#111827;
  color:#fff;
  border-color:transparent;
}
.chat-foot{
  padding:10px 12px;
  display:flex;
  gap:8px;
  background:#fff;
  border-top:1px solid var(--border);
}
.chat-foot input{
  flex:1;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 10px;
  outline:none;
  font-size:14px;
}
.chat-foot input:focus{
  border-color:rgba(22,93,255,.55);
  box-shadow:0 0 0 3px rgba(22,93,255,.12);
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr}
  .banner-inner{grid-template-columns:1fr}
  .detail-grid{grid-template-columns:1fr}
  .order-grid{grid-template-columns:1fr}
  .grid-3{grid-template-columns:repeat(2, 1fr)}
  .footer-inner{grid-template-columns:1fr}
  .foot-links{justify-content:flex-start}
}
@media (max-width: 560px){
  .grid-3{grid-template-columns:1fr}
  .nav{display:none}
  .menu-btn{display:inline-flex;align-items:center;justify-content:center}
  .topbar-inner{padding:10px 0}
}

/* Mobile nav drawer */
.drawer{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,.45);
  display:none;
  z-index:80;
}
.drawer.open{display:block}
.drawer-panel{
  position:absolute;
  top:0; right:0;
  width:min(92vw, 340px);
  height:100%;
  background:#fff;
  border-left:1px solid var(--border);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.drawer-panel a{
  text-decoration:none;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:650;
}
.drawer-panel a:hover{background:#fafafa}
.drawer-panel .muted{color:var(--muted);font-size:12px}
