/* ==========================================================================
   Public course catalogue (/courses) and course page (/details)
   Loaded after /css/newstyle.css and uses its design tokens, so light / dark themes follow the site switch.
   Every class here starts with cx- so nothing collides with the older course-card rules in newstyle.css.
   ========================================================================== */

.cx {
  --cx-navy: #071938;
  --cx-navy-2: #0c2752;
  --cx-ink-soft: #a9bddf;
  --cx-wrap: 1240px;
  --cx-header: 78px;
  overflow-x: clip;
}
.cx-wrap { max-width: var(--cx-wrap); margin: 0 auto; padding: 0 24px; }
.cx em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.cx :focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 2px; border-radius: 6px; }

/* ---------- buttons ---------- */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.cx-btn i { font-size: 19px; }
.cx-btn:hover:not(:disabled) { transform: translateY(-2px); }
.cx-btn:disabled { opacity: .65; cursor: wait; }
.cx-btn-gold { background: var(--brand-gold); color: #071938; box-shadow: 0 10px 26px rgba(254, 189, 48, .3); }
.cx-btn-gold:hover:not(:disabled) { background: #ffcb4f; box-shadow: 0 14px 32px rgba(254, 189, 48, .42); }
.cx-btn-blue { background: var(--brand-blue); color: #fff; box-shadow: 0 10px 24px var(--brand-blue-glow); }
.cx-btn-blue:hover:not(:disabled) { background: var(--brand-blue-hover); }
.cx-btn-glass { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); color: #fff; }
.cx-btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.cx-btn-line { background: var(--bg-surface); border-color: var(--border-strong); color: var(--text-main); }
.cx-btn-line:hover:not(:disabled) { border-color: var(--brand-blue); color: var(--brand-blue); }
.cx-btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.cx-btn-block { width: 100%; }

/* ---------- section headings ---------- */
.cx-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 12px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--brand-blue);
}
.cx-kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--brand-gold); }
.cx-h2 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -1.4px; color: var(--text-main); }
.cx-h2 em { color: var(--brand-blue); }
.cx-sub { color: var(--text-muted); font-size: 16px; line-height: 1.65; max-width: 560px; }
.cx-section { padding: 96px 0; }
.cx-section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 34px; }

/* ==========================================================================
   Dark hero (both pages)
   ========================================================================== */
.cx-hero {
  position: relative; isolation: isolate; color: #fff;
  background: radial-gradient(1200px 520px at 85% -10%, rgba(59, 130, 246, .35), transparent 60%),
              radial-gradient(700px 420px at -5% 110%, rgba(254, 189, 48, .16), transparent 60%),
              linear-gradient(160deg, #061430 0%, #0a2250 55%, #071938 100%);
  padding: calc(var(--cx-header) + 64px) 0 88px;
}
.cx-hero::before { /* fine grid */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}
.cx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: center; }
.cx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(255, 255, 255, .06);
  font-size: 12px; font-weight: 700; color: #dbe7fb;
}
.cx-eyebrow b { padding: 3px 9px; border-radius: 999px; background: var(--brand-gold); color: #071938; font-size: 11px; letter-spacing: .4px; }
.cx-hero h1 { font-family: var(--font-display); font-size: clamp(40px, 5.2vw, 68px); line-height: 1.03; letter-spacing: -2.4px; margin-bottom: 22px; color: #fff; }
.cx-hero h1 em { color: var(--brand-gold); }
.cx-hero-lead { max-width: 580px; font-size: 18px; line-height: 1.65; color: var(--cx-ink-soft); margin-bottom: 32px; }
.cx-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cx-hero-copy .cx-hero-actions .cx-btn { padding: 0 15px; font-size: 13.5px; }
.cx-hero-copy .cx-hero-actions .cx-btn i { font-size: 18px; }

.cx-hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 44px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overflow: hidden;
}
.cx-hero-stat { padding: 16px 18px; border-left: 1px solid rgba(255, 255, 255, .1); min-width: 0; }
.cx-hero-stat:first-child { border-left: 0; }
.cx-hero-stat strong { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1.1; color: #fff; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.cx-hero-stat span { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--cx-ink-soft); }
.cx-hero-stat span i { color: var(--brand-gold); font-size: 14px; }

/* video showcase */
.cx-showcase { position: relative; }
.cx-showcase::before { content: ""; position: absolute; inset: -18px; border-radius: 30px; background: linear-gradient(135deg, rgba(254, 189, 48, .5), rgba(59, 130, 246, .4) 50%, transparent 80%); filter: blur(30px); opacity: .45; z-index: -1; }
.cx-showcase-card { border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px; background: rgba(7, 25, 56, .7); padding: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.cx-showcase-top { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; font-size: 13px; font-weight: 700; color: #dbe7fb; }
.cx-showcase-top .dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .2); animation: cx-pulse 2s infinite; }
.cx-video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.cx-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cx-showcase-foot { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 10px; padding: 14px 6px 4px; font-size: 12px; font-weight: 700; color: var(--cx-ink-soft); }
.cx-showcase-foot span { display: inline-flex; align-items: center; gap: 6px; }
.cx-showcase-foot i { color: var(--brand-gold); font-size: 16px; }
@keyframes cx-pulse { 50% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); } }

