@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Design Tokens ─── */
:root {
  --navy: #0A2540;
  --navy-light: #1a3a5c;
  --orange: #FF6B35;
  --orange-light: #ff8a5b;
  --blue: #2563EB;
  --purple: #7C3AED;
  --green: #10B981;
  --yellow: #F59E0B;
  --bg: #F8F9FA;
  --bg-card: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --sidebar-w: 280px;
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; }

/* ─── Header ─── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--navy);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0; /* no flex gap: it split the wordmark "Synthex" + "eo" into two separate items */
  color: white;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}
.header-logo span { color: var(--orange); }
.header-logo svg { flex-shrink: 0; margin-right: 10px; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.header-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}
.header-nav a:hover, .header-nav a.active { color: white; background: rgba(255,255,255,0.1); }
.header-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,53,0.3); }
.btn-outline { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-navy { background: var(--navy); color: white; }
.btn-navy:hover { background: var(--navy-light); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: #0ea472; }

/* ─── Page Layout ─── */
.page-body { padding-top: var(--header-h); min-height: 100vh; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 50%, #0d1f35 100%);
  padding: 100px 32px 80px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,107,53,0.08) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(37,99,235,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,107,53,0.15);
  border: 1px solid rgba(255,107,53,0.3);
  color: #FF9A7A;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-value { font-size: 32px; font-weight: 800; color: white; }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 4px; }

/* ─── Section ─── */
.section { padding: 72px 32px; max-width: 1200px; margin: 0 auto; }
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.section-sub { font-size: 16px; color: var(--text-muted); margin-bottom: 40px; }

/* ─── Course Cards ─── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 28px; }
.course-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-card-header {
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}
.course-card-header::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.course-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.course-card-header h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.course-card-header p { opacity: 0.85; font-size: 14px; }
.course-card-body { padding: 24px 32px 32px; flex: 1; display: flex; flex-direction: column; }
.course-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.course-meta span { display: flex; align-items: center; gap: 6px; }
.progress-bar-wrap { background: var(--border); height: 6px; border-radius: 100px; margin-bottom: 20px; }
.progress-bar { height: 100%; border-radius: 100px; background: var(--green); transition: width 0.4s; }
.course-card-body .btn { margin-top: auto; align-self: flex-start; }

/* ─── Lesson Grid ─── */
.lessons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.lesson-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.2s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  cursor: pointer;
}
.lesson-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lesson-card.completed { border-color: var(--green); }
.lesson-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.lesson-card h4 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.lesson-card p { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.lesson-meta { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text-light); }

/* ─── Lesson Page Layout ─── */
.lesson-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
}
.lesson-sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  min-height: 100%;
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.lesson-sidebar::-webkit-scrollbar { width: 4px; }
.lesson-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.sidebar-course-title {
  padding: 20px 20px 16px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  background: var(--navy);
  z-index: 1;
}
.sidebar-module {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-module-title {
  padding: 14px 20px 10px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.sidebar-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
}
.sidebar-lesson:hover { background: rgba(255,255,255,0.06); color: white; }
.sidebar-lesson.active { background: rgba(255,107,53,0.15); color: white; border-right: 3px solid var(--orange); }
.sidebar-lesson.completed .lesson-check { color: var(--green); }
.lesson-check { width: 18px; height: 18px; flex-shrink: 0; color: rgba(255,255,255,0.25); }
.lesson-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 48px;
  max-width: calc(900px + var(--sidebar-w));
}

