/* Academe Learn — Preview Site Styles */
:root {
  --brand-blue: #2563eb;
  --brand-dark: #1e293b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-page: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-nav: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 8px;
  --max-width: 780px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.7;
  font-size: 16px;
}

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.site-header {
  background: var(--brand-dark);
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header a { color: white; text-decoration: none; }
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-title { font-size: 1.1em; font-weight: 700; letter-spacing: -0.01em; }
.site-subtitle { font-size: 0.8em; color: #94a3b8; }

/* Breadcrumbs */
.breadcrumbs {
  padding: 12px 0;
  font-size: 0.85em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}
.breadcrumbs a { color: var(--brand-blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; color: var(--border); }

/* Module listing (index pages) */
.module-list { list-style: none; }
.module-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
}
.module-item:hover { background: var(--bg-subtle); }
.module-num {
  font-size: 0.8em;
  color: var(--text-muted);
  min-width: 28px;
  text-align: right;
}
.module-title { flex: 1; font-weight: 500; }
.module-meta { font-size: 0.8em; color: var(--text-secondary); }

/* Status badges */
.badge {
  display: inline-block;
  font-size: 0.7em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-deployed { background: #dbeafe; color: #1e40af; }
.badge-images { background: #fce7f3; color: #9d174d; }

/* Content area */
.content-body {
  padding: 32px 0 48px;
}
.content-body h1 {
  font-size: 1.5em;
  margin-bottom: 8px;
  color: var(--brand-dark);
}
.content-body h2 {
  font-size: 1.25em;
  margin: 28px 0 12px;
  color: var(--brand-dark);
}
.content-body p { margin: 8px 0; }
.content-body ul, .content-body ol { padding-left: 24px; margin: 8px 0; }
.content-body li { margin: 4px 0; }
.content-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.content-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92em; }
.content-body th { padding: 8px 12px; text-align: left; background: var(--bg-subtle); border: 1px solid var(--border); font-weight: 600; }
.content-body td { padding: 7px 12px; border: 1px solid var(--border); vertical-align: top; }
.content-body figure { margin: 1.5em 0; text-align: center; }
.content-body figcaption { font-size: 0.8em; color: var(--text-secondary); margin-top: 6px; }

/* Page navigation */
.page-nav {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.9em;
}
.page-nav a {
  color: var(--brand-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-nav a:hover { text-decoration: underline; }
.page-nav .next { margin-left: auto; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: 48px;
  font-size: 0.8em;
  color: var(--text-muted);
  text-align: center;
}

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .content-body { padding: 20px 0 32px; }
  .module-item { padding: 12px; gap: 8px; }
  .page-nav { flex-direction: column; gap: 12px; }
}
