/* ==========================================================
   VIHub 商业教育风主题（全站）
   设计令牌：
   - 主色   #5B4FE8（靛紫）   深  #4438C8 / #3528A6
   - 墨紫   #241A52（标题）   正文 #413A5F   次要 #7A7398
   - 页面底 #FFFFFF           浅紫底 #F5F3FF / #ECE9FF
   - 高亮黄 #FFC93C / #FFF4D1  橙 #FF7A3D  绿 #22C55E  红 #F2564D
   - 字体   Inter / Noto Sans SC
   本文件在 style.css 之后加载，负责全局字体、配色与
   按钮 / 卡片 / 表单 / 导航 / 页脚 / Hero 等"皮肤"，不改布局结构。
   ========================================================== */

:root {
  /* —— 主色板 —— */
  --vh-primary: #5b4fe8;
  --vh-primary-dark: #4438c8;
  --vh-primary-darker: #3528a6;
  --vh-ink: #241a52;
  --vh-text: #413a5f;
  --vh-text-muted: #8a83a8;
  --vh-text-soft: #5b5573;
  --vh-bg: #ffffff;
  --vh-bg-soft: #faf9ff;
  --vh-bg-lavender: #f5f3ff;
  --vh-bg-tint: #ece9ff;
  --vh-border: #e9e6f7;
  --vh-border-strong: #d8d3ee;
  --vh-yellow: #ffc93c;
  --vh-yellow-soft: #fff4d1;
  --vh-yellow-light: #ffe484;
  --vh-orange: #ff7a3d;
  --vh-green: #22c55e;
  --vh-green-bright: #34d399;
  --vh-green-dark: #16a34a;
  --vh-red: #f2564d;
  --vh-purple: #8b5cf6;
  --vh-blue: #3b82f6;

  --vh-radius-sm: 8px;
  --vh-radius: 10px;
  --vh-radius-lg: 14px;
  --vh-radius-xl: 18px;

  --vh-shadow-btn: 0 6px 16px rgba(91, 79, 232, 0.24);
  --vh-shadow-btn-sm: 0 3px 8px rgba(91, 79, 232, 0.18);
  --vh-shadow-card: 0 2px 10px rgba(31, 23, 70, 0.05);
  --vh-shadow-card-hover: 0 12px 28px rgba(91, 79, 232, 0.14);

  /* —— 覆盖旧的设计令牌，让所有用 var() 的地方同步换肤 —— */
  --brand-primary: #5b4fe8;
  --brand-accent: #241a52;
  --brand-highlight: #5b4fe8;
  --brand-highlight-soft: rgba(91, 79, 232, 0.1);
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-muted: #f5f3ff;
  --bg-secondary: #ece9ff;
  --text-primary: #413a5f;
  --text-primary-title: #241a52;
  --text-muted: #7a7398;
  --border-color: #e9e6f7;
  --danger: #f2564d;
  --radius: 10px;
}

