/* ============================================================
   SmartLite Academy — shared stylesheet
   Brand: indigo (#4F46E5) -> violet (#7C3AED), matches website/
   ============================================================ */

:root {
  --indigo: #4F46E5;
  --violet: #7C3AED;
  --emerald: #10B981;
  --amber: #F59E0B;
  --rose: #E11D48;
  --sky: #0EA5E9;

  --ink-900: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-500: #64748B;
  --ink-300: #CBD5E1;
  --ink-100: #F1F5F9;
  --ink-50:  #F8FAFC;

  --card-border: #E2E8F0;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12);
  --shadow-card-hover: 0 4px 10px rgba(15,23,42,.06), 0 20px 40px -16px rgba(79,70,229,.28);
  --grad-brand: linear-gradient(135deg, var(--indigo), var(--violet));
  --grad-hero: radial-gradient(ellipse at top left, rgba(124,58,237,.35), transparent 55%),
               radial-gradient(ellipse at bottom right, rgba(79,70,229,.30), transparent 55%),
               var(--ink-900);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink-800);
  background: var(--ink-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink-900); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 900;
  box-shadow: 0 4px 10px -2px rgba(79,70,229,.5);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14.5px; font-weight: 600; color: var(--ink-700);
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--indigo); border-bottom-color: var(--indigo); }
.nav-points {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-100); border: 1px solid var(--card-border);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--ink-800);
  flex-shrink: 0;
}
.nav-points .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }

.nav-menu { display: flex; align-items: center; gap: 28px; }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; padding: 0; margin-left: auto;
  background: none; border: 1px solid var(--card-border); border-radius: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; margin: 0 auto;
  background: var(--ink-800); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--card-border);
    box-shadow: 0 12px 24px -12px rgba(15,23,42,.18);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 18px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .25s ease, opacity .2s ease;
  }
  .nav-menu.open { max-height: 70vh; opacity: 1; overflow-y: auto; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--ink-100); }
  .nav-links a:hover, .nav-links a.active { border-bottom-color: var(--ink-100); background: var(--ink-50); }
  .nav-points { align-self: flex-start; margin-top: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--grad-hero);
  color: white;
  padding: 76px 0 92px;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #C7D2FE;
  margin-bottom: 22px;
}
.hero h1 { font-size: 46px; max-width: 760px; color: white; }
.hero h1 .grad {
  background: linear-gradient(90deg, #A5B4FC, #DDD6FE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin-top: 18px; max-width: 620px; font-size: 17px; color: #CBD5E1; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: white; color: var(--ink-900); box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); }
.btn-ghost { background: rgba(255,255,255,.06); color: white; border-color: rgba(255,255,255,.28); }
.btn-brand { background: var(--grad-brand); color: white; box-shadow: 0 8px 20px -6px rgba(79,70,229,.6); }

.hero-stats { display: flex; gap: 40px; margin-top: 52px; flex-wrap: wrap; }
.hero-stat .num { font-size: 26px; font-weight: 900; color: white; }
.hero-stat .lbl { font-size: 12.5px; color: #94A3B8; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ---------- Section shell ---------- */
.section { padding: 68px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .kicker {
  font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 10px; display: block;
}
.section-head h2 { font-size: 30px; color: var(--ink-900); }
.section-head p { margin-top: 12px; color: var(--ink-500); font-size: 15.5px; }

/* ---------- Trail cards (home grid) ---------- */
.trail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 940px) { .trail-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .trail-grid { grid-template-columns: 1fr; } }

.trail-card {
  background: white; border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-card); transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column; gap: 14px;
}
.trail-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.trail-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  color: white;
}
.trail-card h3 { font-size: 16.5px; color: var(--ink-900); }
.trail-card p.desc { font-size: 13.5px; color: var(--ink-500); }
.trail-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--ink-500); font-weight: 700; margin-top: auto; }
.trail-meta span { display: flex; align-items: center; gap: 5px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em;
}
.pill-featured { background: #FEF3C7; color: #92400E; }
.pill-foundation { background: #E0E7FF; color: #3730A3; }
.pill-automation { background: #DCFCE7; color: #166534; }
.pill-security { background: #FEE2E2; color: #991B1B; }
.pill-growth { background: #FCE7F3; color: #9D174D; }
.pill-admin { background: #E2E8F0; color: #334155; }

/* ---------- Featured flagship banner ---------- */
.flagship-banner {
  background: var(--grad-brand); border-radius: var(--radius-lg);
  padding: 34px 36px; color: white; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 20px 50px -20px rgba(79,70,229,.6);
}
.flagship-banner h3 { font-size: 22px; color: white; }
.flagship-banner p { color: #E0E7FF; margin-top: 8px; max-width: 480px; font-size: 14.5px; }

/* ---------- Badge / points widget ---------- */
.badge-circle {
  width: 84px; height: 84px; border-radius: 50%;
  background: conic-gradient(var(--emerald) var(--pct,75%), #E2E8F0 0);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.badge-circle-inner {
  width: 66px; height: 66px; border-radius: 50%; background: white;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 900; color: var(--ink-900);
}
.badge-circle-inner small { font-size: 9px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: 13px; color: var(--ink-500); font-weight: 600; margin-bottom: 18px; display:flex; gap:6px; align-items:center; }
.crumb a:hover { color: var(--indigo); }

/* ---------- Trail page layout ---------- */
.trail-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .trail-layout { grid-template-columns: minmax(0, 1fr); } }

.trail-sidebar {
  position: sticky; top: 88px; background: white; border: 1px solid var(--card-border);
  border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card);
}
.trail-sidebar h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: 12px; }
.unit-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-700); cursor: pointer;
}
.unit-nav-item:hover { background: var(--ink-100); }
.unit-nav-item .num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink-100); color: var(--ink-500);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.unit-nav-item.done .num { background: var(--emerald); color: white; }

/* ---------- Unit blocks ---------- */
.unit {
  background: white; border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 30px 32px; margin-bottom: 22px; box-shadow: var(--shadow-card); scroll-margin-top: 90px;
}
.unit-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
  color: var(--indigo); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px;
}
.unit h2 { font-size: 23px; color: var(--ink-900); margin-bottom: 14px; }
.unit p { color: var(--ink-700); font-size: 15px; margin-bottom: 14px; }
.unit p:last-child { margin-bottom: 0; }

.scenario-box {
  background: #F5F3FF; border: 1px solid #DDD6FE; border-radius: var(--radius-md);
  padding: 18px 20px; display: flex; gap: 14px; margin: 18px 0;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad-brand); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.scenario-box .role { font-size: 12px; font-weight: 800; color: var(--violet); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.scenario-box p { color: var(--ink-800); font-size: 14.5px; margin: 0; font-style: italic; }

.callout {
  border-radius: var(--radius-md); padding: 16px 18px; margin: 18px 0; font-size: 14px;
  border: 1px solid; display: flex; gap: 12px;
}
.callout-tip { background: #ECFDF5; border-color: #A7F3D0; }
.callout-tip .callout-title { color: #065F46; }
.callout-warn { background: #FFFBEB; border-color: #FDE68A; }
.callout-warn .callout-title { color: #92400E; }
.callout-info { background: #EFF6FF; border-color: #BFDBFE; }
.callout-info .callout-title { color: #1E40AF; }
.callout-title { font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.callout-icon { font-size: 18px; flex-shrink: 0; }

.step-list { counter-reset: step; margin: 18px 0; }
.step-item {
  counter-increment: step; display: flex; gap: 14px; padding: 14px 0;
  border-top: 1px dashed var(--card-border);
}
.step-item:first-child { border-top: none; }
.step-item::before {
  content: counter(step); flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-brand); color: white; font-size: 12.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step-item .step-body strong { display: block; font-size: 14.5px; color: var(--ink-900); margin-bottom: 3px; }
.step-item .step-body span { font-size: 13.5px; color: var(--ink-500); }

.diagram-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.diagram-node {
  background: var(--ink-100); border: 1px solid var(--card-border); border-radius: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 800; color: var(--ink-800);
}
.diagram-node.win { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.diagram-node.lose { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; text-decoration: line-through; }
.diagram-arrow { color: var(--ink-300); font-size: 18px; }

.code-box {
  background: var(--ink-900); color: #E2E8F0; border-radius: var(--radius-md);
  padding: 16px 18px; font-family: "SF Mono", Consolas, "Courier New", monospace; font-size: 12.8px;
  overflow-x: auto; margin: 16px 0; line-height: 1.6;
}
.code-box .k { color: #7DD3FC; }
.code-box .s { color: #86EFAC; }
.code-box .c { color: #64748B; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
.table-wrap .table-clean { margin: 0; }
.table-clean { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 13.5px; }
.table-clean th { text-align: left; padding: 9px 12px; background: var(--ink-100); color: var(--ink-500); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.table-clean td { padding: 10px 12px; border-top: 1px solid var(--card-border); color: var(--ink-700); }
.table-clean tr:hover td { background: #FAFAFF; }

/* ---------- Quiz ---------- */
.quiz-q { margin-bottom: 22px; }
.quiz-q .q-text { font-weight: 800; font-size: 15px; color: var(--ink-900); margin-bottom: 12px; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
  border: 1.5px solid var(--card-border); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; font-weight: 600; color: var(--ink-700); transition: all .15s ease;
}
.quiz-opt:hover { border-color: var(--indigo); background: #F5F3FF; }
.quiz-opt.correct { border-color: var(--emerald); background: #ECFDF5; color: #065F46; }
.quiz-opt.wrong { border-color: var(--rose); background: #FFF1F2; color: #9F1239; }
.quiz-feedback { margin-top: 8px; font-size: 13px; font-weight: 700; display: none; }
.quiz-feedback.show { display: block; }

.completion-card {
  background: var(--ink-900); border-radius: var(--radius-lg); padding: 40px;
  text-align: center; color: white; position: relative; overflow: hidden;
}
.completion-card::before {
  content: ""; position: absolute; inset: 0; background: var(--grad-hero); opacity: .9;
}
.completion-card > * { position: relative; z-index: 1; }
.completion-badge {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 18px; background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 16px 40px -10px rgba(124,58,237,.7);
}
.completion-card h3 { font-size: 22px; color: white; }
.completion-card p { color: #CBD5E1; margin-top: 8px; font-size: 14.5px; }
.completion-points { display: flex; justify-content: center; gap: 28px; margin-top: 22px; }
.completion-points div .n { font-size: 22px; font-weight: 900; color: white; }
.completion-points div .l { font-size: 11px; color: #94A3B8; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Use-case catalog ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-chip {
  border: 1.5px solid var(--card-border); background: white; padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink-700);
}
.filter-chip:hover { border-color: var(--indigo); color: var(--indigo); }
.filter-chip.active { background: var(--grad-brand); color: white; border-color: transparent; }

.usecase-card {
  background: white; border: 1px solid var(--card-border); border-radius: var(--radius-md);
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-card);
}
.usecase-head {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; user-select: none;
}
.usecase-head:hover { background: #FAFAFF; }
.usecase-num { font-size: 12px; font-weight: 900; color: var(--ink-300); width: 26px; flex-shrink: 0; }
.usecase-title { flex: 1; }
.usecase-title h4 { font-size: 15.5px; color: var(--ink-900); }
.usecase-title span { font-size: 12.5px; color: var(--ink-500); }
.usecase-chev { color: var(--ink-300); transition: transform .2s ease; flex-shrink: 0; }
.usecase-card.open .usecase-chev { transform: rotate(180deg); color: var(--indigo); }
.usecase-body { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.usecase-card.open .usecase-body { max-height: 2400px; }
.usecase-body-inner { padding: 4px 24px 26px 62px; }
.usecase-body-inner h5 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--violet); margin: 16px 0 8px; }
.usecase-body-inner h5:first-child { margin-top: 0; }
.usecase-body-inner p { font-size: 14px; color: var(--ink-700); }
.usecase-body-inner ul.check li { display: flex; gap: 8px; font-size: 13.8px; color: var(--ink-700); padding: 4px 0; }
.usecase-body-inner ul.check li::before { content: "✓"; color: var(--emerald); font-weight: 900; flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: #94A3B8; padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.footer a:hover { color: white; }

/* utility */
.mt-0{margin-top:0} .flex{display:flex} .items-center{align-items:center} .gap-3{gap:12px}
.text-center{text-align:center}
