/* ─── Design Tokens ──────────────────────────────── */
:root {
  --brand:        #6c47c4;
  --brand-light:  #ede8f9;
  --brand-mid:    #9b7ee0;
  --brand-dark:   #4e2fa8;
  --ink:          #0f0e17;
  --ink-2:        #3a3848;
  --ink-3:        #6b6880;
  --border:       #e4e2ed;
  --surface:      #fff;
  --surface-2:    #f7f6fc;
  --radius:       8px;
  --shadow-sm:    0 1px 3px rgba(108,71,196,0.07), 0 2px 8px rgba(108,71,196,0.05);
  --shadow-card:  0 1px 3px rgba(108,71,196,0.07), 0 4px 16px rgba(108,71,196,0.06);
  --shadow-hover: 0 4px 12px rgba(108,71,196,0.12), 0 12px 32px rgba(108,71,196,0.1);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
  --content-w:    720px;
  --layout-w:     1360px;
}

h1.hero-h1 {
    font-size: clamp(46px, 5.8vw, 62px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: #ffffff;
    max-width: 750px;
    margin: 0 0 20px;
}

/* Material Icons utility */
.material-icons-round {
  font-family: 'Material Icons Round';
  font-style: normal;
  font-weight: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: middle;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ─── Layout ─────────────────────────────────────── */
.c {
  max-width: var(--layout-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Top Nav Bar ────────────────────────────────── */
.art-nav {
  position: relative;
  max-width: var(--layout-w);
  margin: 0 auto;
}

.art-nav-inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ── Back button — pill style ── */
.art-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 7px 16px 7px 10px;
  border-radius: 100px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.01em;
}

.art-nav-back:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.38);
  transform: translateX(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.art-nav-back:active {
  transform: translateX(-1px) scale(0.98);
}

.art-nav-back .material-icons-round {
  font-size: 18px;
  transition: transform var(--transition);
  opacity: 0.85;
}

.art-nav-back:hover .material-icons-round {
  transform: translateX(-3px);
  opacity: 1;
}

/* Progress bar */
.art-progress {
  height: 3px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  z-index: 100;
}

.art-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid));
  border-radius: 100px;
  transition: width 0.1s linear;
}

.art-nav-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

.art-nav-breadcrumbs a {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.art-nav-breadcrumbs a:hover { color: #fff; }
.art-nav-breadcrumbs .sep {
  color: rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
}
.art-nav-breadcrumbs .sep .material-icons-round { font-size: 14px; }
.art-nav-breadcrumbs .current { color: rgba(255,255,255,0.85); font-weight: 500; }

/* ─── Hero ───────────────────────────────────────── */


.art-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.art-type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--brand-light);
  color: var(--brand-dark);
}

.art-hero-date {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}

.art-hero-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

.art-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.art-read-time .material-icons-round { font-size: 14px; opacity: 0.7; }

.art-hero h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  max-width: 820px;
  margin-bottom: 24px;
}

.art-hero-lead {
  font-size: clamp(16px, 1.5vw, 19px);
  color: rgba(255,255,255,0.7);
  max-width: 640px;
  line-height: 1.65;
  font-weight: 400;
  margin-bottom: 36px;
}

/* Author row */
.art-hero-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.art-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.art-author-info { display: flex; flex-direction: column; gap: 2px; }

.art-author-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.art-author-role {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ─── Hero Image ─────────────────────────────────── */
.art-hero-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  position: relative;
}

.art-hero-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.art-hero-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(15,14,23,0.15));
}

/* ─── Article Layout ─────────────────────────────── */
.art-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  max-width: var(--layout-w);
  margin: 0 auto;
  padding: 64px 40px 100px;
  align-items: start;
}

/* ─── Article Body ───────────────────────────────── */
.art-body { min-width: 0; }

/* Key takeaways box */
.art-takeaways {
  background: var(--brand-light);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.art-takeaways-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.art-takeaways ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.art-takeaways li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  font-weight: 400;
}

.art-takeaways li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Article prose */
.art-prose h2 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 48px 0 16px;
  line-height: 1.2;
}

.art-prose h2:first-child { margin-top: 0; }

.art-prose h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 32px 0 12px;
  line-height: 1.3;
}

.art-prose p {
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-2);
  margin-bottom: 20px;
  font-weight: 400;
}

