/* ── Base Article Layout & Typography ─────────────────────
   Provides the site-wide reset, variables, and article-specific
   typography that matches the Direcstaff design language.
   Must be loaded alongside nav.css for full page styling. */

:root {
  --navy: #0a1628;
  --blue-dark: #1e3a5f;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-accent: #60a5fa;
  --accent: #2563eb;
  --purple: #7c3aed;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --stat-bg: rgba(37, 99, 235, 0.06);
  --stat-border: rgba(37, 99, 235, 0.15);
  --text-muted: #64748b;
  --text-body: #334155;
  --tldr-bg: #f0f7ff;
  --tldr-border: #c8ddf5;
  --takeaway-bg: rgba(37, 99, 235, 0.03);
  --chart-border: #e2e8f0;
  --chart-header-bg: #f8fafc;
  --chart-hover: rgba(37, 99, 235, 0.04);
  --timeline-line: rgba(37, 99, 235, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Article Container ──────────────────────────────────── */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

article h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

article h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

article h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

article h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

article p {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

article a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

article a:hover {
  border-bottom-color: var(--blue);
}

article ul, article ol {
  margin: 0.75rem 0 1.5rem 1.5rem;
  color: var(--gray-600);
}

article li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

article strong {
  color: var(--gray-800);
  font-weight: 600;
}

article blockquote {
  border-left: 4px solid var(--blue-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--gray-50);
  border-radius: 0 8px 8px 0;
  color: var(--gray-600);
  font-style: italic;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

article table th {
  background: var(--gray-50);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--gray-800);
  border-bottom: 2px solid var(--gray-200);
}

article table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
}

article table tr:hover td {
  background: var(--gray-50);
}

article hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 2rem 0;
}

/* ── Article Images ─────────────────────────────────────── */
article img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.5rem 0;
  display: block;
}

article figure {
  margin: 2rem 0;
}

article figcaption {
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  main {
    padding: 2rem 1.25rem 3rem;
  }
  article h1 {
    font-size: 1.8rem;
  }
  article h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
  }
  article h3 {
    font-size: 1.15rem;
  }
  article p, article li {
    font-size: 1rem;
  }
}

/* ── Article Format Elements ──────────────────────────────
   Shared styles for callouts, stat blocks, process flows,
   timelines, comparison charts, TL;DR and key takeaway boxes.
   Used by org-factory content generation across all sites. */

/* ── Callout Boxes ──────────────────────────────────────── */
.callout {
  border-left: 4px solid var(--accent, #1A6CFF);
  background: rgba(26, 108, 255, 0.08);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.95em;
  line-height: 1.6;
}
.callout strong:first-child {
  display: inline;
  margin-right: 4px;
}
.callout-tip {
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}
.callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.callout-info {
  border-left-color: var(--accent, #1A6CFF);
  background: rgba(26, 108, 255, 0.08);
}

/* ── Stat Blocks ────────────────────────────────────────── */
.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--stat-bg, rgba(26, 108, 255, 0.06));
  border: 1px solid var(--stat-border, rgba(26, 108, 255, 0.15));
  border-radius: 12px;
  padding: 24px 20px;
  margin: 24px 0;
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent, #1A6CFF);
}
.stat-label {
  font-size: 0.9em;
  color: var(--text-muted, #666);
  margin-top: 8px;
  max-width: 280px;
}

/* ── TL;DR Box ──────────────────────────────────────────── */
.tldr-box {
  background: var(--tldr-bg, #f0f7ff);
  border: 1px solid var(--tldr-border, #c8ddf5);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}
.tldr-box h3 {
  margin: 0 0 12px;
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent, #1A6CFF);
}
.tldr-box ul {
  margin: 0;
  padding-left: 20px;
}
.tldr-box li {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ── Key Takeaway Box ───────────────────────────────────── */
.key-takeaway {
  border: 2px solid var(--accent, #1A6CFF);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--takeaway-bg, rgba(26, 108, 255, 0.03));
}
.key-takeaway h3 {
  margin: 0 0 12px;
  font-size: 1.05em;
  font-weight: 700;
  color: var(--accent, #1A6CFF);
}
.key-takeaway ul {
  margin: 0;
  padding-left: 20px;
}
.key-takeaway li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ── Process Flow ───────────────────────────────────────── */
.process-flow {
  margin: 28px 0;
  padding-left: 8px;
}
.process-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 24px;
}
.process-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--accent, #1A6CFF);
  opacity: 0.3;
}
.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent, #1A6CFF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9em;
}
.step-content {
  flex: 1;
  padding-top: 4px;
}
.step-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05em;
}
.step-content p {
  margin: 0;
  color: var(--text-muted, #555);
  line-height: 1.5;
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline {
  margin: 28px 0;
  padding-left: 8px;
  border-left: 3px solid var(--timeline-line, rgba(26, 108, 255, 0.2));
}
.timeline-item {
  position: relative;
  padding: 0 0 24px 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #1A6CFF);
  border: 2px solid #fff;
}
.timeline-date {
  display: block;
  font-weight: 700;
  font-size: 0.85em;
  color: var(--accent, #1A6CFF);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.timeline-content {
  line-height: 1.5;
  color: var(--text-body, #333);
}

/* ── Comparison Chart ───────────────────────────────────── */
.comparison-chart {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--chart-border, #e5e7eb);
}
.comparison-chart table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}
.comparison-chart th {
  background: var(--chart-header-bg, #f8fafc);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 2px solid var(--chart-border, #e5e7eb);
}
.comparison-chart td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--chart-border, #e5e7eb);
}
.comparison-chart tr:last-child td {
  border-bottom: none;
}
.comparison-chart tr:hover td {
  background: var(--chart-hover, rgba(26, 108, 255, 0.04));
}

/* ── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .stat-number { font-size: 2.2rem; }
  .stat-block { padding: 18px 16px; }
  .callout { padding: 12px 16px; }
  .tldr-box, .key-takeaway { padding: 16px 18px; }
  .process-step { gap: 12px; }
  .step-number { width: 30px; height: 30px; font-size: 0.8em; }
  .process-step:not(:last-child)::before { left: 14px; }
  .comparison-chart { font-size: 0.85em; }
  .comparison-chart th, .comparison-chart td { padding: 8px 10px; }
}