/*
 * 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.
 */

/* =========================
   Markdown Container
========================= */

.markdown {
  color: #1f2937; /* gray-800 */
  line-height: 1.75;
  max-width: 65ch;
}

/* =========================
   Headings
========================= */

.markdown h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .markdown h1 {
    font-size: 3rem;
  }
}

.markdown h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.markdown h3 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* =========================
   Paragraphs
========================= */

.markdown p {
  font-size: 1.125rem;
  color: #4b5563; /* gray-600 */
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

/* =========================
   Links
========================= */

.markdown a {
  color: #111827; /* gray-900 */
  text-decoration: underline;
}

.markdown a:hover {
  text-decoration: none;
}

/* =========================
   Lists
========================= */

.markdown ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: #4b5563;
}

.markdown ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: #4b5563;
}

.markdown li {
  margin-bottom: 0.5rem;
}

/* =========================
   Blockquotes
========================= */

.markdown blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  font-style: italic;
  color: #4b5563;
  margin: 1.5rem 0;
}

/* =========================
   Images
========================= */

.markdown img {
  border-radius: 0.375rem;
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

/* =========================
   Horizontal Rule
========================= */

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

/* =========================
   INLINE CODE (SAFE)
========================= */

.markdown p code,
.markdown li code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* =========================
   CODE BLOCKS (ROUGE)
========================= */

.markdown pre {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  white-space: pre;
}

/* Rouge <code> inside <pre> */
.markdown pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* Rouge syntax spans */
.markdown pre span {
  white-space: pre;
}
