/* Omada Financial — Learn platform
   Design system */

:root {
  /* Brand */
  --navy-900: #0a2540;
  --navy-800: #12325a;
  --navy-700: #1e4a8c;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  /* Functional accents */
  --teal-600: #0e8a7e;
  --teal-100: #d1f0ec;
  --gold-600: #b8872a;
  --gold-100: #f6e9c7;
  --red-600:  #b4393a;
  --red-100:  #f7dadb;
  --brown-600:#8a5a3b;
  --brown-100:#ecdfd4;

  /* Neutrals */
  --ink:      #0a2540;
  --ink-2:    #32455f;
  --ink-3:    #5b6b82;
  --ink-4:    #8a97ac;
  --line:     #e3e8ef;
  --line-2:   #eef2f7;
  --surface:  #f7f9fc;
  --surface-2:#eef3f9;
  --white:    #ffffff;

  /* Type */
  --font-sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num:  "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Scale */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(10,37,64,0.06), 0 1px 1px rgba(10,37,64,0.04);
  --shadow:    0 4px 16px rgba(10,37,64,0.08);
  --shadow-lg: 0 20px 48px rgba(10,37,64,0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

h1,h2,h3,h4 { font-family: var(--font-sans); color: var(--navy-900); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
p  { margin: 0; color: var(--ink-2); }

/* ===== App shell ===== */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 64px;
  display: flex; align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--navy-900);
  position: relative;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  letter-spacing: 0.02em;
}
.brand-name {
  display: flex; flex-direction: column; line-height: 1;
}
.brand-name .o { font-weight: 600; color: var(--navy-900); font-size: 15px; letter-spacing: 0.02em; }
.brand-name .l { font-size: 11px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.12em; text-transform: uppercase; }

.nav-tabs { display: flex; gap: 2px; margin-left: 40px; }
.nav-tab {
  padding: 8px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-3);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  border: none; background: transparent;
  font-family: inherit;
  transition: all 0.15s ease;
}
.nav-tab:hover { color: var(--navy-900); background: var(--surface); }
.nav-tab.active { color: var(--navy-900); background: var(--blue-50); }
.nav-tab .pill {
  font-size: 10px; font-weight: 500; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--line-2); color: var(--ink-3); text-transform: uppercase;
}

.topbar-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: white; display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}
.ghost-btn {
  border: 1px solid var(--line);
  background: white; color: var(--ink-2);
  padding: 7px 12px; border-radius: 8px; font-size: 13px;
  font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.ghost-btn:hover { border-color: var(--ink-4); color: var(--navy-900); }

/* ===== Workspace ===== */
.workspace { flex: 1; display: grid; grid-template-columns: 280px 1fr; min-height: 0; }

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 20px;
  overflow-y: auto;
}
.sidebar-head { margin-bottom: 20px; }
.sidebar-head .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--ink-4); text-transform: uppercase;
  margin-bottom: 6px;
}
.sidebar-head .title { font-size: 18px; font-weight: 600; color: var(--navy-900); line-height: 1.25; }
.sidebar-head .meta { font-size: 12px; color: var(--ink-3); margin-top: 8px; font-family: var(--font-num); }

.progress-track {
  height: 3px; background: var(--line); border-radius: 2px; margin-top: 14px;
  overflow: hidden;
}
.progress-fill { height: 100%; background: var(--navy-700); border-radius: 2px; transition: width 0.3s ease; }

.lesson-list { list-style: none; margin: 24px 0 0; padding: 0; }
.lesson-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 10px; border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.12s ease;
  border: none; background: transparent; width: 100%; text-align: left;
  font-family: inherit;
}
.lesson-item:hover { background: var(--white); }
.lesson-item.active { background: var(--white); box-shadow: var(--shadow-sm); }
.lesson-item.active .lesson-num { background: var(--navy-900); color: white; border-color: var(--navy-900); }
.lesson-item.done .lesson-num { background: var(--teal-600); color: white; border-color: var(--teal-600); }

.lesson-num {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  flex-shrink: 0;
  font-family: var(--font-num);
  background: var(--white);
  transition: all 0.15s ease;
}
.lesson-body { flex: 1; min-width: 0; }
.lesson-title { font-size: 13px; font-weight: 500; color: var(--navy-900); line-height: 1.35; }
.lesson-item:not(.active) .lesson-title { color: var(--ink-2); }
.lesson-sub { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

/* ===== Canvas ===== */
.canvas {
  overflow-y: auto;
  background: var(--white);
}
.lesson-frame {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 56px 120px;
}

.lesson-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.lesson-header .left .eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  color: var(--navy-700); text-transform: uppercase;
  margin-bottom: 10px;
  font-family: var(--font-num);
}
.lesson-header h1 { font-size: 36px; }
.lesson-header .sub {
  color: var(--ink-3); margin-top: 10px; font-size: 15px; max-width: 640px;
}
.lesson-header .right { color: var(--ink-4); font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; font-family: var(--font-num); }

/* footer nav */
.lesson-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  gap: 16px;
}
.nav-btn {
  display: inline-flex; flex-direction: column; gap: 2px;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit; color: var(--ink-2);
  cursor: pointer; text-align: left;
  min-width: 220px;
  transition: all 0.12s ease;
}
.nav-btn:hover { border-color: var(--navy-700); color: var(--navy-900); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.nav-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; border-color: var(--line); color: var(--ink-4); }
.nav-btn.next { text-align: right; }
.nav-btn .dir { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); font-family: var(--font-num); }
.nav-btn .label { font-weight: 500; font-size: 14px; color: var(--navy-900); }
.nav-btn:disabled .label { color: var(--ink-4); }

/* ===== Reusable content blocks ===== */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card.tinted { background: var(--surface); }

.kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 8px; font-family: var(--font-num);
}

.callout {
  display: flex; gap: 14px;
  padding: 16px 18px;
  background: var(--blue-50);
  border-left: 3px solid var(--navy-700);
  border-radius: 4px;
  font-size: 14px; color: var(--navy-900);
  margin: 24px 0;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

.stat-num { font-family: var(--font-num); font-weight: 600; color: var(--navy-900); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* Utility for placeholder charts */
.chart-stage {
  background: linear-gradient(var(--surface), var(--surface));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 28px;
}

/* Animation: fade/slide on lesson change */
@keyframes lessonIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lesson-frame { animation: lessonIn 0.35s ease both; }

@keyframes pyramidIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Footer disclaimer */
.disclaimer {
  max-width: 1100px; margin: 0 auto; padding: 32px 56px 48px;
  color: var(--ink-4); font-size: 11px; line-height: 1.6; border-top: 1px solid var(--line-2);
}

/* Scrollbar */
.sidebar::-webkit-scrollbar, .canvas::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-thumb, .canvas::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--surface); }
.canvas::-webkit-scrollbar-thumb { border-color: var(--white); }