/* trust strip under the hero */
.cx-trust { position: relative; z-index: 2; margin-top: -34px; }
.cx-trust-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: 18px; box-shadow: var(--card-shadow);
}
.cx-trust-item { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-left: 1px solid var(--border-subtle); min-width: 0; }
.cx-trust-item:first-child { border-left: 0; }
.cx-trust-item i { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-gold-bg); color: var(--brand-gold-text); font-size: 21px; }
.cx-trust-item strong { display: block; font-family: var(--font-display); font-size: 14px; color: var(--text-main); }
.cx-trust-item span { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ==========================================================================
   Catalogue
   ========================================================================== */
.cx-catalog { padding: 84px 0 96px; }
.cx-toolbar {
  position: sticky; top: calc(var(--cx-header) + 10px); z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; margin-bottom: 28px;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border-card); border-radius: 18px; box-shadow: var(--card-shadow);
}
.cx-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cx-search { position: relative; flex: 1 1 260px; min-width: 0; }
.cx-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--text-subtle); pointer-events: none; }
.cx-search input {
  width: 100%; min-height: 46px; padding: 0 40px 0 44px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--bg-surface-subtle); color: var(--text-main); font-size: 14px; outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}
.cx-search input::placeholder { color: var(--text-subtle); }
.cx-search input:focus, .cx-select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px var(--brand-blue-glow); background: var(--bg-surface); }
.cx-search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 2px 7px; border: 1px solid var(--border-strong); border-radius: 6px; font: 600 11px var(--font-sans); color: var(--text-subtle); background: var(--bg-surface); }
.cx-select {
  min-width: 0; max-width: 100%; min-height: 46px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--bg-surface-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237e91ad' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none; appearance: none; color: var(--text-main); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; outline: none;
}
.cx-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--bg-surface-subtle); color: var(--text-main);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; user-select: none;
}
.cx-toggle i { font-size: 18px; color: var(--success-green); }
.cx-toggle[aria-pressed="true"] { background: var(--success-green-bg); border-color: var(--success-green); color: #047857; }
[data-theme="dark"] .cx-toggle[aria-pressed="true"], :root:has(#theme-toggle:checked) .cx-toggle[aria-pressed="true"] { color: #6ee7b7; background: rgba(16, 185, 129, .14); }

.cx-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex: 1 1 auto; }
.cx-chips::-webkit-scrollbar { display: none; }
.cx-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-surface); color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: all var(--transition-fast);
}
.cx-chip:hover { color: var(--brand-blue); border-color: var(--brand-blue); }
.cx-chip small { padding: 1px 7px; border-radius: 999px; background: var(--bg-surface-subtle); font-size: 11px; font-weight: 800; color: var(--text-subtle); }
.cx-chip[aria-pressed="true"] { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; box-shadow: 0 8px 18px var(--brand-blue-glow); }
.cx-chip[aria-pressed="true"] small { background: rgba(255, 255, 255, .2); color: #fff; }
.cx-result-count { margin-left: auto; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.cx-result-count strong { color: var(--text-main); }

.cx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cx-group-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 26px 0 2px; }
.cx-group-head:first-child { margin-top: 0; }
.cx-group-head h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: -.4px; color: var(--text-main); }
.cx-group-head span { font-size: 12px; font-weight: 800; color: var(--brand-blue); background: var(--bg-pill); padding: 3px 10px; border-radius: 999px; }
.cx-group-head::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

