/* Shared styles for pages with content and TOC (article, tool pages) */

/* Progress Bar */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1000;
}

#progress-bar {
  height: 3px;
  width: 0%;
  background: var(--gradient);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Content padding for scroll */
.center-content {
  padding-bottom: 30vh;
}

/* Typography */
h2 {
  color: var(--color-text);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 70px;
}

h2:first-of-type {
  margin-top: 20px;
  font-size: 1.5rem;
}

h3 {
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  scroll-margin-top: 70px;
}

/* Scroll offset for all anchor targets (footnotes, etc.) */
:target {
  scroll-margin-top: 50px;
}

p {
  margin: 0.875rem 0;
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.7;
}

p strong, p b {
  color: var(--color-text);
  font-weight: 600;
}

p a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

p a:hover {
  color: var(--color-primary-dark);
}

ul {
  margin: 0.875rem 0;
  padding-left: 1.5rem;
}

ul li {
  margin: 0.5rem 0;
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

ul li strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Article Meta */
.article-meta {
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
}

.article-date,
.article-author {
  color: var(--color-text-muted);
}

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border-radius: 12px;
  padding: 0.5rem 2rem 0.2rem;
  margin-bottom: 2rem;
}

.welcome-section h2 {
  font-size: 1.75rem;
}

.welcome-section p {
  font-size: 1rem;
}

/* Table of Contents */
.right-sidebar h3 {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-nav a {
  display: block;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  padding: 0.25rem 0 0.25rem 0.5rem;
  transition: color 0.15s;
  border-left: 2px solid transparent;
}

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

.toc-nav a.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 500;
}

.toc-nav a.h3 {
  padding-left: 1rem;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
  h2, h3 {
    scroll-margin-top: 146px;
  }
  
  :target {
    scroll-margin-top: 126px;
  }
}
