/* ============================================================
   Article single page — layout, TOC, share buttons
   Scoped entirely to .art-* classes, no global overrides
   ============================================================ */

/* ── Header inner wrapper ──────────────────────────────────── */
.art-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}

@media (min-width: 640px)  { .art-header-inner { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .art-header-inner { padding-left: 2rem; padding-right: 2rem; } }

.art-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0050cb;
  margin-bottom: 2rem;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.15s;
}
.art-back-link:hover { opacity: 0.75; text-decoration: underline; }

.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.art-category-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  background: #dae1ff;
  color: #00187a;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
}
.art-date {
  font-size: 0.875rem;
  color: rgba(25,28,30,0.5);
  font-family: 'Inter', sans-serif;
}

.art-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #191c1e;
  line-height: 1.25;
  margin-bottom: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.art-description {
  font-size: 1.125rem;
  color: rgba(25,28,30,0.7);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 0;
  font-family: 'Inter', sans-serif;
}

/* ── Share buttons ─────────────────────────────────────────── */
.art-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.75rem;
}
.art-share--bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}
.art-share-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(25,28,30,0.45);
  font-family: 'Inter', sans-serif;
  margin-right: 0.25rem;
}
.art-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  line-height: 1;
}
.art-share-btn:active { transform: scale(0.96); }

/* LinkedIn */
.art-share-linkedin {
  color: #0a66c2;
  border-color: rgba(10,102,194,0.25);
  background: rgba(10,102,194,0.05);
}
.art-share-linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

/* Twitter / X */
.art-share-twitter {
  color: #0f1419;
  border-color: rgba(15,20,25,0.2);
  background: rgba(15,20,25,0.04);
}
.art-share-twitter:hover {
  background: #0f1419;
  border-color: #0f1419;
  color: #fff;
}

/* Copy link */
.art-share-copy {
  color: #0050cb;
  border-color: rgba(0,80,203,0.22);
  background: rgba(0,80,203,0.05);
}
.art-share-copy:hover {
  background: #0050cb;
  border-color: #0050cb;
  color: #fff;
}
.art-share-copy.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

/* ── Two-column layout ─────────────────────────────────────── */
.art-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .art-layout {
    grid-template-columns: 1fr 260px;
    gap: 4rem;
    padding: 4rem 2rem 5rem;
  }
}
@media (min-width: 1280px) {
  .art-layout { grid-template-columns: 1fr 280px; }
}

.art-main { min-width: 0; }

/* ── Sidebar (desktop) ─────────────────────────────────────── */
.art-sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .art-sidebar {
    display: block;
    position: sticky;
    top: 5.5rem; /* clears fixed navbar */
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    /* hide scrollbar */
    scrollbar-width: none;
  }
  .art-sidebar::-webkit-scrollbar { display: none; }
}

.art-toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1rem;
}

.art-toc-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(25,28,30,0.5);
  margin: 0 0 0.875rem;
  font-family: 'Inter', sans-serif;
}

.art-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* TOC links — desktop sidebar */
.art-toc-link {
  display: block;
  font-size: 0.8125rem;
  color: rgba(25,28,30,0.6);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 0.375rem;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  line-height: 1.45;
  font-family: 'Inter', sans-serif;
}
.art-toc-link:hover {
  color: #0050cb;
  background: rgba(0,80,203,0.05);
}
.art-toc-link.toc-h3 {
  padding-left: 1.25rem;
  font-size: 0.78rem;
}
/* Active highlight */
.art-toc-link.is-active {
  color: #0050cb;
  background: rgba(0,80,203,0.08);
  border-left-color: #0050cb;
  font-weight: 600;
}

/* ── Mobile TOC ────────────────────────────────────────────── */
.art-toc-mobile {
  display: block;
  margin-bottom: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  overflow: hidden;
  background: #f9fafb;
}
@media (min-width: 1024px) {
  .art-toc-mobile { display: none; }
}

.art-toc-mobile-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.art-toc-mobile-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(25,28,30,0.55);
}
.art-toc-mobile-chevron {
  color: rgba(25,28,30,0.4);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.art-toc-mobile-toggle[aria-expanded="true"] .art-toc-mobile-chevron {
  transform: rotate(180deg);
}

.art-toc-mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.art-toc-mobile-nav.open {
  padding-bottom: 0.875rem;
}

/* Mobile TOC links share the same style */
.art-toc-mobile-nav .art-toc-link {
  font-size: 0.875rem;
}

/* ── Progress bar (thin, top of viewport) ──────────────────── */
#art-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #0050cb, #4f8ef7);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}