/* course card */
.cx-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(11, 29, 58, .04), 0 10px 30px rgba(11, 29, 58, .05);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  animation: cx-rise .5s ease-out both;
}
.cx-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand-blue) 45%, var(--border-card)); box-shadow: var(--card-shadow-hover); }
.cx-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-surface-subtle); }
.cx-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.cx-card:hover .cx-card-media img { transform: scale(1.06); }
.cx-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 25, 56, 0) 45%, rgba(7, 25, 56, .55)); pointer-events: none; }
.cx-card-cat, .cx-card-rating, .cx-card-demo {
  position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .2px;
}
.cx-card-cat { top: 12px; left: 12px; background: rgba(7, 25, 56, .82); color: #fff; border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cx-card-rating { top: 12px; right: 12px; background: rgba(255, 255, 255, .94); color: #071938; }
.cx-card-rating i { color: #f59e0b; }
.cx-card-demo { left: 12px; bottom: 12px; background: var(--success-green); color: #fff; box-shadow: 0 6px 16px rgba(16, 185, 129, .4); }
.cx-card-body { display: flex; flex-direction: column; flex: 1; gap: 12px; padding: 20px 20px 18px; }
.cx-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.cx-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; border: 1px solid var(--border-strong); color: var(--text-muted); background: var(--bg-surface-subtle); }
.cx-tag i { font-size: 12px; }
.cx-tag-new { background: #16a34a; border-color: #16a34a; color: #fff; }
.cx-tag-trend { background: var(--brand-gold-bg); border-color: var(--brand-gold); color: var(--brand-gold-text); }
.cx-tag-vert { background: var(--bg-pill); border-color: transparent; color: var(--brand-blue); }
.cx-card h3 { font-family: var(--font-display); font-size: 19px; line-height: 1.28; letter-spacing: -.3px; color: var(--text-main); }
.cx-card h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size var(--transition-smooth), color var(--transition-fast); }
.cx-card h3 a:hover { color: var(--brand-blue); background-size: 100% 2px; }
.cx-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* whole card is the link */
.cx-card-desc { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-card-stats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: auto; border: 1px solid var(--border-subtle); border-radius: 14px; overflow: hidden; background: var(--border-subtle); }
.cx-card-stats li { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; background: var(--bg-surface-subtle); min-width: 0; }
.cx-card-stats strong { display: flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; }
.cx-card-stats strong i { font-size: 15px; color: var(--brand-blue); }
.cx-card-stats span { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-card-stats.is-loading li { animation: cx-shimmer 1.4s ease-in-out infinite; }
.cx-card-actions { position: relative; z-index: 1; display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.cx-card-actions .cx-btn-blue { flex: 1; }
.cx-card-actions .cx-btn-demo { background: var(--success-green-bg); border-color: rgba(16, 185, 129, .35); color: #047857; }
.cx-card-actions .cx-btn-demo:hover { background: var(--success-green); color: #fff; border-color: var(--success-green); }
[data-theme="dark"] .cx-card-actions .cx-btn-demo, :root:has(#theme-toggle:checked) .cx-card-actions .cx-btn-demo { background: rgba(16, 185, 129, .14); color: #6ee7b7; }
.cx-icon-btn {
  flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: var(--brand-gold-bg); border: 1px solid var(--brand-gold); color: var(--brand-gold-text); font-size: 18px;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.cx-icon-btn:hover:not(:disabled) { background: var(--brand-gold); color: #071938; transform: translateY(-2px); }
.cx-icon-btn:disabled { cursor: wait; }

.cx-skeleton { min-height: 440px; border-radius: 20px; border: 1px solid var(--border-card); background: var(--bg-card); overflow: hidden; }
.cx-skeleton::before { content: ""; display: block; aspect-ratio: 16 / 9; background: var(--bg-surface-subtle); animation: cx-shimmer 1.4s ease-in-out infinite; }
.cx-skeleton i { display: block; height: 14px; margin: 18px 20px 0; border-radius: 6px; background: var(--bg-surface-subtle); animation: cx-shimmer 1.4s ease-in-out infinite; }
.cx-skeleton i:nth-child(2) { width: 60%; }
@keyframes cx-shimmer { 50% { opacity: .45; } }
@keyframes cx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cx-empty { grid-column: 1 / -1; text-align: center; padding: 70px 20px; border: 1px dashed var(--border-strong); border-radius: 20px; background: var(--bg-surface); color: var(--text-muted); }
.cx-empty i { font-size: 44px; color: var(--brand-blue); }
.cx-empty h3 { margin: 10px 0 6px; font-family: var(--font-display); font-size: 20px; color: var(--text-main); }
.cx-empty .cx-btn { margin-top: 16px; }

/* ---------- "every course includes" ---------- */
.cx-features { background: var(--bg-surface-subtle); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.cx-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cx-feature { padding: 26px 22px; background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: 18px; transition: transform var(--transition-smooth), box-shadow var(--transition-smooth); }
.cx-feature:hover { transform: translateY(-4px); box-shadow: var(--card-shadow); }
.cx-feature i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 24px; color: #fff; background: linear-gradient(135deg, var(--brand-blue), #3b82f6); margin-bottom: 18px; }
.cx-feature:nth-child(2) i { background: linear-gradient(135deg, #f59e0b, var(--brand-gold)); color: #071938; }
.cx-feature:nth-child(3) i { background: linear-gradient(135deg, #059669, #10b981); }
.cx-feature:nth-child(4) i { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.cx-feature h3 { font-family: var(--font-display); font-size: 17px; color: var(--text-main); margin-bottom: 6px; }
.cx-feature p { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }

/* ---------- demo band ---------- */
.cx-demo-band {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 30px; align-items: center;
  padding: 44px 48px; border-radius: 26px; color: #fff;
  background: radial-gradient(500px 260px at 100% 0, rgba(254, 189, 48, .3), transparent 70%), linear-gradient(135deg, #0a2250, #071938);
  box-shadow: var(--card-shadow-hover);
}
.cx-demo-band h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -1px; margin-bottom: 10px; }
.cx-demo-band h2 em { color: var(--brand-gold); }
.cx-demo-band p { color: var(--cx-ink-soft); font-size: 15px; line-height: 1.6; max-width: 560px; }
.cx-demo-band .cx-hero-actions { justify-content: flex-end; }

/* ---------- FAQ ---------- */
.cx-faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.cx-faq-aside { position: sticky; top: calc(var(--cx-header) + 30px); }
.cx-faq-aside .cx-btn { margin-top: 22px; }
.cx-faq-list { display: grid; gap: 10px; }
.cx-faq-list details { background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: 16px; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.cx-faq-list details[open] { border-color: color-mix(in srgb, var(--brand-blue) 40%, var(--border-card)); box-shadow: var(--card-shadow); }
.cx-faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text-main); }
.cx-faq-list summary::-webkit-details-marker { display: none; }
.cx-faq-list summary::after { content: "+"; flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-pill); color: var(--brand-blue); font-size: 18px; font-weight: 800; transition: transform var(--transition-fast); }
.cx-faq-list details[open] summary::after { transform: rotate(45deg); }
.cx-faq-list .faq-answer { padding: 0 20px 18px; color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }

/* ==========================================================================
   Course page (/details)
   ========================================================================== */
.cx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 26px; font-size: 13px; font-weight: 600; color: var(--cx-ink-soft); }
.cx-crumbs a { color: #dbe7fb; }
.cx-crumbs a:hover { color: var(--brand-gold); }
.cx-crumbs i { font-size: 16px; opacity: .6; }
.cx-crumbs span { color: #fff; }
.cx-detail-hero { padding-bottom: 120px; }
.cx-detail-hero .cx-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: start; }
.cx-detail-hero h1 { font-size: clamp(36px, 4.6vw, 60px); }
.cx-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); color: #dbe7fb; }
.cx-pill i { font-size: 15px; color: var(--brand-gold); }
.cx-pill-new { background: #16a34a; border-color: #16a34a; color: #fff; }
.cx-pill-new i, .cx-pill-demo i { color: #fff; }
.cx-pill-demo { background: rgba(16, 185, 129, .2); border-color: rgba(16, 185, 129, .5); color: #a7f3d0; }
.cx-hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; font-size: 13px; font-weight: 600; color: var(--cx-ink-soft); }
.cx-hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.cx-hero-meta i { font-size: 18px; color: var(--brand-gold); }
.cx-hero-meta .star { color: #fbbf24; }

.cx-cover { position: relative; border-radius: 22px; padding: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.cx-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #0c2752; }
.cx-cover-badge { position: absolute; left: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(7, 25, 56, .85); color: #fff; font-size: 12px; font-weight: 700; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cx-cover-badge i { color: var(--brand-gold); font-size: 16px; }

.cx-statbar { position: relative; z-index: 2; margin-top: -72px; }
.cx-statbar-inner { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); background: var(--bg-surface); border: 1px solid var(--border-card); border-top: 3px solid var(--brand-gold); border-radius: 20px; box-shadow: var(--card-shadow-hover); overflow: hidden; }
.cx-statbar-item { padding: 20px 22px; border-left: 1px solid var(--border-subtle); min-width: 0; }
.cx-statbar-item:first-child { border-left: 0; }
.cx-statbar-item i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-pill); color: var(--brand-blue); font-size: 19px; margin-bottom: 10px; }
.cx-statbar-item strong { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.6px; color: var(--text-main); font-variant-numeric: tabular-nums; }
.cx-statbar-item span { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--text-muted); }

.cx-detail-body { padding: 56px 0 100px; }
.cx-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.cx-panel { background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: 20px; padding: 30px; box-shadow: 0 1px 2px rgba(11, 29, 58, .04), 0 10px 30px rgba(11, 29, 58, .04); }
.cx-panel + .cx-panel { margin-top: 24px; }
.cx-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cx-panel h2 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; letter-spacing: -.4px; color: var(--text-main); }
.cx-panel h2 i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--bg-pill); color: var(--brand-blue); font-size: 20px; }
.cx-prose { color: var(--text-muted); font-size: 16px; line-height: 1.8; }
.cx-prose p + p { margin-top: 12px; }
.cx-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.cx-highlight { display: flex; gap: 12px; padding: 16px; border-radius: 14px; background: var(--bg-surface-subtle); border: 1px solid var(--border-subtle); }
.cx-highlight i { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--success-green-bg); color: var(--success-green); font-size: 18px; }
[data-theme="dark"] .cx-highlight i, :root:has(#theme-toggle:checked) .cx-highlight i { background: rgba(16, 185, 129, .14); }
.cx-highlight strong { display: block; font-size: 14px; color: var(--text-main); }
.cx-highlight span { display: block; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-top: 2px; }

/* curriculum accordion */
.cx-curr-summary { font-size: 13px; color: var(--text-muted); }
.cx-link-btn { background: none; border: 0; color: var(--brand-blue); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 0; }
.cx-link-btn:hover { text-decoration: underline; }
.cx-chapters { display: grid; gap: 10px; counter-reset: ch; }
.cx-chapter { border: 1px solid var(--border-card); border-radius: 16px; background: var(--bg-surface); overflow: hidden; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.cx-chapter[open] { border-color: color-mix(in srgb, var(--brand-blue) 40%, var(--border-card)); box-shadow: 0 10px 30px rgba(11, 29, 58, .06); }
.cx-chapter summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.cx-chapter summary::-webkit-details-marker { display: none; }
.cx-ch-num { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-gold-bg); border: 1px solid var(--brand-gold); color: var(--brand-gold-text); font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.cx-ch-text { flex: 1; min-width: 0; }
.cx-ch-text small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-blue); }
.cx-ch-text strong { display: block; font-family: var(--font-display); font-size: 16px; line-height: 1.35; color: var(--text-main); }
.cx-ch-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cx-ch-meta span { padding: 3px 9px; border-radius: 999px; background: var(--bg-surface-subtle); border: 1px solid var(--border-subtle); font-size: 11.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.cx-ch-chev { flex: 0 0 auto; font-size: 22px; color: var(--text-subtle); transition: transform var(--transition-fast); }
.cx-chapter[open] .cx-ch-chev { transform: rotate(180deg); color: var(--brand-blue); }
.cx-chapter:not(.has-topics) summary { cursor: default; }
.cx-chapter:not(.has-topics) .cx-ch-chev { display: none; }
.cx-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 18px 18px 74px; }
.cx-topic { padding: 14px 16px; border-radius: 12px; background: var(--bg-surface-subtle); border: 1px solid var(--border-subtle); border-left: 3px solid var(--brand-blue); }
.cx-topic h4 { font-size: 14px; font-weight: 700; color: var(--text-main); line-height: 1.4; }
.cx-topic ul { list-style: none; margin-top: 8px; display: grid; gap: 5px; }
.cx-topic li { position: relative; padding-left: 14px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.cx-topic li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--brand-gold); }
.cx-curr-note { margin-top: 14px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* sidebar */
.cx-aside { position: sticky; top: calc(var(--cx-header) + 22px); display: grid; gap: 18px; }
.cx-aside-card { background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: 20px; padding: 22px; box-shadow: var(--card-shadow); }
.cx-aside-card h3 { font-family: var(--font-display); font-size: 17px; color: var(--text-main); margin-bottom: 14px; }
.cx-aside-demo { background: linear-gradient(160deg, #0a2250, #071938); border-color: transparent; color: #fff; }
.cx-aside-demo h3 { color: #fff; margin-bottom: 6px; }
.cx-aside-demo p { color: var(--cx-ink-soft); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
.cx-aside-actions { display: grid; gap: 10px; }
.cx-checks { list-style: none; display: grid; gap: 11px; }
.cx-checks li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.cx-checks i { color: var(--success-green); font-size: 18px; flex: 0 0 auto; }
.cx-aside-list { list-style: none; display: grid; gap: 0; }
.cx-aside-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-subtle); font-size: 13.5px; color: var(--text-muted); }
.cx-aside-list li:first-child { border-top: 0; padding-top: 0; }
.cx-aside-list li span { display: inline-flex; align-items: center; gap: 8px; }
.cx-aside-list li i { color: var(--brand-blue); font-size: 17px; }
.cx-aside-list li strong { font-family: var(--font-display); color: var(--text-main); font-size: 15px; }

.cx-state { padding: calc(var(--cx-header) + 120px) 20px 140px; text-align: center; color: var(--text-muted); }
.cx-state i { font-size: 46px; color: var(--brand-blue); }
.cx-state p { margin-top: 12px; font-size: 15px; }
.cx-state .cx-btn { margin-top: 20px; }

/* mobile sticky action bar on the course page */
.cx-mobile-bar { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .cx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-hero-grid, .cx-detail-hero .cx-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .cx-detail-hero .cx-cover { max-width: 560px; }
  .cx-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-detail-grid { grid-template-columns: 1fr; }
  .cx-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-statbar-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cx-statbar-item:nth-child(3n + 1) { border-left: 0; }
  .cx-statbar-item:nth-child(n + 4) { border-top: 1px solid var(--border-subtle); }
  .cx-faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .cx-faq-aside { position: static; }
}
@media (max-width: 860px) {
  .cx-trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-trust-item:nth-child(3) { border-left: 0; }
  .cx-trust-item:nth-child(n + 3) { border-top: 1px solid var(--border-subtle); }
  .cx-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-hero-stat:nth-child(3) { border-left: 0; }
  .cx-hero-stat:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .cx-section-head { flex-direction: column; align-items: start; }
  .cx-demo-band { grid-template-columns: 1fr; padding: 32px 26px; }
  .cx-demo-band .cx-hero-actions { justify-content: flex-start; }
  .cx-topics { grid-template-columns: 1fr; padding-left: 18px; }
  .cx-ch-meta { display: none; }
  .cx-aside { grid-template-columns: 1fr; }
  .cx-toolbar { position: static; }
}
@media (max-width: 640px) {
  .cx-hero { padding: calc(var(--cx-header) + 36px) 0 70px; }
  .cx-hero h1 { letter-spacing: -1.4px; }
  .cx-hero-lead { font-size: 16px; }
  .cx-hero-actions .cx-btn { flex: 1 1 100%; }
  .cx-grid { grid-template-columns: 1fr; }
  .cx-feature-grid { grid-template-columns: 1fr; }
  .cx-trust-row { grid-template-columns: 1fr; }
  .cx-trust-item { border-left: 0 !important; border-top: 1px solid var(--border-subtle); }
  .cx-trust-item:first-child { border-top: 0; }
  .cx-section, .cx-catalog { padding: 64px 0; }
  .cx-panel { padding: 22px 18px; }
  .cx-highlights { grid-template-columns: 1fr; }
  .cx-statbar-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-statbar-item { border-left: 1px solid var(--border-subtle) !important; border-top: 1px solid var(--border-subtle); padding: 16px; }
  .cx-statbar-item:nth-child(odd) { border-left: 0 !important; }
  .cx-statbar-item:nth-child(-n + 2) { border-top: 0; }
  .cx-statbar-item strong { font-size: 24px; }
  .cx-search kbd { display: none; }
  .cx-search { flex-basis: 100%; }
  .cx-toolbar-row .cx-select { flex: 1 1 calc(50% - 5px); }
  .cx-toggle { flex: 1 1 100%; justify-content: center; }
  .cx-result-count { margin-left: 0; }
  .cx-detail-body { padding-bottom: 120px; }
  .cx-mobile-bar {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg-surface) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-card); box-shadow: 0 -10px 30px rgba(11, 29, 58, .08);
  }
  .cx-mobile-bar .cx-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx *::before, .cx *::after { animation: none !important; transition: none !important; }
}

/* newstyle.css pads every .details-page main for the fixed header; the hero already does that here */
.details-page main.cx { padding-top: 0; }

/* WhatsApp chat button ("Talk to our team" opens the automated WhatsApp agent) */
.cx-btn-wa { background: #25d366; color: #fff; box-shadow: 0 10px 24px rgba(37, 211, 102, .28); }
.cx-btn-wa:hover:not(:disabled) { background: #1ebe5b; box-shadow: 0 14px 30px rgba(37, 211, 102, .38); }
.cx-btn-wa i { font-size: 21px; }
