/* 30 Real-World AI & Data Science Projects: Design System */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --font-mono: 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Theme: Light */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #f1f5f9;
  --bg-hover: #e2e8f0;
  --bg-code: #0b1120;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;

  --badge-level1: #2563eb;
  --badge-level2: #059669;
  --badge-level3: #7c3aed;

  --header-height: 64px;
  --sidebar-width: 330px;
  --content-max-width: 1160px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --base-font-size: 16px;
}

body.theme-dark {
  --bg-primary: #090d16;
  --bg-surface: #111827;
  --bg-sidebar: #0d1322;
  --bg-hover: #1f2937;
  --bg-code: #030712;

  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --border-color: #1f2937;
  --border-focus: #60a5fa;

  --accent-primary: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: rgba(59, 130, 246, 0.15);
}

body.font-serif .markdown-body {
  font-family: var(--font-serif);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--base-font-size);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.2s, color 0.2s;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #10b981);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s;
}

/* Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.author-name {
  color: var(--accent-primary);
  font-weight: 600;
}

.header-center {
  flex: 1;
  max-width: 520px;
  margin: 0 1.5rem;
  position: relative;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-clear {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-primary);
}

.search-result-part {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.search-result-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.header-right .reader-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-icon:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

/* Main Layout */
.main-layout {
  display: flex;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.2s ease, width 0.2s ease;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.sidebar-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background-color: var(--bg-sidebar);
}

.sidebar-tab-btn .badge {
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.sidebar-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.sidebar-panel.active {
  display: flex;
  flex-direction: column;
}

.toc-filter-box {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.toc-filter-box input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.toc-tree {
  flex: 1;
  padding: 0.5rem;
  overflow-y: auto;
}

.toc-part-group {
  margin-bottom: 0.75rem;
}

.toc-part-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
  letter-spacing: 0.5px;
}

.toc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  margin: 0.1rem 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.35;
}

.toc-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.toc-item.active {
  background-color: var(--accent-light);
  color: var(--accent-primary);
  font-weight: 600;
}

.toc-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 0.5rem;
}

/* Portals Sidebar Nav */
.portals-nav {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  letter-spacing: 0.5px;
}

.portal-link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.portal-link-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.portal-link-btn.active {
  border-color: var(--accent-primary);
  background: var(--accent-light);
}

.portal-icon {
  font-size: 1.4rem;
}

.portal-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
}

.portal-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
}

.portal-view {
  display: none;
  padding: 2rem 2.5rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.portal-view.active {
  display: block;
}

/* Reader Container & Design Flow */
.reader-container {
  background-color: var(--bg-surface);
  padding: 2.75rem min(4rem, 4vw);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
  overflow: hidden;
}

.chapter-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-part {
  color: var(--accent-primary);
  font-weight: 600;
}

.meta-dot {
  margin: 0 0.4rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-text:hover {
  color: var(--accent-primary);
}

/* Markdown Rendering Engine */
.markdown-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  word-wrap: break-word;
}

.markdown-body h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.markdown-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.markdown-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

.markdown-body h4 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.markdown-body p {
  margin-bottom: 1.25rem;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

.markdown-body li {
  margin-bottom: 0.45rem;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.25rem 0;
}

/* 16:9 Widescreen Image Flow & Technological Framework Presentation */
.markdown-body img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background-color: #060913;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.12);
  margin: 2rem 0 2.5rem 0;
  display: block;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.25s;
}

.markdown-body img:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.65), 0 0 25px rgba(56, 189, 248, 0.25);
}

/* Reset for inline badges inside tables (e.g. Section 8 Cloud deployment badges) */
.markdown-body table img {
  width: auto !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background-color: transparent !important;
  border-radius: 4px !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.markdown-body table img:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Beautiful Responsive Table Wrapper */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0 2.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.markdown-body table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.88rem;
}

