/* Typography for server-rendered Markdown output (Description today, more fields in later
   phases). All rules are scoped under .markdown-content so they never leak into the rest of the
   app's typography -- notably, the heading color override below intentionally shadows the
   global h1-h6 rule (site.css) only inside this scope. */

/* Markdown output is real block-level HTML (<p>, <ul>, <blockquote>, etc). The parchment boxes
   this content renders inside (.quest-description-box, .recap-display-box in quests.css) set
   white-space: pre-wrap -- an inherited property -- to preserve newlines from the old plain-text
   era. Left inherited, that would also preserve the insignificant newlines Markdig emits between
   block elements, doubling the vertical spacing. Overriding back to normal here collapses that
   whitespace for rendered Markdown only; raw-text fields that still share those box classes (with
   no .markdown-content child) keep their pre-wrap line-break preservation untouched. */
.markdown-content {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    white-space: normal;
}

.markdown-content strong {
    font-weight: 700;
}

/* Quest Description is short-form card/detail content, not a document -- headings still step
   down by level (matching the editor's own cm-header-N sizing) so authors get visible hierarchy,
   but the scale is capped at 1.5rem instead of letting an author-chosen H1 render at full browser
   document size inside a quest card. Color/text-shadow match .quest-description-box exactly
   (quests.css) because this content always renders inside that dark-overlay box; the global
   site.css h1-h6 rule uses a dark-brown color meant for the light parchment background and would
   be nearly invisible here. */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #F4E4BC;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.markdown-content h1 {
    font-size: 1.5rem;
}

.markdown-content h2 {
    font-size: 1.375rem;
}

.markdown-content h3 {
    font-size: 1.25rem;
}

.markdown-content h4 {
    font-size: 1.125rem;
}

.markdown-content h5 {
    font-size: 1rem;
}

.markdown-content h6 {
    font-size: 0.875rem;
}

/* EasyMDE's live Preview pane (.editor-preview) renders the identical Markdig-generated HTML as
   the saved page, but only .markdown-content carried this rule -- so a blockquote showed styled
   on Details/Manage/email yet plain in Preview, a real EDITOR-04 (preview-matches-saved)
   mismatch. Scoping the same rule to .editor-preview keeps every Blockquote-button field (Quest,
   Character, Contact) consistent between the two render paths. */
.markdown-content blockquote,
.editor-preview blockquote {
    border-left: 3px solid rgba(255, 193, 7, 0.5);
    padding-left: 12px;
    font-style: italic;
}

/* The heading color above assumes .markdown-content always renders inside the dark-overlay
   .quest-description-box/.recap-display-box. Quest Details' Description block and every field
   on Quest Manage's collapsible sections render .markdown-content directly inside the light
   .modern-card-body instead, with no dark box -- the pale heading color is nearly invisible
   there, so this reverts headings back to the card's own dark text color in that context. */
.modern-card-body > .markdown-content h1,
.modern-card-body > .markdown-content h2,
.modern-card-body > .markdown-content h3,
.modern-card-body > .markdown-content h4,
.modern-card-body > .markdown-content h5,
.modern-card-body > .markdown-content h6 {
    color: #1a1a1a;
    text-shadow: none;
}
