/* Enhanced Article Styles - Apple + Duolingo */

/* Hero Header */
.article-hero {
  padding: 140px var(--space-md) var(--space-lg);
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
}

.article-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.article-meta-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

.category-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.read-time-badge {
  padding: 6px 14px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(88, 204, 2, 0.1);
  color: var(--color-emerald-dark);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.verified-badge::before {
  content: '✓';
  width: 16px;
  height: 16px;
  background: var(--color-emerald);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.article-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.article-subtitle {
  font-size: 20px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.author-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 14px;
}

.author-cred {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* Flash-Pass TL;DR Box */
.flash-pass {
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(250,250,252,0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.flash-pass-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.flash-pass-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #f4d03f 0%, #f7dc6f 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.flash-pass-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7d6608;
}

.flash-pass-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.flash-pass-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
}

.flash-pass-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-emerald);
  font-weight: 700;
}

/* Bento Quick Facts */
.bento-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.fact-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-fast);
}

.fact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.fact-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.fact-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Scientist's Note */
.scientist-note {
  background: linear-gradient(135deg, #e8f8f5 0%, #d5f5e3 100%);
  border-left: 4px solid var(--color-emerald);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
}

.scientist-note-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.scientist-note-icon {
  font-size: 20px;
}

.scientist-note-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0e6251;
}

.scientist-note p {
  color: #117a65;
  line-height: 1.7;
  margin: 0;
}

/* Check Your Knowledge */
.knowledge-check {
  background: linear-gradient(135deg, #ebf5fb 0%, #d6eaf8 100%);
  border: 2px solid var(--color-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
}

.knowledge-check-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.knowledge-check-icon {
  width: 32px;
  height: 32px;
  background: var(--color-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.knowledge-check-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a5276;
}

.knowledge-check-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.knowledge-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.knowledge-option {
  padding: 12px 16px;
  background: white;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 15px;
}

.knowledge-option:hover {
  border-color: var(--color-blue);
}

.knowledge-option.correct {
  background: rgba(88, 204, 2, 0.1);
  border-color: var(--color-emerald);
}

.knowledge-option.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--color-red);
}

/* Mermaid Diagram Container */
.mermaid-container {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  overflow-x: auto;
}

.mermaid-caption {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: var(--space-sm);
  font-style: italic;
}

/* Data Table - Dashboard Style */
.data-dashboard {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-lg) 0;
}

.data-dashboard-header {
  background: var(--color-bg-secondary);
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.data-dashboard-table th {
  background: var(--color-bg-tertiary);
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
}

.data-dashboard-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
}

.data-dashboard-table tr:last-child td {
  border-bottom: none;
}

.data-dashboard-table tr:hover td {
  background: var(--color-bg-tertiary);
}

/* FAQ Section */
.faq-section {
  margin: var(--space-xl) 0;
}

.faq-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--color-bg-tertiary);
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Conversion Footer */
.conversion-footer {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  text-align: center;
}

.conversion-footer h3 {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.conversion-footer p {
  color: rgba(255,255,255,0.8);
  font-size: 17px;
  margin-bottom: var(--space-lg);
}

/* Internal Links */
.internal-links {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-lg) 0;
}

.internal-links-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.internal-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.internal-links-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  background: white;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.internal-links-list a:hover {
  background: var(--color-navy);
  color: white;
}

/* Article Content Headings */
.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.2;
  color: #1a237e;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.3;
  color: #1a237e;
}

/* ═══ Tables inside article content ═══ */
.article-content table,
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  overflow: hidden;
  margin: 32px 0;
  background: white;
}

.article-content table th,
.comparison-table th {
  background: #f5f5f7;
  padding: 14px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #d2d2d7;
}

.article-content table td,
.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8ed;
  font-size: 15px;
  color: #1d1d1f;
}

.article-content table tr:last-child td,
.comparison-table tr:last-child td {
  border-bottom: none;
}

.article-content table tr:hover td,
.comparison-table tr:hover td {
  background: #fafafa;
}

/* ═══ Native <details>/<summary> FAQ styling ═══ */
.article-content details {
  background: white;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.article-content details summary {
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1d1d1f;
  transition: background 0.15s ease;
}

.article-content details summary:hover {
  background: #f5f5f7;
}

.article-content details summary::-webkit-details-marker {
  display: none;
}

.article-content details summary::marker {
  display: none;
  content: '';
}

.article-content details summary::after {
  content: '▸';
  font-size: 14px;
  color: #86868b;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.article-content details[open] summary::after {
  transform: rotate(90deg);
}

.article-content details[open] summary {
  border-bottom: 1px solid #d2d2d7;
}

.article-content details > p,
.article-content details > div {
  padding: 18px 20px;
  color: #515154;
  line-height: 1.7;
}

/* ═══ Notion-style Steps ═══ */
.steps-list {
  margin: 32px 0;
}

.step-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: white;
  border: 1px solid #e8e8ed;
  border-radius: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s ease;
}

.step-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.step-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a237e;
  margin: 0 0 8px;
  line-height: 1.3;
}

.step-content p {
  color: #515154;
  line-height: 1.7;
  margin: 0;
}

.step-content ul, .step-content ol {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #515154;
}

.step-content li {
  margin-bottom: 4px;
  line-height: 1.6;
}

/* ═══ Responsive ═══ */
/* Responsive */
@media (max-width: 768px) {
  .article-layout {
    display: block !important;
    grid-template-columns: none !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .toc-sidebar {
    position: relative !important;
    top: auto !important;
    margin-bottom: 24px;
  }

  .toc {
    border-radius: 12px;
  }

  .article-title {
    font-size: 32px;
  }

  .bento-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .data-dashboard-table {
    font-size: 13px;
  }

  .data-dashboard-table th,
  .data-dashboard-table td {
    padding: 12px 14px;
  }

  .article-hero { padding-top: 100px; }
  .article-subtitle { font-size: 16px; }
  .article-content h2 { font-size: 22px; margin-top: 32px; }
  .article-content h3 { font-size: 18px; margin-top: 20px; }
  .author-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .flash-pass { padding: 20px; }
  .flash-pass-list li { font-size: 15px; }
  .fact-number { font-size: 28px; }
  .conversion-footer { padding: 40px 20px; }
  .conversion-footer h3 { font-size: 22px; }
  .conversion-footer p { font-size: 15px; }
  .data-dashboard { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mermaid-container { padding: 16px; max-width: 100%; }
  .knowledge-option { padding: 14px 16px; font-size: 14px; }
  .faq-question { font-size: 15px; padding: 14px 16px; }
  .internal-links-list a { font-size: 14px; }
  .step-item { padding: 16px; gap: 14px; }
  .step-number { width: 34px; height: 34px; min-width: 34px; font-size: 15px; border-radius: 10px; }
  .step-content h3 { font-size: 16px; }
  .step-content p { font-size: 14px; }

  /* Tables mobile */
  .article-content table,
  .comparison-table { font-size: 13px; }
  .article-content table th, .comparison-table th,
  .article-content table td, .comparison-table td { padding: 12px 14px; }
  .article-content .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* FAQ details mobile */
  .article-content details summary { font-size: 15px; padding: 14px 16px; }
  .article-content details > p,
  .article-content details > div { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .article-title { font-size: 26px; }
  .bento-facts { grid-template-columns: 1fr; }
  .conversion-footer h3 { font-size: 20px; }
  .article-hero { padding-top: 80px; }
  .flash-pass { padding: 16px; }
  .fact-card { padding: 16px; }
}
