.prose {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial;
  color: #374151; /* text-gray-700 */
  line-height: 1.75;
  font-size: 1rem;
  word-break: break-word;
  max-width: none; /* you already used max-w-none in template */
}

/* Headings */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #0f172a; /* gray-900 */
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.25;
  font-weight: 700;
  scroll-margin-top: 1.5rem; /* for anchor jumps */
}
.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.125rem; }
.prose h5, .prose h6 { font-size: 1rem; font-weight: 600; }

/* Paragraphs */
.prose p {
  margin: 0 0 1.15em 0;
  color: inherit;
  font-size: 1rem;
}

/* Links */
.prose a {
  color: #1e40af; /* blue-900 */
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: #0b5ed7; text-decoration-color: currentColor; }

/* Images & figures */
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.1rem 0;
  object-fit: cover;
}
.prose figure { margin: 1.25rem 0; }
.prose figcaption {
  font-size: 0.875rem;
  color: #6b7280; /* gray-500 */
  margin-top: 0.5rem;
  text-align: center;
}

/* Lists */
.prose ul,
.prose ol {
  margin: 0 0 1.15em 1.25rem;
  padding: 0;
}
.prose li { margin: 0.45em 0; }

/* Blockquote */
.prose blockquote {
  border-left: 4px solid #e6edf8;
  background: #f8fafc;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  color: #374151;
  border-radius: 0.375rem;
  font-style: italic;
}

/* Code & preformatted */
.prose pre {
  overflow: auto;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #0f172a; /* dark background for code blocks */
  color: #f8fafc;
  margin: 1rem 0;
}
.prose code {
  background: rgba(15,23,42,0.06);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.95em;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  overflow: auto;
}
.prose th,
.prose td {
  border: 1px solid #e6eaf0;
  padding: 0.6rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: #f3f6fb;
  font-weight: 600;
}

/* Horizontal rule */
.prose hr {
  border: none;
  height: 1px;
  background: #e6e9ef;
  margin: 1.25rem 0;
}

/* Media embeds (iframe, video) */
.prose iframe,
.prose video {
  width: 100%;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* Footnotes / small text */
.prose small {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Emphasis */
.prose strong { color: #0f172a; font-weight: 700; }
.prose em { font-style: italic; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .prose h1 { font-size: 1.6rem; }
  .prose h2 { font-size: 1.25rem; }
  .prose { font-size: 0.98rem; line-height: 1.6; }
}

/* Utility to ensure long words don't overflow */
.prose pre, .prose code, .prose p, .prose td {
  word-break: break-word;
  hyphens: auto;
}

/* Optional: subtle drop shadow for images inside .prose */
.prose img {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* Accessibility: focus outline for keyboard nav on links inside prose */
.prose a:focus {
  outline: 3px solid rgba(14, 165, 233, 0.25);
  outline-offset: 3px;
}


/*for subject css*/

.subject-content {
  --content-max-width: 100%;
  --color-heading: #0f172a;       /* dark heading */
  --color-sub: #0b63b8;           /* blue accent */
  --color-muted: #6b7280;         /* gray text */
  --color-accent: #f59e0b;        /* yellow accent */
  --content-font-size: 1rem;
  font-size: var(--content-font-size);
  line-height: 1.65;
  color: #111827;
  max-width: var(--content-max-width);
  word-wrap: break-word;
}

/* Headings */
.subject-content h1,
.subject-content h2,
.subject-content h3,
.subject-content h4,
.subject-content h5,
.subject-content h6 {
  color: var(--color-heading);
  margin: 1.2rem 0 0.6rem;
  line-height: 1.25;
  font-weight: 700;
}

.subject-content h1 { font-size: 2.1rem; }
.subject-content h2 { font-size: 1.6rem; color: var(--color-sub); }
.subject-content h3 { font-size: 1.35rem; }
.subject-content h4 { font-size: 1.15rem; }

/* Paragraphs */
.subject-content p {
  margin: 0 0 0.9rem;
  color: var(--color-muted);
  font-size: 1rem;
}

/* Links */
.subject-content a {
  color: var(--color-sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.subject-content a:hover,
.subject-content a:focus {
  color: color-mix(in srgb, var(--color-sub) 85%, black 15%);
  text-decoration: none;
}

/* Lists */
.subject-content ul,
.subject-content ol {
  margin: 0 0 0.9rem 1.25rem;
  padding: 0;
}
.subject-content li { margin: 0.35rem 0; }

/* Images & figures */
.subject-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.6rem auto;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}
.subject-content figure { margin: 0 0 1rem; }
.subject-content figcaption {
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
  margin-top: 0.4rem;
}

/* Tables: responsive container + simple styling */
.subject-content .table-wrap { overflow-x: auto; width: 100%; }
.subject-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.subject-content th,
.subject-content td {
  border: 1px solid #e6e9ee;
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.subject-content th {
  background: #f8fafc;
  color: var(--color-heading);
  font-weight: 600;
}

/* Blockquote */
.subject-content blockquote {
  border-left: 4px solid var(--color-sub);
  margin: 0.8rem 0;
  padding: 0.6rem 1rem;
  background: #fbfdff;
  color: #111827;
  border-radius: 6px;
}

/* Code & pre */
.subject-content pre {
  overflow: auto;
  padding: 0.9rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e6eef8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.9rem;
  margin: 0.8rem 0;
}
.subject-content code {
  background: #f3f4f6;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 0.92em;
}

/* Horizontal rule */
.subject-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
  margin: 1.2rem 0;
}

/* Small text */
.subject-content small,
.subject-content .small { font-size: 0.85rem; color: #6b7280; }

/* Utility: make tables responsive by wrapping them in .table-wrap in generated HTML */
.subject-content table:not(.no-wrap) { min-width: 560px; }
.subject-content .table-wrap table { min-width: 560px; }

/* Accessibility: focus outlines for interactive elements */
.subject-content a:focus,
.subject-content button:focus {
  outline: 3px solid rgba(11,99,184,0.18);
  outline-offset: 3px;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .subject-content h1 { font-size: 1.6rem; }
  .subject-content h2 { font-size: 1.25rem; }
  .subject-content { font-size: 0.98rem; }
}