.markdown-body th {
  position: sticky;
  top: 0;
  background-color: var(--bg-hover);
  color: var(--text-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  padding: 0.85rem 1rem;
  white-space: nowrap;
  text-align: left;
}

.markdown-body td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
  vertical-align: top;
}

.markdown-body tr:hover td {
  background-color: var(--accent-light);
}

/* Modern Code Blocks */
.code-block-card {
  position: relative;
  background-color: var(--bg-code);
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0 2rem 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: #94a3b8;
  text-transform: uppercase;
}

.markdown-body pre {
  margin: 0;
  padding: 1.25rem;
  background: transparent;
  color: #f8fafc;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--bg-hover);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.markdown-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Callout Alerts */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border-left: 4px solid var(--accent-primary);
  background-color: var(--accent-light);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.callout-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.callout-content {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.55;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.callout.note { border-left-color: #2563eb; background: rgba(37, 99, 235, 0.08); }
.callout.tip { border-left-color: #059669; background: rgba(5, 150, 105, 0.08); }
.callout.important { border-left-color: #7c3aed; background: rgba(124, 58, 237, 0.08); }
.callout.warning { border-left-color: #d97706; background: rgba(217, 119, 6, 0.08); }
.callout.caution { border-left-color: #dc2626; background: rgba(220, 38, 38, 0.08); }

/* Mermaid Container & Interactive Technological Diagram Flow */
.mermaid-container {
  margin: 2.25rem 0;
  padding: 2.25rem 1.75rem 1.75rem 1.75rem;
  background: #080d1a;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  position: relative;
}

.mermaid-container::before {
  content: 'INTERACTIVE ARCHITECTURAL PIPELINE FLOW';
  position: absolute;
  top: 10px;
  left: 18px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  color: #38bdf8;
  opacity: 0.8;
}

.mermaid-container svg {
  max-width: 100% !important;
  height: auto !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* KaTeX Equations Display */
.katex-display {
  margin: 1.5rem 0 !important;
  padding: 1rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Chapter Bottom Nav */
.chapter-nav-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.nav-ch-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.nav-ch-btn:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-hover);
  transform: translateY(-1px);
}

.nav-ch-btn.next {
  text-align: right;
  justify-content: flex-end;
}

.nav-ch-arrow {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.nav-ch-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-ch-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Portals Styling */
.portal-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.portal-header {
  margin-bottom: 2rem;
}

.portal-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.portal-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* 30 Projects Matrix View */
.matrix-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-group select, .filter-group input {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.filter-group.search-filter {
  flex: 1;
}

.filter-group.search-filter input {
  width: 100%;
}

.projects-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.card-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #fff;
}

.card-badge.lvl-1 { background-color: var(--badge-level1); }
.card-badge.lvl-2 { background-color: var(--badge-level2); }
.card-badge.lvl-3 { background-color: var(--badge-level3); }

.card-industry {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.card-tag {
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

/* Playground */
.playground-layout {
  display: flex;
  gap: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.playground-selector {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.play-tab {
  padding: 0.95rem 1.1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.play-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.play-tab.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.playground-stage {
  flex: 1;
}

.sim-panel {
  display: none;
}

.sim-panel.active {
  display: block;
}

.sim-panel h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.sim-panel p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.sim-controls {
  background: var(--bg-primary);
  padding: 1.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.control-row {
  margin-bottom: 1.1rem;
}

.control-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.control-row input[type="range"] {
  width: 100%;
}

.sim-text-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.sim-result-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.result-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.res-label {
  font-weight: 600;
  color: var(--text-muted);
}

.res-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.risk-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.risk-badge.high { background: #fee2e2; color: #b91c1c; }
.risk-badge.normal { background: #dcfce7; color: #15803d; }

.res-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.chunk-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-top: 0.85rem;
  font-size: 0.86rem;
}

.chunk-source {
  display: block;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

/* 90-Day Roadmap */
.roadmap-progress-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.roadmap-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.roadmap-bar-container {
  height: 12px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}

.roadmap-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #10b981);
  transition: width 0.3s;
}

.roadmap-phases {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.phase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.phase-header {
  padding: 1.1rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.phase-header.phase-1 { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.phase-header.phase-2 { background: linear-gradient(135deg, #047857, #059669); }
.phase-header.phase-3 { background: linear-gradient(135deg, #6d28d9, #7c3aed); }

.phase-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.phase-role {
  font-size: 0.8rem;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.milestones-list {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.92rem;
  cursor: pointer;
  line-height: 1.45;
}

.milestone-item input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--accent-primary);
  width: 1.15rem;
  height: 1.15rem;
}

/* Interviews Bank */
.interview-filter-bar {
  margin-bottom: 1.75rem;
}

.interview-filter-bar input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.interview-qa-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.interview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.interview-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.interview-proj {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.interview-q {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.interview-a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  background: var(--bg-primary);
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
}

/* Infographics Gallery */
.infographics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 1.75rem;
}

.infographic-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.infographic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.infographic-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.infographic-info {
  padding: 1.15rem 1.35rem;
}

.infographic-section {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.infographic-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.infographic-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Utilities */
.hidden { display: none !important; }

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 999;
  }
  .reader-container {
    padding: 1.75rem 1.25rem;
  }
  .playground-layout {
    flex-direction: column;
  }
  .playground-selector {
    width: 100%;
  }
  .infographics-grid {
    grid-template-columns: 1fr;
  }
}

/* 1-Click Free Deploy Buttons in Project Cards */
.card-deploy-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.btn-card-deploy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-card-deploy:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(37,99,235,0.3);
}

.btn-card-cs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: var(--bg-hover);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-card-cs:hover {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  color: var(--accent-primary) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Modern App Footer (Copyrights Flugelsoft Labs & Legal Navigation)
   ========================================================================== */
.app-footer {
  margin-top: 4rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 1.5rem 2rem;
  font-family: var(--font-sans);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-img {
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.footer-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.footer-brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-author-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.footer-author-text strong {
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 480px;
}

.footer-nav-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.footer-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}

.footer-nav-btn:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-link {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-bottom-bar {
  max-width: 1200px;
  margin: 1.5rem auto 0 auto;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copyright strong {
  color: var(--text-primary);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-legal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  padding: 0;
}

.footer-legal-btn:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-legal-links .sep {
  opacity: 0.5;
}

/* ==========================================================================
   Legal (Privacy & Terms) & Contact Pages
   ========================================================================== */
.legal-container,
.contact-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
}

.legal-badge {
  display: inline-block;
  background-color: var(--accent-light);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.legal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-card h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.35rem;
}

.legal-card h3:first-of-type {
  margin-top: 0;
}

.legal-card p {
  margin-bottom: 1rem;
}

.legal-card ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-card li {
  margin-bottom: 0.5rem;
}

.legal-card strong {
  color: var(--text-primary);
}

.copyright-callout {
  background: var(--bg-hover);
  border-left: 4px solid var(--accent-primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin: 1.25rem 0;
}

.code-license-block,
.citation-box {
  background: var(--bg-hover);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}

.code-license-block code,
.citation-box code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.legal-link {
  color: var(--accent-primary);
  text-decoration: underline;
}

.inline-link-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: inherit;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ==========================================================================
   Contact Us Grid & Interactive Form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.contact-info-card,
.contact-form-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}

.contact-info-card h3,
.contact-form-card h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.detail-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 700;
}

.detail-val {
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 0.15rem;
}

.contact-link {
  color: var(--accent-primary);
  text-decoration: none;
  word-break: break-all;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-adoptions-box {
  background: var(--bg-hover);
  border: 1px dashed var(--accent-primary);
  padding: 1.15rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}

.contact-adoptions-box h4 {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.contact-adoptions-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Contact Form Elements */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-submit-contact {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-submit-contact:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.contact-success-msg {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.contact-success-msg .success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.contact-success-msg h4 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.contact-success-msg p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Toast Notifications */
.app-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--accent-primary);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-nav-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .app-footer {
    padding: 2rem 1rem 1rem 1rem;
  }
}

/* ==========================================================================
   Header Auth Controls & User Profile Dropdown
   ========================================================================== */
.auth-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
}

.btn-google-login {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-google-login:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-admin-header {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 5px rgba(124, 58, 237, 0.25);
}

.btn-admin-header:hover {
  background: linear-gradient(135deg, #6d28d9, #4338ca);
  transform: translateY(-1px);
}

.badge-pending-count {
  background: #f59e0b;
  color: #000000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  line-height: 1;
}

.user-profile-menu {
  position: relative;
}

.user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  transition: background 0.15s;
}

.user-profile-trigger:hover {
  background: var(--bg-hover);
}

.user-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-hover);
}

.user-display-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
  padding: 1rem;
  z-index: 9999;
}

.user-dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dropdown-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.user-status-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.user-status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.75rem 0;
}

.btn-dropdown-signout {
  width: 100%;
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-dropdown-signout:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border-color: #dc2626;
}

/* ==========================================================================
   Public Landing Page (Book Overview & Benefits)
   ========================================================================== */
.landing-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem 1.5rem;
}

.landing-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 3rem auto;
}

.landing-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.landing-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.landing-subtitle {
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.landing-author {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.landing-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.landing-cta-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-landing-cta:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-landing-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-landing-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

/* Landing Stats Ribbon */
.landing-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-top: 0.35rem;
}

/* Master Showcase Card */
.landing-showcase {
  margin: 3.5rem 0;
  text-align: center;
}

.showcase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  transition: transform 0.2s;
}

.showcase-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.showcase-caption {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.showcase-caption strong {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.showcase-caption span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Landing Sections & Benefits Grid */
.landing-section {
  margin: 4.5rem 0;
}

.section-badge {
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 760px;
  margin-bottom: 2rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.benefit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.2s;
}

.benefit-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.benefit-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.benefit-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.benefit-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Curriculum Overview Cards */
.curriculum-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.curriculum-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border-left: 4px solid var(--accent-primary);
}

.curriculum-part {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.curriculum-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.curriculum-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Access Notice Box */
.landing-access-notice {
  margin: 4rem 0 2rem 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(124,58,237,0.06));
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.access-notice-content {
  max-width: 640px;
  margin: 0 auto;
}

.access-notice-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.access-notice-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Pending Approval Screen
   ========================================================================== */
.pending-container {
  max-width: 620px;
  margin: 4rem auto;
  padding: 1rem;
}

.pending-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.pending-icon-pulse {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: pulseRotate 2.5s infinite ease-in-out;
}

@keyframes pulseRotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.pending-card h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pending-status-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.pending-user-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-color);
}

.pending-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.pending-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pending-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.pending-submessage {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 2rem;
}

.pending-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

/* ==========================================================================
   Admin Governance Panel (Restricted to kalyanjit@gmail.com)
   ========================================================================== */
.admin-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem 1.5rem;
}

.admin-header {
  margin-bottom: 2.5rem;
}

.admin-badge {
  display: inline-block;
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.admin-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.admin-stat-card.highlight {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.admin-stat-card .stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.35rem;
}

.admin-stat-card.highlight .stat-val {
  color: #d97706;
}

.admin-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.admin-section-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.admin-filters {
  display: flex;
  gap: 0.75rem;
}

.admin-filters input {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  min-width: 220px;
}

.admin-filters select {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-user-name {
  font-weight: 600;
  color: var(--text-primary);
}

.btn-action-approve {
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action-approve:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-action-suspend {
  background: transparent;
  color: #dc2626;
  border: 1px solid #dc2626;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action-suspend:hover {
  background: rgba(220, 38, 38, 0.1);
}

.btn-refresh-small {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
  .landing-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .curriculum-cards {
    grid-template-columns: 1fr;
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