/* ============ 字体与全局文字 ============ */

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Microsoft YaHei', sans-serif;
  background-color: #ffffff;
  color: var(--vh-text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body .serif-title {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  color: var(--vh-ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

html body a {
  color: var(--vh-primary);
  text-decoration: none;
}

html body a:hover {
  color: var(--vh-primary-dark);
}

::selection {
  background: var(--vh-yellow-light);
  color: var(--vh-ink);
}

/* 荧光笔高亮（标题下的黄色马克笔块） */
.vh-mark,
.ex-mark {
  position: relative;
  display: inline-block;
  z-index: 0;
}
.vh-mark::after,
.ex-mark::after {
  content: '';
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  bottom: 0.08em;
  height: 0.42em;
  background: var(--vh-yellow);
  border-radius: 3px;
  z-index: -1;
  transform: rotate(-0.5deg);
}

/* ============ 按钮 ============ */

html body .btn,
html body .btn-brand,
html body button,
html body .stc-btn-ghost,
html body .set-btn-ghost,
html body .util-btn {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--vh-radius);
  transition: all 0.18s ease;
}

/* 主按钮：实心靛紫，无描边，柔和投影 */
html body .btn-primary,
html body .btn-brand,
html body .btn-nav-primary,
html body button[type='submit'],
html body .util-btn.btn-primary {
  background: var(--vh-primary);
  border: 1px solid var(--vh-primary);
  color: #fff;
  box-shadow: var(--vh-shadow-btn);
}

html body .btn-primary:hover,
html body .btn-primary:focus,
html body .btn-brand:hover,
html body .btn-nav-primary:hover,
html body button[type='submit']:hover {
  background: var(--vh-primary-dark);
  border-color: var(--vh-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(91, 79, 232, 0.3);
}

html body .btn-primary:active,
html body .btn-brand:active,
html body button[type='submit']:active {
  background: var(--vh-primary-darker);
  border-color: var(--vh-primary-darker);
  transform: translateY(0);
}

html body .btn-primary:disabled,
html body .btn-primary.disabled {
  background: #c7c2e8;
  border-color: #c7c2e8;
  box-shadow: none;
}

/* 次按钮：白底紫字紫边 */
html body .btn-outline-primary,
html body .btn-nav-ghost,
html body .stc-btn-ghost,
html body .set-btn-ghost,
html body .btn-light {
  background: #fff;
  border: 1px solid var(--vh-primary);
  color: var(--vh-primary);
  box-shadow: none;
}

html body .btn-outline-primary:hover,
html body .btn-nav-ghost:hover,
html body .stc-btn-ghost:hover,
html body .set-btn-ghost:hover,
html body .btn-light:hover {
  background: var(--vh-bg-lavender);
  border-color: var(--vh-primary);
  color: var(--vh-primary-dark);
  transform: translateY(-1px);
}

html body .btn-link {
  color: var(--vh-primary);
  font-weight: 600;
}
html body .btn-link:hover {
  color: var(--vh-primary-dark);
}

html body .btn-danger,
html body .btn-outline-danger {
  background: transparent;
  border: 1px solid var(--vh-red);
  color: var(--vh-red);
  box-shadow: none;
}
html body .btn-danger {
  background: var(--vh-red);
  border-color: var(--vh-red);
  color: #fff;
}
html body .btn-danger:hover,
html body .btn-outline-danger:hover {
  background: #ff6b62;
  border-color: #ff6b62;
  color: #fff;
}

html body .btn-success {
  background: var(--vh-green);
  border: 1px solid var(--vh-green);
  color: #fff;
  box-shadow: var(--vh-shadow-btn-sm);
}
html body .btn-success:hover {
  background: var(--vh-green-dark);
  border-color: var(--vh-green-dark);
  color: #fff;
}

html body .btn-sm {
  border-radius: var(--vh-radius-sm);
  font-size: 0.8125rem;
}

/* ============ 卡片 / 面板 ============ */

html body .card,
html body .util-panel,
html body .util-mini-card,
html body .ce-card,
html body .cd-card {
  background: #fff;
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-lg);
  box-shadow: var(--vh-shadow-card);
}

html body .card:hover {
  box-shadow: var(--vh-shadow-card-hover);
}

html body .card-header {
  background: #fff;
  border-bottom: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-lg) var(--vh-radius-lg) 0 0 !important;
  font-weight: 700;
  color: var(--vh-ink);
}

/* ============ 表单 ============ */

html body .form-control,
html body .form-select,
html body .form-control-custom,
html body .util-input,
html body .util-textarea,
html body .ce-select,
html body input[type='text'],
html body input[type='email'],
html body input[type='password'],
html body input[type='number'],
html body input[type='search'],
html body input[type='url'],
html body textarea,
html body select {
  background: #fff;
  border: 1px solid var(--vh-border-strong);
  border-radius: var(--vh-radius);
  color: var(--vh-ink);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

html body .form-control:focus,
html body .form-select:focus,
html body .form-control-custom:focus,
html body .util-input:focus,
html body .util-textarea:focus,
html body .ce-select:focus,
html body textarea:focus,
html body select:focus,
html body input:focus {
  border-color: var(--vh-primary);
  box-shadow: 0 0 0 3px rgba(91, 79, 232, 0.14);
  outline: none;
}

html body label,
html body .form-label,
html body .util-label,
html body .ce-label {
  color: var(--vh-ink);
  font-weight: 600;
  font-size: 0.85rem;
}

html body ::placeholder {
  color: var(--vh-text-muted);
}

/* ============ 徽章 / 标签 ============ */

html body .badge,
html body .dz-badge {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.3em 0.75em;
}

html body .badge.bg-primary,
html body .badge-primary {
  background: var(--vh-bg-tint) !important;
  color: var(--vh-primary) !important;
}

/* ============ 分页 ============ */

html body .pagination .page-link {
  border: 1px solid var(--vh-border);
  color: var(--vh-text);
  font-weight: 600;
  border-radius: var(--vh-radius-sm) !important;
  margin: 0 3px;
}

html body .pagination .page-link:hover {
  background: var(--vh-bg-lavender);
  border-color: var(--vh-primary);
  color: var(--vh-primary);
}

html body .pagination .page-item.active .page-link {
  background: var(--vh-primary);
  border-color: var(--vh-primary);
  color: #fff;
  box-shadow: var(--vh-shadow-btn-sm);
}

/* ============ 表格 ============ */

html body .table {
  color: var(--vh-text);
}
html body .table > :not(caption) > * > * {
  background-color: transparent;
  color: inherit;
}
html body .table thead th {
  color: var(--vh-ink);
  font-weight: 700;
  border-bottom: 2px solid var(--vh-border-strong);
}
html body .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--vh-bg-soft);
}

