/* =================================
   Learn Article Shared Styles
   Shared across all /learn/ article pages
   ================================= */

/* User Avatar (nav) */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 6px;
  color: white;
}

/* Article Container */
.learn-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
}

/* BLUF (Bottom Line Up Front) */
.bluf {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.bluf-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6366f1;
  margin-bottom: 0.5rem;
}

.bluf-content {
  font-size: 1.0625rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

/* Series Position Badge */
.series-position {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.375rem 0.75rem;
  margin-bottom: 1rem;
}

.series-position strong {
  color: var(--primary);
}

/* Article Header */
.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-meta svg {
  width: 16px;
  height: 16px;
}

/* Article Intro */
.article-intro {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary);
}

/* Table of Contents */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9375rem;
}

.toc a:hover {
  text-decoration: underline;
}

/* Section Headings */
.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

/* Section Content */
.section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.section ul, .section ol {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.section li {
  margin-bottom: 0.5rem;
}

/* Content Sections */
.engine-section {
  margin-bottom: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.engine-section:last-of-type {
  border-bottom: none;
}

/* Engine Headers (article 01 specific but reusable) */
.engine-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.engine-logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.engine-logo.chatgpt { background: linear-gradient(135deg, #10a37f, #1a7f64); }
.engine-logo.perplexity { background: linear-gradient(135deg, #20808d, #1a6b75); }
.engine-logo.claude { background: linear-gradient(135deg, #cc785c, #b5694f); }
.engine-logo.google-aio { background: linear-gradient(135deg, #4285f4, #34a853); }
.engine-logo.gemini { background: linear-gradient(135deg, #8e44ef, #6366f1); }

.engine-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.engine-header .company {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 640px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.info-card h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.info-card .value {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Source Method Box */
.source-method {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.source-method h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.source-method p {
  margin: 0;
  font-size: 0.9375rem;
}

/* Tips Box (green) */
.tips-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.tips-box h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #10b981;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tips-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

.tips-box li {
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.tips-box li:last-child {
  margin-bottom: 0;
}

/* Key Insight Box (indigo/purple) */
.key-insight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.key-insight h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.key-insight p {
  margin: 0;
  font-size: 0.9375rem;
}

/* Warning Box (amber) */
.warning-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid #f59e0b;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.warning-box h4 {
  color: #f59e0b;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-box p, .warning-box ul {
  margin: 0;
  font-size: 0.9375rem;
}

.warning-box ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.warning-box li {
  margin-bottom: 0.25rem;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.875rem;
}

.comparison-table th {
  background: var(--bg-secondary);
  padding: 0.875rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
}

.comparison-table td {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

.comparison-table tr:hover {
  background: var(--bg-secondary);
}

.comparison-table .engine-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge.training { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.badge.realtime { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge.hybrid { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge.foundation { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.badge.tactical { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge.reference { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }

/* Sources Section */
.sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.sources h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.source-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}

.source-list li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.source-list a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.source-list a:hover {
  text-decoration: underline;
}

/* Next Steps CTA */
.next-steps {
  background: linear-gradient(135deg, var(--bg-secondary), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--border);
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.next-steps h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.next-steps p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.next-steps .btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.next-steps a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.next-steps a:hover {
  opacity: 0.9;
}

.next-steps a.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.next-steps a.secondary:hover {
  background: var(--bg-secondary);
}

/* Series Nav (where this fits box) */
.series-nav {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.series-nav p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.series-nav a {
  color: var(--primary);
  text-decoration: none;
}

.series-nav a:hover {
  text-decoration: underline;
}

/* Glossary-specific styles */
.glossary-section {
  margin-bottom: 3rem;
}

.glossary-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.glossary-term {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.glossary-term:last-child {
  border-bottom: none;
}

.glossary-term h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.glossary-term p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.glossary-term .term-ref {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-secondary);
}

.glossary-term .term-ref a {
  color: var(--primary);
  text-decoration: none;
}

.glossary-term .term-ref a:hover {
  text-decoration: underline;
}

/* Tool Card styles (article 14) */
.tool-category {
  margin-bottom: 3rem;
}

.tool-category h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.tool-card .tool-type {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #10b981;
  margin-bottom: 0.5rem;
}

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

.tool-card .tool-link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
}

.tool-card .tool-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .learn-container {
    padding: 1rem;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .comparison-table {
    font-size: 0.8125rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.625rem 0.5rem;
  }

  .next-steps .btn-group {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-intro {
    font-size: 1rem;
    padding: 1rem;
  }

  .bluf {
    padding: 1rem;
  }

  .bluf-content {
    font-size: 1rem;
  }
}
