/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/*
 * Blog article typography.
 *
 * Written as plain CSS rather than Tailwind's `prose` classes: the
 * @tailwindcss/typography plugin is present in package.json but is not loaded
 * by app/assets/tailwind/application.css (Tailwind v4 needs an explicit
 * `@plugin` directive), so `prose` would silently render as unstyled markup.
 * These rules are scoped to .blog-content so they cannot leak into the rest of
 * the app, and this file is linked after tailwind.css in the layout.
 */
.blog-content {
  color: #374151;
  line-height: 1.75;
  font-size: 1.0625rem;
}

.blog-content > * + * {
  margin-top: 1.25em;
}

.blog-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2937;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 5rem;
}

.blog-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5rem;
}

.blog-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-content p {
  margin-bottom: 1.25rem;
}

.blog-content a {
  color: #7c3aed;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-content a:hover {
  color: #5b21b6;
}

.blog-content strong {
  font-weight: 700;
  color: #1f2937;
}

.blog-content ul,
.blog-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }

.blog-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.blog-content li > ul,
.blog-content li > ol {
  margin: 0.5rem 0;
}

.blog-content blockquote {
  border-left: 4px solid #a78bfa;
  background: #f5f3ff;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #4c1d95;
  font-style: italic;
}

.blog-content blockquote p:last-child { margin-bottom: 0; }

.blog-content code {
  background: #f3f4f6;
  color: #be123c;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.blog-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Tables scroll on small screens instead of forcing the page to scroll. */
.blog-content .table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.blog-content th,
.blog-content td {
  border: 1px solid #e5e7eb;
  padding: 0.625rem 0.875rem;
  text-align: left;
}

.blog-content th {
  background: #f9fafb;
  font-weight: 600;
  color: #1f2937;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.blog-content hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem 0;
}
