/* WebEduTechKc26 - 独立视觉：深色顶栏 + 青绿主色，与参考项目区分 */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --ok: #059669;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1140px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.topbar-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.brand-title { font-weight: 700; font-size: 1.1rem; }
.brand-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 14px;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav .cta {
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
}
.nav .cta:hover { background: var(--primary-dark); }

.hero { padding: 32px 0 24px; }
.hero-card {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 0;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-left { padding: 28px 24px 24px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13, 148, 136, .25);
  border: 1px solid rgba(13, 148, 136, .4);
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
}
.hero h1 { margin: 14px 0 10px; font-size: 1.6rem; line-height: 1.25; color: #f8fafc; }
.hero p { margin: 0 0 16px; color: #94a3b8; line-height: 1.6; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s, transform .05s;
}
.btn:hover { background: #f8fafc; }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.25);
  color: #e2e8f0;
}
.btn-secondary:hover { background: rgba(255,255,255,.2); }
.hero-right {
  border-left: 1px solid rgba(255,255,255,.08);
  background: #0f172a;
  position: relative;
  min-height: 260px;
}
.hero-right img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-right .hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6) 100%);
  color: #fff;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
.metric {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 12px 10px;
}
.metric b { display: block; font-size: 15px; }
.metric span { display: block; font-size: 11px; opacity: .9; margin-top: 4px; }
.detail-badges { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #e2e8f0;
  font-size: 12px;
}
.pill b { color: #fff; }

.section { padding: 20px 0 32px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.section-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 18px; }
.grid.courses { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid.courses { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 740px) { .grid.courses { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

.course-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .1s;
}
.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.course-media {
  position: relative;
  aspect-ratio: 4/3;
  background: #e2e8f0;
}
.course-media img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-weight: 700;
}
.tag.hot { background: #b91c1c; }
.tag.new { background: var(--primary); }
.tag.pro { background: #7c3aed; }
.course-body { padding: 14px; }
.course-title {
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-desc {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price .now { color: var(--primary); font-weight: 800; font-size: 18px; }
.price .old { color: #94a3b8; font-size: 12px; text-decoration: line-through; }
.meta { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #94a3b8; }
.stars { display: inline-flex; gap: 2px; align-items: center; }
.star { width: 14px; height: 14px; display: inline-block; }

.info-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .info-strip { grid-template-columns: repeat(2, 1fr); } }
.strip-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.strip-item h3 { margin: 0 0 8px; font-size: 15px; }
.strip-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel.pad { padding: 20px; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.breadcrumb { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { opacity: .7; margin: 0 6px; }

.detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .detail-hero { grid-template-columns: 1fr; } }
.gallery {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  background: #e2e8f0;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }
.thumb.active { border-color: var(--primary); outline: none; }
.detail-title { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.detail-sub { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.detail-badges { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.detail-buy { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.detail-buy .btn { flex: 1; min-width: 160px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 740px) { .kv { grid-template-columns: repeat(2, 1fr); } }
.kv .k {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #f8fafc;
}
.kv .k b { display: block; font-size: 12px; }
.kv .k span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }

.list { display: grid; gap: 10px; margin-top: 10px; }
.li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
}
.li .dot {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: var(--primary-dark);
  font-weight: 800;
  flex-shrink: 0;
  font-size: 12px;
}
.li p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }

.review {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-name { font-weight: 700; }
.review-date { font-size: 12px; color: #94a3b8; }
.review-text { margin: 8px 0 0; color: var(--muted); line-height: 1.65; font-size: 13px; }

.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text); font-weight: 600; }
.field input, .field textarea, .field select {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  outline: none;
}
.field textarea { min-height: 88px; resize: vertical; }
.hint { font-size: 12px; color: #94a3b8; line-height: 1.5; }
.summary { display: grid; gap: 10px; }
.sum-line { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.sum-line b { color: var(--text); }
.sum-total { padding-top: 12px; border-top: 1px dashed var(--border); }
.sum-total .sum-line { font-size: 15px; }
.sum-total .money { color: var(--primary); font-weight: 800; }
.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
}

.footer { padding: 24px 0 32px; margin-top: 40px; color: var(--muted); }
.footer-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.foot-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-title { margin: 0 0 8px; font-weight: 800; color: var(--text); }
.foot-meta { margin: 0; font-size: 13px; line-height: 1.7; }
.foot-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.foot-links a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12px;
  color: var(--text);
}
.foot-links a:hover { background: var(--bg); }
.beian { margin-top: 12px; font-size: 12px; }
.beian a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.float-actions {
  position: fixed;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.float-actions.right { left: auto; right: 20px; }
.float-btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 16px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.float-btn.secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.float-btn .bubble { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.float-btn small { opacity: .9; }
.float-btn:active { transform: scale(0.97); }

.chat-panel {
  position: fixed;
  left: 20px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 40px));
  max-height: 72vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 70;
  display: none;
}
.chat-panel.open { display: block; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.chat-head b { font-size: 14px; }
.chat-head span { font-size: 12px; color: var(--muted); }
.chat-close { border: none; background: var(--bg); border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; font-size: 12px; }
.chat-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  max-height: calc(72vh - 120px);
  background: #f8fafc;
}
.msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); line-height: 1.55; font-size: 13px; }
.msg.me { margin-left: auto; background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.chat-foot { border-top: 1px solid var(--border); padding: 10px 12px; display: flex; gap: 8px; background: var(--card); }
.chat-foot input { flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 13px; outline: none; }
.chat-foot button { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #0f172a; color: #fff; cursor: pointer; font-size: 13px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-size: 12px; color: var(--text); }
.chip:hover { background: var(--bg); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  width: min(500px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-card header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-card header b { font-size: 15px; }
.modal-card .content { padding: 16px; }
.modal-card .content p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.modal-card .actions { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.hide { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; }

/* ===== 2026-03 Visual Refresh: layered, less monotonous ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe4f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #16a34a;
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
}

body {
  background:
    radial-gradient(1200px 400px at -10% -10%, rgba(37, 99, 235, .12), transparent 55%),
    radial-gradient(900px 360px at 110% -20%, rgba(14, 165, 233, .10), transparent 55%),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 42%, #f1f5f9 100%);
}

.topbar {
  background: rgba(255, 255, 255, .84);
  color: var(--text);
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
  backdrop-filter: blur(10px);
}
.brand-sub { color: #64748b; }
.nav a {
  color: #334155;
  border: 1px solid transparent;
}
.nav a:hover {
  color: #0f172a;
  background: #eef4ff;
  border-color: #dbeafe;
}
.nav .cta {
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  border: 0;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}
.nav .cta:hover { filter: brightness(.98); }

.hero { padding-top: 24px; }
.hero-card {
  background: linear-gradient(120deg, #0b1220 0%, #15243f 45%, #1d355d 100%);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 22px;
}
.hero-left { padding: 34px 30px 30px; }
.hero-kicker {
  background: rgba(96, 165, 250, .18);
  border-color: rgba(96, 165, 250, .36);
  color: #bfdbfe;
}
.hero h1 {
  font-size: 2rem;
  letter-spacing: -.02em;
}
.hero p {
  color: #c2d1ea;
  max-width: 58ch;
}
.hero-right { border-left-color: rgba(148, 163, 184, .2); }
.hero-right img { opacity: .82; }
.hero-metrics { gap: 12px; }
.metric {
  background: rgba(15, 23, 42, .34);
  border-color: rgba(148, 163, 184, .34);
}
.metric b { font-size: 16px; }
.metric span { color: #dbeafe; }

.btn {
  border-radius: 12px;
  border-color: #d5dfeb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}
.btn:hover { background: #f0f4fa; }
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 0;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .26);
}
.btn-primary:hover { filter: brightness(.98); }
.btn-secondary {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
  color: #eff6ff;
}

.pill {
  background: rgba(15, 23, 42, .08);
  border-color: rgba(148, 163, 184, .35);
  color: #1e293b;
}
.pill b { color: #0f172a; }
.hero .pill {
  background: rgba(255,255,255,.09);
  color: #e2e8f0;
}
.hero .pill b { color: #ffffff; }

.section { padding: 26px 0 34px; }
.section-head h2 {
  font-size: 1.35rem;
  letter-spacing: -.02em;
}
.section-head p { font-size: 13px; }

.course-card,
.panel,
.strip-item,
.review,
.li,
.footer-inner,
.modal-card,
.chat-panel {
  border-color: #d8e2ef;
  box-shadow: var(--shadow);
}

.course-card {
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 36px rgba(30, 41, 59, .14);
}
.course-media { background: #e8eef7; }
.course-body { padding: 15px; }
.course-title { font-size: 15px; }
.price .now {
  color: #1d4ed8;
  font-size: 20px;
}
.meta { color: #64748b; }

.tag {
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(2px);
}
.tag.hot {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.tag.new {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.tag.pro {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.strip-item {
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}
.strip-item h3 { font-size: 16px; }

.panel {
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.panel.pad { padding: 22px; }

.kv .k {
  border-style: solid;
  border-color: #dbe7f5;
  background: #f6f9ff;
}

.li {
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.li .dot {
  border-radius: 999px;
  background: #e8f0ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.li p { color: #334155; }

.notice {
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fff8db 0%, #fff3c4 100%);
  color: #8a5506;
}

.field input,
.field textarea,
.field select {
  border-color: #d6e0ee;
  background: #ffffff;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.footer { color: #64748b; }
.footer-inner {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}
.foot-title { color: #0f172a; }
.foot-links a {
  background: #f8fbff;
  border-color: #dbe7f5;
}
.foot-links a:hover { background: #edf4ff; }
.beian a { color: #1d4ed8; }

.float-btn {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 16px 30px rgba(15, 23, 42, .24);
}
.float-btn.secondary {
  background: #ffffff;
  border-color: #d8e2ef;
}

.chat-panel {
  border-radius: 16px;
  overflow: hidden;
}
.chat-body { background: #f5f8fe; }
.msg {
  border-color: #dbe5f2;
  background: #ffffff;
}
.msg.me {
  background: #eaf2ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

@media (max-width: 900px) {
  .hero h1 { font-size: 1.72rem; }
  .hero-left { padding: 24px 20px 20px; }
}

/* Accessibility and motion preferences */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .float-actions { left: 12px; bottom: 12px; }
  .float-actions.right { right: 12px; }
  .float-btn { padding: 10px 12px; font-size: 13px; }
  .chat-panel { left: 12px; width: calc(100vw - 24px); }
}

/* AI客服：右侧隐藏式停靠 + 悬停弹出 */
.float-actions[aria-label="客服入口"] {
  left: auto;
  right: -52px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transition: right .2s ease;
}
.float-actions[aria-label="客服入口"] .float-btn {
  border-radius: 999px 0 0 999px;
  padding-right: 18px;
}
.float-actions[aria-label="客服入口"]:hover {
  right: 0;
}

#chatPanel.chat-panel {
  left: auto;
  right: 20px;
  bottom: calc(144px + env(safe-area-inset-bottom));
}

@media (max-width: 900px) {
  .float-actions[aria-label="客服入口"] {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .float-actions[aria-label="客服入口"] .float-btn {
    border-radius: 999px;
    padding-right: 12px;
  }
  #chatPanel.chat-panel {
    right: 12px;
    bottom: calc(138px + env(safe-area-inset-bottom));
  }
}

/* Home aggressive revamp */
.home-announcement { padding-top: 14px; padding-bottom: 8px; }
.home-announcement-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.home-announcement-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.home-announcement-bar p { margin: 0; color: var(--muted); font-size: 14px; }

.home-quicknav { padding-top: 4px; padding-bottom: 8px; }
.home-quicknav-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
}
.home-quicknav-row::-webkit-scrollbar { height: 6px; }
.home-quicknav-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #dbe7f5;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  flex-shrink: 0;
}
.home-quicknav-item:hover { background: #eff6ff; color: #1d4ed8; }

.home-hero-revamp { padding-top: 8px; }
.home-hero-wrap {
  display: grid;
  grid-template-columns: 1.35fr .75fr;
  gap: 18px;
}
.home-hero-main {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .24);
  background: linear-gradient(135deg, #0f172a 0%, #172c4f 58%, #1d4ed8 100%);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}
.home-hero-main h1 {
  margin: 14px 0 12px;
  line-height: 1.2;
  color: #f8fafc;
  font-size: 2.1rem;
}
.home-hero-main p {
  margin: 0;
  color: #c6d4ee;
  line-height: 1.65;
}
.home-hero-main .detail-badges { margin-top: 14px; }
.home-hero-side h2 { margin: 0; font-size: 18px; }
.home-hero-side-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-statband { padding-top: 10px; padding-bottom: 8px; }
.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.home-stat {
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.home-stat b {
  display: block;
  font-size: 24px;
  color: #1d4ed8;
}
.home-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.home-mosaic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.home-mosaic-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}
.home-mosaic-card p {
  margin: 8px 0 12px;
  color: var(--muted);
}

.home-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.home-timeline-item {
  position: relative;
  overflow: hidden;
}
.home-timeline-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #0891b2);
}
.home-step {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 11px;
  font-weight: 700;
}
.home-timeline-item h3 { margin: 10px 0 8px; font-size: 16px; }
.home-timeline-item p { margin: 0; color: var(--muted); }

.home-sticky-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border-width: 2px;
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}
.home-sticky-cta-inner h2 { margin: 0; font-size: 1.45rem; }
.home-sticky-cta-inner p { margin: 6px 0 0; }
.home-sticky-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 1024px) {
  .home-hero-wrap { grid-template-columns: 1fr; }
  .home-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .home-mosaic-grid { grid-template-columns: 1fr 1fr; }
  .home-timeline-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .home-announcement-bar { grid-template-columns: 1fr; }
  .home-hero-main { padding: 22px 18px; }
  .home-hero-main h1 { font-size: 1.65rem; }
  .home-mosaic-grid { grid-template-columns: 1fr; }
  .home-sticky-cta-inner { grid-template-columns: 1fr; }
  .home-sticky-cta-actions { justify-content: flex-start; }
}

/* Global responsive hardening for all devices */
@media (max-width: 1200px) {
  .container { padding: 0 16px; }
}

@media (max-width: 992px) {
  .topbar-inner {
    min-height: auto;
    padding: 10px 0;
    align-items: flex-start;
  }
  .brand {
    min-width: 0;
    width: 100%;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
  }
  .section { padding: 20px 0 28px; }
  .panel.pad { padding: 16px; }
}

@media (max-width: 768px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-metrics { grid-template-columns: 1fr; }
  .info-strip { grid-template-columns: 1fr; }
  .grid.courses { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .foot-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .detail-buy .btn {
    min-width: 0;
    width: 100%;
  }
  .home-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .home-announcement-bar .btn { width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .container { padding: 0 12px; }
  .brand-badge { width: 34px; height: 34px; font-size: 12px; }
  .brand-title { font-size: 1rem; }
  .brand-sub { font-size: 10px; }
  .nav a {
    padding: 7px 10px;
    font-size: 13px;
  }
  .grid.courses { grid-template-columns: 1fr; }
  .home-stat-grid { grid-template-columns: 1fr; }
  .home-hero-main h1 { font-size: 1.45rem; }
  .home-hero-main p { font-size: 14px; }
  .home-sticky-cta-inner h2 { font-size: 1.2rem; }
  .chat-panel {
    width: calc(100vw - 24px);
    max-height: 68vh;
  }
}

@media (max-width: 420px) {
  .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .detail-badges { gap: 8px; }
  .detail-badges .pill { width: 100%; justify-content: center; }
  .home-quicknav-item {
    padding: 7px 10px;
    font-size: 12px;
  }
}
