/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Grid pattern on footer */
#site-footer {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 25px 25px;
}

/* Selection */
::selection { background: #d1fadf; color: #1c1c18; }
mark { background: #d1fadf; }

.d-none {
  display: none !important;
}

/* Readable prose */
.prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #1c1c18;
}
.prose p { margin-top: 1.25em; margin-bottom: 1.25em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: #111110;
}
.prose h2 { font-size: 1.35rem; border-bottom: 1px solid #eeeeed; padding-bottom: 0.3em; }
.prose h3 { font-size: 1.15rem; }
.prose a { color: #1d6b4a; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #2d9268; }
.prose blockquote {
  border-left: 3px solid #d8d8d5;
  padding-left: 1.25rem;
  color: #56564f;
  font-style: italic;
  margin: 1.5em 0;
}
.prose code {
  font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
  font-size: 0.875em;
  background: #eeeeed;
  padding: 0.15em 0.35em;
  border-radius: 3px;
  color: #1c1c18;
}
.prose pre {
  background: #1c1c18;
  color: #eeeeed;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 1.75em 0;
}
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 1em 0; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin: 0.35em 0; }
.prose ul:has(input[type="checkbox"]):first { padding-left: 0; }
.prose ul li:has(> input[type="checkbox"])::marker { color: transparent; }
.prose hr { border: none; border-top: 1px solid #eeeeed; margin: 2.5em 0; }
/* .prose table { width: 100%; border-collapse: collapse; margin: 1.75em 0; font-size: 0.9rem; } */
.prose th { background: #f6f6f4; font-weight: 600; text-align: left; padding: 0.6em 0.9em; border-bottom: 2px solid #d8d8d5; }
.prose td { padding: 0.55em 0.9em; border-bottom: 1px solid #eeeeed; }
.prose img { max-width: 100%; border-radius: 4px; margin: 1.5em 0; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: 0.85rem; color: #8a8a83; text-align: center; margin-top: 0.5em; }

/* Anchor links for headings */
.prose h2:hover .anchor,
.prose h3:hover .anchor { opacity: 1; }
.anchor { opacity: 0; transition: opacity 0.15s; color: #b5b5b0; font-weight: 400; margin-left: 0.4em; text-decoration: none; font-size: 0.9em; }

/* TOC */
.toc a { color: #56564f; text-decoration: none; }
.toc a:hover { color: #1d6b4a; }
.toc li { margin: 0.3em 0; padding-left: 0; list-style: none; }
.toc ul { padding-left: 1rem; border-left: 1px solid #eeeeed; margin: 0.3em 0; }

/* Shortcode chart container */
.chart-container {
  background: #f6f6f4;
  border: 1px solid #eeeeed;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.75em 0;
  overflow-x: auto;
}

/* Data table shortcode */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  border: 1px solid #eeeeed;
  border-radius: 6px;
  overflow: hidden;
}
.data-table th {
  background: #1c1c18;
  color: #fafaf9;
  font-weight: 600;
  text-align: left;
  padding: 0.65em 1em;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.data-table td { padding: 0.6em 1em; border-bottom: 1px solid #eeeeed; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f6f6f4; }

/* Article card hover */
.article-card { transition: box-shadow 0.18s ease, transform 0.18s ease; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 4px 24px rgba(0,0,0,0.07); }

/* Tag pill */
.tag-pill {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #d8d8d5;
  color: #56564f;
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}
.tag-pill:hover:not(.no-hover) { border-color: #1d6b4a; color: #1d6b4a; }

hr.centered {
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  border: none;
  border-top: 1px solid #eeeeed;
}

.apexcharts-datalabel {
  fill: #fff !important;
}