/* ─── Lesson Content Styles ─── */
.lesson-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lesson-breadcrumb a { color: var(--blue); }
.lesson-header { margin-bottom: 36px; }
.lesson-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-beginner { background: #DBEAFE; color: #1D4ED8; }
.badge-advanced { background: #EDE9FE; color: #6D28D9; }
.badge-niche { background: #FEF0E0; color: #C2610C; }
.badge-time { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.lesson-title { font-size: 36px; font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 12px; }
.lesson-subtitle { font-size: 17px; color: var(--text-muted); line-height: 1.5; }

.objectives-box {
  background: linear-gradient(135deg, #EFF6FF, #F0FDF4);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-bottom: 36px;
}
.objectives-box h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--blue); margin-bottom: 12px; }
.objectives-box li { font-size: 14px; color: var(--text); padding: 3px 0; display: flex; gap: 8px; }
.objectives-box li::before { content: '→'; color: var(--blue); flex-shrink: 0; }

.lesson-body h2 { font-size: 24px; font-weight: 700; color: var(--navy); margin: 40px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.lesson-body h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 28px 0 12px; }
.lesson-body p { margin-bottom: 16px; color: var(--text); font-size: 15.5px; line-height: 1.75; }
.lesson-body ul, .lesson-body ol { margin: 0 0 20px 0; padding-left: 0; }
.lesson-body ul li, .lesson-body ol li {
  padding: 4px 0 4px 24px;
  position: relative;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}
.lesson-body ul li::before { content: '•'; position: absolute; left: 8px; color: var(--orange); font-weight: 700; }
.lesson-body ol { counter-reset: item; }
.lesson-body ol li { counter-increment: item; }
.lesson-body ol li::before { content: counter(item) '.'; position: absolute; left: 0; color: var(--blue); font-weight: 700; font-size: 13px; }
.lesson-body strong { font-weight: 700; color: var(--navy); }
.lesson-body code { background: #F1F5F9; padding: 2px 6px; border-radius: 4px; font-size: 13px; font-family: 'JetBrains Mono', monospace; color: #E11D48; }

.diagram-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
  text-align: center;
  overflow-x: auto;
}
.diagram-wrap figcaption { font-size: 13px; color: var(--text-muted); margin-top: 16px; }

.callout {
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
  border-left: 4px solid;
}
.callout-tip { background: #F0FDF4; border-color: var(--green); }
.callout-tip .callout-icon { color: var(--green); }
.callout-warning { background: #FFFBEB; border-color: var(--yellow); }
.callout-warning .callout-icon { color: var(--yellow); }
.callout-info { background: #EFF6FF; border-color: var(--blue); }
.callout-info .callout-icon { color: var(--blue); }
.callout-header { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.callout p { margin: 0; font-size: 14px; }

.key-takeaways {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 40px 0;
}
.key-takeaways h3 { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.key-takeaways li { display: flex; gap: 12px; padding: 6px 0; font-size: 14.5px; line-height: 1.5; }
.key-takeaways li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.checklist-box {
  background: #F8F9FA;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
}
.checklist-box h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--navy); }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
}
.checklist-item input[type=checkbox] { margin-top: 2px; accent-color: var(--green); width: 16px; height: 16px; flex-shrink: 0; }

.lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}
.lesson-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lesson-nav-btn .nav-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.lesson-nav-btn .nav-title { font-size: 15px; font-weight: 600; color: var(--blue); }

/* ─── Dashboard ─── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.dashboard-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.dashboard-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.stat-row { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-box {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.stat-box .stat-num { font-size: 28px; font-weight: 800; color: var(--navy); }
.stat-box .stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.activity-title { flex: 1; font-weight: 500; }
.activity-time { color: var(--text-muted); font-size: 12px; }

/* ─── Login ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  padding: 24px;
}
.auth-card {
  background: white;
  border-radius: 20px;
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo h2 { font-size: 24px; font-weight: 800; color: var(--navy); margin-top: 12px; }
.auth-logo p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.auth-tabs { display: flex; background: var(--bg); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 28px; }
.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  border: none;
  background: transparent;
}
.auth-tab.active { background: white; color: var(--navy); box-shadow: var(--shadow); }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--blue); }
.form-input.error { border-color: #EF4444; }
.form-error { font-size: 12px; color: #EF4444; margin-top: 4px; }
.auth-submit { width: 100%; padding: 13px; margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }

/* ─── Module accordion on course page ─── */
.module-section { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: white; }
.module-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  background: white;
  transition: background 0.15s;
}
.module-head:hover { background: var(--bg); }
.module-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.module-head-text { flex: 1; }
.module-head-text h3 { font-size: 16px; font-weight: 700; color: var(--navy); }
.module-head-text p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.module-chevron { color: var(--text-muted); transition: transform 0.2s; }
.module-head.open .module-chevron { transform: rotate(180deg); }
.module-progress-mini { background: var(--bg); border-radius: 100px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.module-body { border-top: 1px solid var(--border); }
.module-lesson-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--bg);
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text);
  font-size: 14px;
}
.module-lesson-row:last-child { border-bottom: none; }
.module-lesson-row:hover { background: var(--bg); }
.module-lesson-row.completed .module-lesson-check { color: var(--green); }
.module-lesson-check { color: var(--border); flex-shrink: 0; }
.module-lesson-title { flex: 1; font-weight: 500; }
.module-lesson-meta { font-size: 12px; color: var(--text-light); }

/* ─── Table ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: var(--navy); color: white; padding: 12px 16px; text-align: left; font-weight: 600; font-size: 13px; }
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:nth-child(even) td { background: var(--bg); }
.data-table tr:hover td { background: #EFF6FF; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .lesson-sidebar { display: none; }
  .lesson-content { margin-left: 0; padding: 24px; }
  .courses-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .header-nav { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 60px 20px 48px; }
  .section { padding: 48px 20px; }
  .auth-card { padding: 32px 24px; }
  .lesson-content { padding: 20px; }
}

/* ─── Utilities ─── */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.hidden { display: none !important; }
.tag {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FCA5A5; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #86EFAC; }

/* ─── Loader ─── */
.loader { display: flex; justify-content: center; align-items: center; padding: 60px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Footer ─── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 32px;
  font-size: 13px;
  margin-top: 80px;
}
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: white; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-links a { font-size: 13px; }

/* ─── SVG diagrams shared styles ─── */
.svg-diagram { width: 100%; max-width: 720px; height: auto; }

/* Mega-menu dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 2px; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  gap: 32px;
  min-width: 560px;
  box-shadow: 0 16px 40px rgba(10,37,64,0.22);
  z-index: 200;
  margin-top: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: flex; }
.nav-dropdown-col { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.nav-dropdown-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a94a6;
  margin: 0 0 8px 12px;
}
.nav-dropdown-menu a {
  color: var(--navy);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.3;
}
.nav-dropdown-menu a:hover { background: #f2f5f9; color: var(--navy); }
@media (max-width: 900px) {
  .nav-dropdown-menu { min-width: 320px; flex-wrap: wrap; }
}

/* Free Tools — shared widget styling (hub page + per-tool detail pages) */
.tool-section { max-width: 760px; margin: 0 auto 64px; padding: 0 32px; }
.tool-card { background: white; border-radius: 12px; padding: 32px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid #eef1f5; }
.tool-card h2 { font-size: 22px; margin-bottom: 6px; }
.tool-card .tool-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tool-row input[type="text"], .tool-row textarea {
  flex: 1; min-width: 220px; padding: 10px 12px; border: 1px solid #d6dbe3; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.tool-row textarea { min-height: 90px; resize: vertical; width: 100%; }
.tool-hint { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 16px; line-height: 1.6; }
.tool-hint code { background: #f2f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.tool-result { margin-top: 20px; }
.bot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.bot-row:last-child { border-bottom: none; }
.bot-name { font-weight: 600; font-size: 14px; }
.bot-owner { font-size: 12.5px; color: var(--text-muted); }
.status-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status-allowed { background: #E7F7EE; color: #0E9F53; }
.status-blocked { background: #FDECEC; color: #D93636; }
.status-partial { background: #FEF3E0; color: #C2760C; }
.tool-error { background: #FDECEC; color: #B42318; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.tool-note { background: #EFF6FF; color: #1D4ED8; padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; line-height: 1.6; }
.wikidata-item { padding: 14px 0; border-bottom: 1px solid #f0f2f6; }
.wikidata-item:last-child { border-bottom: none; }
.wikidata-item .wd-title { font-weight: 700; font-size: 15px; }
.wikidata-item .wd-id { color: var(--text-muted); font-size: 12.5px; margin-left: 6px; }
.wikidata-item .wd-desc { font-size: 13.5px; color: var(--text-muted); margin: 4px 0 6px; }
.wikidata-item .wd-meta { font-size: 12.5px; }
.loading-dots::after { content: '…'; }
.cwv-score { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.cwv-score-num { font-size: 40px; font-weight: 800; line-height: 1; }
.cwv-score-good { color: #0E9F53; } .cwv-score-ok { color: #C2760C; } .cwv-score-poor { color: #D93636; }
.cwv-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.cwv-metric { background: #f7f9fc; border-radius: 8px; padding: 12px; text-align: center; }
.cwv-metric-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.cwv-metric-value { font-size: 18px; font-weight: 700; margin-top: 4px; }
.opr-score { display: flex; align-items: baseline; gap: 10px; }
.opr-score-num { font-size: 40px; font-weight: 800; color: var(--navy); }

/* Free Tools — hub card grid */
.tools-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.tools-hub-card { background: white; border-radius: 12px; padding: 28px; border: 1px solid #eef1f5; box-shadow: 0 1px 3px rgba(0,0,0,0.08); text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; }
.tools-hub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10,37,64,0.1); }
.tools-hub-card .tools-hub-icon { font-size: 30px; margin-bottom: 12px; }
.tools-hub-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; }
.tools-hub-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.tools-hub-card .tools-hub-cta { font-size: 13px; font-weight: 700; color: var(--blue); }

/* Free Tools — per-tool detail page */
.tool-page-section { max-width: 760px; margin: 0 auto 48px; padding: 0 32px; }
.tool-page-section:first-of-type { margin-top: 8px; }
.related-lessons { background: white; border-radius: 12px; padding: 28px 32px; border: 1px solid #eef1f5; }
.related-lessons h3 { font-size: 16px; color: var(--navy); margin-bottom: 14px; }
.related-lessons ul { list-style: none; margin: 0; padding: 0; }
.related-lessons li { padding: 0; margin-bottom: 10px; }
.related-lessons li::before { content: none; }
.related-lessons a { color: var(--blue); font-weight: 600; font-size: 14.5px; }
.related-lessons .lesson-blurb { display: block; color: var(--text-muted); font-weight: 400; font-size: 13.5px; margin-top: 2px; }