.art-prose strong { font-weight: 600; color: var(--ink); }

.art-prose a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: rgba(108,71,196,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.art-prose a:hover { text-decoration-color: var(--brand); }

/* Pull quote */
.art-pullquote {
  border-left: 3px solid var(--brand);
  padding: 20px 28px;
  margin: 36px 0;
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.art-pullquote p {
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: -0.01em;
  font-style: italic;
  margin: 0;
}

/* Callout box */
.art-callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}

.art-callout-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.art-callout p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* Stat row */
.art-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 36px 0;
}

.art-stat {
  background: var(--surface);
  padding: 28px 24px;
  text-align: center;
}

.art-stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.art-stat-label {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 400;
  line-height: 1.4;
}

/* Ordered list */
.art-prose ol {
  list-style: none;
  counter-reset: art-counter;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 28px;
}

.art-prose ol li {
  counter-increment: art-counter;
  display: flex;
  gap: 16px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

.art-prose ol li::before {
  content: counter(art-counter);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Unordered list */
.art-prose ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 28px;
  padding-left: 4px;
}

.art-prose ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

.art-prose ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 8px;
}

/* Section divider */
.art-divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* Tags */
.art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.art-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 100px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: default;
}

.art-tag:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-color: var(--brand-mid);
}

/* Share row */
.art-share {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.art-share-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.art-share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  color: var(--ink-3);
}

.art-share-btn .material-icons-round { font-size: 17px; }

.art-share-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand-mid);
  color: var(--brand);
  transform: translateY(-2px);
}

/* Share button label text (LinkedIn, X) */
.art-share-btn-text {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ─── Sidebar ─────────────────────────────────────── */
.art-sidebar { position: sticky; top: 80px; }

/* Table of contents */
.art-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.art-toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.art-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-toc-item a {
  display: block;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  font-weight: 400;
}

.art-toc-item a:hover,
.art-toc-item.is-active a {
  color: var(--brand);
  background: var(--brand-light);
  border-left-color: var(--brand);
}

/* Related articles sidebar widget */
.art-sidebar-related {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.art-sidebar-related-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.art-related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.art-related-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.art-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.art-related-item:first-child { padding-top: 0; }

.art-related-item a {
  display: block;
  transition: color var(--transition);
}

.art-related-item a:hover .art-related-title { color: var(--brand); }

.art-related-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 5px;
}

.art-related-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  transition: color var(--transition);
}

.art-related-date {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* ─── Copy confirmation toast ─────────────────────── */
.copy-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  white-space: nowrap;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast .material-icons-round { font-size: 16px; color: #7ee87e; }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .art-layout {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 40px 80px;
  }
  .art-sidebar { position: static; }
}

@media (max-width: 768px) {
  .c { padding: 0 20px; }
  .art-nav-inner { padding: 0 20px; display: none;}
  .art-hero { padding: 52px 20px 48px; }
  .art-layout { padding: 40px 20px 64px; }
  .art-stats { grid-template-columns: 1fr; }
  .art-more { padding: 52px 0 64px; }
  .art-nav-breadcrumbs { display: none; }
  .art-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}


/* ═══════════════════════════════════════════════════
   ARTICLE TABLE — NEW, kept separate from .art-prose ol
   Used for the "Three root causes" comparison table
═══════════════════════════════════════════════════ */
.art-table-wrap {
  margin: 24px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.art-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.art-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--surface-2);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.art-table thead th:first-child {
  width: 30%;
}

.art-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.art-table tbody tr:last-child {
  border-bottom: none;
}

.art-table tbody tr:hover {
  background: var(--surface-2);
}

.art-table tbody td {
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  vertical-align: top;
}

.art-table tbody td strong {
  font-weight: 600;
  color: var(--ink);
}

.art-table tbody td:first-child {
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

/* Responsive — collapse to stacked label/value rows on narrow viewports */
@media (max-width: 640px) {
  .art-table thead {
    display: none;
  }

  .art-table, .art-table tbody, .art-table tr, .art-table td {
    display: block;
    width: 100%;
  }

  .art-table tbody tr {
    padding: 16px 20px;
  }

  .art-table tbody td {
    padding: 4px 0;
    white-space: normal;
  }

  .art-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 4px;
  }

  .art-table tbody td:first-child {
    margin-bottom: 6px;
    border: none;
  }
}