/* ============ 模态框 / 下拉 ============ */

html body .modal-content {
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-lg);
  box-shadow: 0 24px 60px rgba(36, 26, 82, 0.2);
}
html body .modal-header {
  border-bottom: 1px solid var(--vh-border);
}
html body .dropdown-menu {
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius);
  box-shadow: 0 12px 32px rgba(36, 26, 82, 0.12);
}
html body .dropdown-item:hover {
  background: var(--vh-bg-lavender);
  color: var(--vh-primary);
}

/* ============ 导航栏 ============ */

html body .navbar-learnhub {
  background: #fff;
  border-bottom: 1px solid var(--vh-border);
  box-shadow: 0 2px 8px rgba(31, 23, 70, 0.04);
}

html body .navbar-top-line {
  height: 3px;
  background: linear-gradient(90deg, var(--vh-primary) 0%, var(--vh-purple) 60%, var(--vh-yellow) 100%);
}

html body .navbar-learnhub .nav-link {
  color: var(--vh-text);
  font-weight: 500;
  border-radius: var(--vh-radius-sm);
}

html body .navbar-learnhub .nav-link:hover {
  color: var(--vh-primary);
  background: var(--vh-bg-lavender);
}

html body .navbar-learnhub .nav-link.active,
html body .navbar-learnhub .nav-link.active:hover {
  color: var(--vh-primary);
  background: var(--vh-bg-lavender);
  font-weight: 700;
}

html body .navbar-brand-logo {
  background: linear-gradient(135deg, var(--vh-primary), var(--vh-purple));
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--vh-shadow-btn-sm);
}

html body .navbar-brand-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  color: var(--vh-ink);
  letter-spacing: -0.02em;
}

html body .btn-nav-primary {
  background: var(--vh-primary);
  border: 1px solid var(--vh-primary);
  box-shadow: var(--vh-shadow-btn-sm);
}
html body .btn-nav-primary:hover {
  background: var(--vh-primary-dark);
  border-color: var(--vh-primary-dark);
}

html body .btn-nav-ghost {
  background: #fff;
  border: 1px solid var(--vh-border-strong);
  color: var(--vh-text);
}
html body .btn-nav-ghost:hover {
  color: var(--vh-primary);
  border-color: var(--vh-primary);
  background: var(--vh-bg-lavender);
}

html body .navbar-avatar-fallback {
  background: linear-gradient(135deg, var(--vh-primary), var(--vh-purple));
}

