/* Prose styling for dynamic HTML content from rich text editors */
.prose {
    color: #374151;
    max-width: none;
    line-height: 1.75;
}

/* Reset unwanted wrapper divs from copied content */
.prose div {
    all: unset;
    display: block;
    margin: 0;
    padding: 0;
}

.prose div[id],
.prose div[class],
.prose div[align],
.prose div[data-freestar-ad] {
    all: unset;
    display: block;
    margin: 0;
    padding: 0;
}

/* Ensure line breaks work */
.prose br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

/* Headings */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: #0F1724;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.prose h1 { font-size: 1.75em; }
.prose h2 { font-size: 1.5em; }
.prose h3 { font-size: 1.25em; }
.prose h4 { font-size: 1.125em; }
.prose h5 { font-size: 1em; font-weight: 600; }
.prose h6 { font-size: 0.875em; font-weight: 600; text-transform: uppercase; }

/* First heading has no top margin */
.prose > :first-child {
    margin-top: 0;
}

/* Last element has no bottom margin */
.prose > :last-child {
    margin-bottom: 0;
}

/* Paragraphs */
.prose p {
    margin-top: 1em;
    margin-bottom: 1em;
}

/* Lists */
.prose ul, .prose ol {
    margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 1.625em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 0.375em;
}

.prose ul ul, .prose ul ol, .prose ol ul, .prose ol ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose ul ul {
    list-style-type: circle;
}

.prose ul ul ul {
    list-style-type: square;
}

/* Nested lists */
.prose li > ul, .prose li > ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Text formatting */
.prose strong, .prose b {
    color: #0F1724;
    font-weight: 600;
}

.prose em, .prose i {
    font-style: italic;
}

.prose u {
    text-decoration: underline;
}

.prose s, .prose strike, .prose del {
    text-decoration: line-through;
}

.prose code {
    color: #0F1724;
    background-color: #F3F4F6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prose pre {
    background-color: #1F2937;
    color: #F9FAFB;
    padding: 1em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1em;
    margin-bottom: 1em;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.875em;
}

/* Links */
.prose a {
    color: #FF7F66;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #e56b53;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #FF7F66;
    padding-left: 1em;
    margin-left: 0;
    margin-top: 1em;
    margin-bottom: 1em;
    font-style: italic;
    color: #6B7280;
}

/* Horizontal rules */
.prose hr {
    border: 0;
    border-top: 1px solid #E5E7EB;
    margin-top: 2em;
    margin-bottom: 2em;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    margin-bottom: 1em;
}

.prose th {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    padding: 0.75em;
    text-align: left;
    font-weight: 600;
    color: #0F1724;
}

.prose td {
    border: 1px solid #E5E7EB;
    padding: 0.75em;
}

.prose tbody tr:nth-child(even) {
    background-color: #F9FAFB;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    margin-top: 1em;
    margin-bottom: 1em;
    border-radius: 0.5rem;
}

/* Small variant */
.prose-sm {
    font-size: 0.875rem;
    line-height: 1.6;
}

.prose-sm h1 { font-size: 1.5em; }
.prose-sm h2 { font-size: 1.25em; }
.prose-sm h3 { font-size: 1.125em; }
.prose-sm h4 { font-size: 1em; }
.prose-sm h5 { font-size: 0.875em; }
.prose-sm h6 { font-size: 0.75em; }

.prose-sm ul, .prose-sm ol {
    padding-left: 1.5em;
}

.prose-sm li {
    margin-top: 0.375em;
    margin-bottom: 0.375em;
}

.prose-sm code {
    font-size: 0.8125em;
}

.prose-sm pre {
    padding: 0.75em;
}

.prose-sm blockquote {
    padding-left: 0.875em;
}

.prose-sm th, .prose-sm td {
    padding: 0.5em;
}