/* 顶部公告条 */
.ex-topbar {
  background: #2f1f7a;
  color: #d9d3ff;
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.5rem 1rem;
}
.ex-topbar a {
  color: var(--vh-yellow);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ex-topbar a:hover {
  color: var(--vh-yellow-light);
}

/* ============ 页脚 ============ */

html body .lh-footer {
  background: var(--vh-bg-lavender);
  color: var(--vh-text);
  margin-top: 3.5rem;
  border-top: 1px solid var(--vh-border);
}

html body .lh-footer::before {
  background: linear-gradient(90deg, var(--vh-primary) 0%, var(--vh-purple) 60%, var(--vh-yellow) 100%);
}

html body .lh-brand-name {
  font-family: 'Inter', sans-serif;
  color: var(--vh-ink);
  font-weight: 800;
}

html body .lh-brand-desc {
  color: var(--vh-text-soft);
}

html body .lh-social-btn {
  border: 1px solid var(--vh-border-strong);
  background: #fff;
  color: var(--vh-text-soft);
}
html body .lh-social-btn:hover {
  background: var(--vh-primary);
  border-color: var(--vh-primary);
  color: #fff;
}

html body .lh-col-title {
  color: var(--vh-ink);
  font-weight: 700;
}

html body .lh-links a {
  color: var(--vh-text-soft);
}
html body .lh-links a:hover {
  color: var(--vh-primary);
}

html body .lh-subscribe-desc {
  color: var(--vh-text-soft);
}
html body .lh-subscribe input {
  border: 1px solid var(--vh-border-strong);
  background: #fff;
  color: var(--vh-ink);
}
html body .lh-subscribe input:focus {
  border-color: var(--vh-primary);
}
html body .lh-subscribe button {
  background: var(--vh-primary);
  border: 1px solid var(--vh-primary);
}
html body .lh-subscribe button:hover {
  background: var(--vh-primary-dark);
}
html body .lh-subscribe-tip {
  color: var(--vh-primary);
}

html body .lh-footer-bottom {
  border-top: 1px solid var(--vh-border);
}
html body .lh-bottom-inner {
  color: var(--vh-text-muted);
}
html body .lh-bottom-links a,
html body .lh-bottom-links span {
  color: var(--vh-text-soft);
}
html body .lh-bottom-links a:hover {
  color: var(--vh-primary);
}

html body .lh-to-top {
  background: var(--vh-primary);
  border: 1px solid var(--vh-primary);
  box-shadow: var(--vh-shadow-btn-sm);
}
html body .lh-to-top:hover {
  background: var(--vh-primary-dark);
}

/* ============ 首页 Hero（浅紫底 + 深色大字 + 搜索框） ============ */

html body .hm-hero {
  background:
    radial-gradient(circle at 1px 1px, rgba(91, 79, 232, 0.12) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(115deg, #f7f6ff 0%, #eff0ff 42%, #f8f5ff 100%);
  color: var(--vh-ink);
  border-bottom: 1px solid var(--vh-border);
}

html body .hm-hero::before {
  background: radial-gradient(circle, rgba(91, 79, 232, 0.14) 0%, transparent 70%);
}
html body .hm-hero::after {
  background: radial-gradient(circle, rgba(255, 201, 60, 0.22) 0%, transparent 70%);
}

html body .hm-hero-tag {
  background: var(--vh-bg-tint);
  border: 1px solid rgba(91, 79, 232, 0.25);
  color: var(--vh-primary);
  font-weight: 700;
}

html body .hm-hero-title {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 3.1rem;
  font-weight: 800;
  color: var(--vh-ink);
  letter-spacing: -0.03em;
  line-height: 1.18;
}

html body .hm-hero-sub {
  color: var(--vh-text-soft);
  font-size: 1.0625rem;
}

html body .hm-hero-stat-value {
  color: var(--vh-primary);
  font-weight: 800;
}
html body .hm-hero-stat-label {
  color: var(--vh-text-muted);
  font-weight: 500;
}
html body .hm-hero-stat {
  border-right: 1px solid var(--vh-border-strong);
}

html body .hm-btn-white {
  background: var(--vh-primary);
  border: 1px solid var(--vh-primary);
  color: #fff;
  box-shadow: var(--vh-shadow-btn);
}
html body .hm-btn-white:hover {
  background: var(--vh-primary-dark);
  border-color: var(--vh-primary-dark);
  color: #fff;
}
html body .hm-btn-ghost {
  background: #fff;
  border: 1px solid var(--vh-primary);
  color: var(--vh-primary);
}
html body .hm-btn-ghost:hover {
  background: var(--vh-bg-lavender);
  color: var(--vh-primary-dark);
}

/* Hero 搜索框 */
.hm-hero-search {
  display: flex;
  gap: 0.5rem;
  max-width: 560px;
  margin-top: 1.75rem;
}
.hm-hero-search input {
  flex: 1;
  height: 52px;
  padding: 0 1.25rem;
  border: 1px solid var(--vh-border-strong);
  border-radius: var(--vh-radius);
  background: #fff;
  font-size: 0.9375rem;
  color: var(--vh-ink);
  box-shadow: 0 2px 10px rgba(31, 23, 70, 0.04);
}
.hm-hero-search input:focus {
  border-color: var(--vh-primary);
  box-shadow: 0 0 0 3px rgba(91, 79, 232, 0.14);
  outline: none;
}
.hm-hero-search button {
  height: 52px;
  padding: 0 1.75rem;
  border: none;
  border-radius: var(--vh-radius);
  background: var(--vh-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: var(--vh-shadow-btn);
  cursor: pointer;
}
.hm-hero-search button:hover {
  background: var(--vh-primary-dark);
}

.hm-hero-hot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--vh-text-muted);
}
.hm-hero-hot a {
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--vh-border);
  color: var(--vh-text-soft);
  font-size: 0.8125rem;
}
.hm-hero-hot a:hover {
  background: var(--vh-bg-tint);
  border-color: var(--vh-primary);
  color: var(--vh-primary);
}

/* Hero 右侧卡片 */
html body .hm-hero-card {
  border: 1px solid var(--vh-border);
  box-shadow: 0 18px 44px rgba(91, 79, 232, 0.16);
}
html body .hm-hero-chip {
  background: linear-gradient(135deg, #ffb020, var(--vh-yellow));
  color: #3d2b00;
}
html body .hm-hero-course:hover {
  background: var(--vh-bg-lavender);
}
html body .hm-hero-card-foot {
  color: var(--vh-primary);
}
html body .hm-hero-card-foot:hover {
  background: var(--vh-bg-lavender);
  color: var(--vh-primary-dark);
}

/* ============ 首页区块与课程卡片 ============ */

html body .hm-section-title {
  color: var(--vh-ink);
  font-weight: 800;
}

html body .hm-cat-card {
  border: 1px solid var(--vh-border);
  box-shadow: var(--vh-shadow-card);
}
html body .hm-cat-card:hover {
  box-shadow: var(--vh-shadow-card-hover);
  border-color: rgba(91, 79, 232, 0.35);
}

html body .hm-course-card {
  border: 1px solid var(--vh-border);
  box-shadow: var(--vh-shadow-card);
}
html body .hm-course-card:hover {
  box-shadow: var(--vh-shadow-card-hover);
  border-color: rgba(91, 79, 232, 0.3);
}
html body .hm-course-badge {
  background: rgba(91, 79, 232, 0.92);
}
html body .hm-course-score {
  color: var(--vh-orange);
}
html body .hm-star {
  color: var(--vh-yellow);
}
html body .hm-free-tag {
  color: var(--vh-orange);
}

/* 分类胶囊 */
html body .hm-pill,
html body .hm-pills a,
html body .hm-pills button {
  border-radius: 999px;
  border: 1px solid var(--vh-border);
  background: #fff;
  color: var(--vh-text-soft);
  font-weight: 600;
}
html body .hm-pill.active,
html body .hm-pills a.active,
html body .hm-pills button.active,
html body .hm-pill:hover,
html body .hm-pills a:hover {
  background: var(--vh-primary);
  border-color: var(--vh-primary);
  color: #fff;
}

/* ============ 滚动条 / 焦点 ============ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--vh-bg-soft);
}
::-webkit-scrollbar-thumb {
  background: #d8d3ee;
  border-radius: 6px;
  border: 2px solid var(--vh-bg-soft);
}
::-webkit-scrollbar-thumb:hover {
  background: #b6aee0;
}

:focus-visible {
  outline: 2px solid var(--vh-primary);
  outline-offset: 2px;
}

/* ============ 代码块 ============ */

.note-code {
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius);
  overflow: hidden;
}
.note-code-head {
  background: var(--vh-bg-lavender);
  border-bottom: 1px solid var(--vh-border);
}

/* ============ 通用工具类 ============ */

html body .text-muted-custom {
  color: var(--vh-text-soft) !important;
}
html body .text-brand {
  color: var(--vh-primary) !important;
}
html body .text-price-free {
  color: var(--vh-green-dark) !important;
}
html body .bg-page {
  background-color: var(--vh-bg) !important;
}
html body .bg-white {
  background-color: #fff !important;
}

hr {
  border-color: var(--vh-border);
  opacity: 1;
}

/* ============ 首页课程分类：六边形语言网格 ============ */

.hm-hex-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 0.5rem 1rem;
  border-radius: var(--vh-radius-lg);
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.hm-hex-item:hover {
  transform: translateY(-4px);
  background: var(--vh-bg-soft);
  text-decoration: none;
}

/* 六边形：实色填充 + 深色描边 + 白色图标（Exercism 语言网格风） */
.hm-hex {
  position: relative;
  width: 108px;
  height: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hex, #5b4fe8);
}
.hm-hex-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hm-hex-shape polygon {
  fill: currentColor;
  stroke: color-mix(in srgb, currentColor 76%, #17113a);
  stroke-width: 7;
  stroke-linejoin: round;
}
.hm-hex-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.hm-hex-icon svg {
  display: block;
}

.hm-hex-name {
  font-weight: 800;
  font-size: 1.1875rem;
  color: #191534;
  letter-spacing: -0.02em;
  text-align: center;
}
.hm-hex-item:hover .hm-hex-name {
  color: var(--hex, #5b4fe8);
}

.hm-hex-count {
  font-size: 0.9375rem;
  color: var(--vh-text-muted);
}

/* 分类描边配色（按出现顺序循环） */
.hm-cat-grid > div:nth-child(8n+1) { --hex: #f97316; }
.hm-cat-grid > div:nth-child(8n+2) { --hex: #eab308; }
.hm-cat-grid > div:nth-child(8n+3) { --hex: #0ea5e9; }
.hm-cat-grid > div:nth-child(8n+4) { --hex: #22c55e; }
.hm-cat-grid > div:nth-child(8n+5) { --hex: #06b6d4; }
.hm-cat-grid > div:nth-child(8n+6) { --hex: #475569; }
.hm-cat-grid > div:nth-child(8n+7) { --hex: #6366f1; }
.hm-cat-grid > div:nth-child(8n+8) { --hex: #5b4fe8; }

@media (max-width: 767.98px) {
  .hm-hex { width: 80px; height: 88px; }
  .hm-hex-icon svg { width: 36px; height: 36px; }
  .hm-hex-name { font-size: 1rem; }
  .hm-hex-count { font-size: 0.8125rem; }
}

/* ============ 平台优势：六边形风格（与课程分类一致） ============ */

.hm-hex-feat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1.5rem 1rem 1.25rem;
  height: 100%;
}
.hm-hex-feat .hm-hex {
  width: 92px;
  height: 100px;
}
.hm-hex-feat .hm-hex-icon svg {
  width: 40px;
  height: 40px;
}

.hm-hex-feat-desc {
  font-size: 0.875rem;
  color: var(--vh-text-soft);
  line-height: 1.75;
  margin: 0;
  max-width: 250px;
}

/* 四个优势的主题色（沿用原卡片配色） */
.hm-feat-grid > div:nth-child(1) { --hex: #3b82f6; }
.hm-feat-grid > div:nth-child(2) { --hex: #8b5cf6; }
.hm-feat-grid > div:nth-child(3) { --hex: #16a34a; }
.hm-feat-grid > div:nth-child(4) { --hex: #f97316; }
