/* Gazette Dual-Duty Content Skin */


/* Web fonts: core registry via publicAsset('fonts/fonts.css') (reader + admin).
   OG TTFs for Pillow remain under assets/fonts/ (see social_preview.og_fonts). */

:root {
  /* Type — headlines in the house sans, stories in a reading serif */
  --font-sans: 'Playfair Display', serif;
  --font-serif: 'Playfair Display', serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.75rem;
  --text-s: 0.875rem;
  --text-m: 1.0625rem;
  --text-l: 1.25rem;
  --text-xl: clamp(1.75rem, 4vw, 2.5rem);
  --text-lead: clamp(1.625rem, 3.5vw, 2.375rem);
  --text-masthead: clamp(1.875rem, 5vw, 2.75rem);
  --leading-body: 1.65;
  --leading-tight: 1.12;
  --leading-standfirst: 1.45;
  --tracking-kicker: 0.08em;
  --weight-headline: 800;

  /* Color — paper white, near-black ink, press blue */
  --color-bg: #fdfdfb;
  --color-text: #15181d;
  --color-muted: #555c66;
  --color-accent: #0b53c4;
  --color-border: #e3e5e8;
  --color-code-bg: #f2f3f5;

  /* Traven Editor Requirements */
  --traven-font-display: var(--font-sans);
  --traven-font-body: var(--font-sans);
  --traven-font-mono: var(--font-mono);

  /* Layout */
  --page-max: 72rem;
  --measure: 66ch;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.75rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --front-gap: 1.75rem;
  --masthead-rule: 0.14em;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #16181d;
    --color-text: #eceef1;
    --color-muted: #a4adba;
    --color-accent: #8fb4f4;
    --color-border: #2e323a;
    --color-code-bg: #21252c;
  }
}

html[data-theme="dark"],
html.cm-wysiwym-dark {
  --color-bg: #16181d;
  --color-text: #eceef1;
  --color-muted: #a4adba;
  --color-accent: #8fb4f4;
  --color-border: #2e323a;
  --color-code-bg: #21252c;
}

/* Title block — dual-duty (published + admin) — type lives here once (KB A9) */
/* Section eyebrow (category) — accent, 700 */
.kicker {
  font-family: var(--traven-font-display) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: var(--tracking-kicker, 0.08em) !important;
  text-transform: uppercase !important;
  color: var(--color-accent) !important;
}

/* Trumpet — muted, 600; admin input uses .post-detail-trumpet */
.post-detail-trumpet,
.kicker-trumpet {
  font-family: var(--traven-font-display) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: var(--tracking-kicker, 0.08em) !important;
  text-transform: uppercase !important;
  color: var(--color-muted) !important;
  line-height: 1.4 !important;
}

.post-detail-title,
.story-head h1 {
  font-family: var(--traven-font-display) !important;
  font-size: var(--text-xl) !important;
  font-weight: var(--weight-headline) !important;
  line-height: var(--leading-tight) !important;
  letter-spacing: -0.015em !important;
  color: var(--color-text) !important;
}

.post-detail-deck {
  font-family: var(--traven-font-display) !important;
  font-size: var(--text-l) !important;
  line-height: var(--leading-standfirst) !important;
  color: var(--color-muted) !important;
  font-style: normal !important;
}

.standfirst {
  font-family: var(--traven-font-display) !important;
  line-height: var(--leading-standfirst) !important;
  color: var(--color-muted) !important;
  font-style: normal !important;
}

.story-card .standfirst {
  font-size: var(--text-s) !important;
}

.front-grid > li:first-child .standfirst {
  font-size: var(--text-l) !important;
}

.hero-title-block.traven-preview {
  background-color: var(--color-bg) !important;
  color: var(--color-text) !important;
}

/* 1. Base editor scopes */
.cm-editor,
.article-content.traven-preview {
  font-family: var(--font-serif) !important;
  font-size: var(--text-m);
  line-height: var(--leading-body) !important;
  color: var(--color-text);
  background-color: var(--color-bg) !important;
}

.cm-editor {
  background-color: var(--color-bg) !important;
}

.cm-editor .cm-scroller {
  padding-bottom: 50vh !important;
}

.cm-editor .cm-content {
  padding: 0 24px;
}

/* Caret / selection */
.cm-editor .cm-cursor { border-left-color: var(--color-text) !important; }
.cm-editor .cm-fat-cursor { background-color: var(--color-text) !important; opacity: 0.6 !important; }
.cm-editor .cm-selectionBackground, .cm-editor.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground { background-color: var(--color-accent) !important; opacity: 0.2; }

/* 2. Headings */
.cm-editor .cm-wysiwym-h1,
.cm-editor .cm-wysiwym-h2,
.cm-editor .cm-wysiwym-h3,
.cm-editor .cm-wysiwym-h4,
.cm-editor .cm-wysiwym-h5,
.cm-editor .cm-wysiwym-h6,
.article-content.traven-preview h1,
.article-content.traven-preview h2,
.article-content.traven-preview h3,
.article-content.traven-preview h4,
.article-content.traven-preview h5,
.article-content.traven-preview h6 {
  font-family: var(--font-sans) !important;
  font-weight: var(--weight-headline) !important;
  line-height: var(--leading-tight) !important;
  color: var(--color-text);
}

.cm-editor .cm-wysiwym-h1, .article-content.traven-preview h1 { font-size: var(--text-xl) !important; }
.cm-editor .cm-wysiwym-h2, .article-content.traven-preview h2 { font-size: var(--text-l) !important; }
.cm-editor .cm-wysiwym-h3, .article-content.traven-preview h3 { font-size: var(--text-m) !important; font-weight: 700 !important; }
.cm-editor .cm-wysiwym-h4, .article-content.traven-preview h4 { font-size: var(--text-m) !important; font-weight: 700 !important; }

/* Editor Headings: Use Padding (No Margin) */
.cm-editor .cm-wysiwym-h1 { padding-top: 1.75rem !important; padding-bottom: 0.5rem !important; margin: 0 !important; }
.cm-editor .cm-wysiwym-h2 { padding-top: 1.75rem !important; padding-bottom: 0.5rem !important; margin: 0 !important; }
.cm-editor .cm-wysiwym-h3 { padding-top: 1.75rem !important; padding-bottom: 0.5rem !important; margin: 0 !important; }
.cm-editor .cm-wysiwym-h4 { padding-top: 1.75rem !important; padding-bottom: 0.5rem !important; margin: 0 !important; }
.cm-editor .cm-wysiwym-h5 { padding-top: 1.75rem !important; padding-bottom: 0.5rem !important; margin: 0 !important; }
.cm-editor .cm-wysiwym-h6 { padding-top: 1.75rem !important; padding-bottom: 0.5rem !important; margin: 0 !important; }

/* Preview Headings */
.article-content.traven-preview h1,
.article-content.traven-preview h2,
.article-content.traven-preview h3,
.article-content.traven-preview h4,
.article-content.traven-preview h5,
.article-content.traven-preview h6 {
  margin-top: 1.75rem !important;
  margin-bottom: 0.5rem !important;
}

/* First-child parity */
.cm-editor .cm-wysiwym-h2:first-child { padding-top: 27px !important; }
.article-content.traven-preview > h2:first-child { margin-top: 27px !important; }

/* Remove underlines in editor heading tokens */
.cm-editor .cm-wysiwym-h1 cmt-heading,
.cm-editor .cm-wysiwym-h2 cmt-heading,
.cm-editor .cm-wysiwym-h3 cmt-heading { text-decoration: none !important; }

/* 3. Inline marks & paragraphs */
.article-content.traven-preview p,
.article-content.traven-preview ul,
.article-content.traven-preview ol {
  margin-bottom: 1rem !important;
}
.article-content.traven-preview p,
.article-content.traven-preview li {
  font-family: var(--font-serif) !important;
}

.cm-editor .cm-wysiwym-bold { font-weight: 700 !important; }
.cm-editor .cm-wysiwym-italic { font-style: italic !important; }
.cm-editor .cm-wysiwym-strikethrough { text-decoration: line-through !important; }

.cm-editor .cm-wysiwym-link-anchor,
.article-content.traven-preview a {
  color: var(--color-accent) !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.cm-editor .cm-wysiwym-inline-code,
.article-content.traven-preview code {
  font-family: var(--font-mono) !important;
  font-size: 0.85em !important;
  background-color: var(--color-code-bg) !important;
  padding: 0.1em 0.35em !important;
  border-radius: var(--radius) !important;
}
.article-content.traven-preview pre code { background: transparent !important; padding: 0 !important; font-size: var(--text-s) !important; }

/* 4. Blockquotes */
.cm-editor .cm-wysiwym-blockquote,
.article-content.traven-preview blockquote:not(.traven-component-pullquote):not(.markdown-alert):not(.traven-alert) {
  font-size: var(--text-l) !important;
  line-height: var(--leading-standfirst) !important;
  border-left: 3px solid var(--color-accent) !important;
  color: var(--color-text) !important;
  background: transparent !important;
}

.article-content.traven-preview blockquote:not(.traven-component-pullquote):not(.markdown-alert):not(.traven-alert) {
  margin: 1.75rem 0 !important;
  padding-left: 1rem !important;
}
.article-content.traven-preview blockquote:not(.traven-component-pullquote):not(.markdown-alert):not(.traven-alert) p {
  margin-bottom: 0.5rem !important;
}

/* Editor Blockquote (multiple lines) */
.cm-editor .cm-wysiwym-blockquote {
  margin: 0 !important;
  padding-left: 1rem !important;
}
.cm-editor .cm-wysiwym-blockquote { padding-top: 10px !important; padding-bottom: 2px !important; }
.cm-editor .cm-wysiwym-blockquote + .cm-wysiwym-blockquote { padding-top: 2px !important; }
.cm-editor .cm-wysiwym-blockquote:not(:has(+ .cm-wysiwym-blockquote)) { padding-bottom: 10px !important; }

/* 5. Code Fences */
.cm-editor .cm-wysiwym-codeblock-line,
.article-content.traven-preview pre {
  font-family: var(--font-mono) !important;
  background-color: var(--color-code-bg) !important;
  color: var(--color-text) !important;
  font-size: var(--text-s) !important;
  line-height: 1.5 !important;
}

.article-content.traven-preview pre {
  padding: 1rem !important;
  border-radius: var(--radius) !important;
  overflow-x: auto !important;
  margin: 1.75rem 0 !important;
}

.cm-editor .cm-wysiwym-codeblock-line {
  margin: 0 !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}
.cm-editor .cm-wysiwym-codeblock-line-first { padding-top: 1rem !important; border-top-left-radius: var(--radius) !important; border-top-right-radius: var(--radius) !important; }
.cm-editor .cm-wysiwym-codeblock-line-last { padding-bottom: 1rem !important; border-bottom-left-radius: var(--radius) !important; border-bottom-right-radius: var(--radius) !important; }

/* 6. HR */
.cm-editor .cm-wysiwym-hr-widget,
.article-content.traven-preview hr {
  border: 0;
  border-top: 1px solid var(--color-border) !important;
  margin: 3rem auto !important;
  width: 5rem !important;
}
.cm-editor .cm-wysiwym-hr-widget {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
  margin: 0 auto !important;
}

/* 7. Tables */
.cm-editor .cm-wysiwym-table-widget table,
.article-content.traven-preview table {
  border-collapse: collapse !important;
  width: 100% !important;
  font-family: var(--font-sans) !important;
  font-size: var(--text-s) !important;
  font-variant-numeric: tabular-nums !important;
}
.article-content.traven-preview table { margin: 0 0 1rem !important; }
.cm-editor .cm-wysiwym-table-widget { margin: 0 !important; padding: 1rem 0 !important; box-sizing: border-box; }
.cm-editor .cm-wysiwym-table-row { margin: 0 !important; }

.cm-editor .cm-wysiwym-table-widget th,
.cm-editor .cm-wysiwym-table-widget td,
.article-content.traven-preview th,
.article-content.traven-preview td {
  text-align: left !important;
  padding: 0.5rem 1rem !important;
  border-bottom: 1px solid var(--color-border) !important;
  height: 38px !important;
}
.cm-editor .cm-wysiwym-table-widget th,
.article-content.traven-preview th {
  font-size: var(--text-xs) !important;
  text-transform: uppercase !important;
  letter-spacing: var(--tracking-kicker) !important;
  color: var(--color-muted) !important;
}

/* 8. Widgets & Alignment */
/* Image, Video, Audio, Component padding in editor (Zero Margin Rule) */
.cm-editor .cm-wysiwym-image-shortcode-container,
.cm-editor .cm-wysiwym-video-shortcode-container,
.cm-editor .cm-wysiwym-audio-shortcode-container,
.cm-editor .cm-wysiwym-component-shortcode,
.cm-editor .cm-wysiwym-figure-shortcode {
  margin: 0 !important;
  padding: 1.5rem 0 !important;
  box-sizing: border-box;
}

/* Alignment Helpers */
.cm-editor .cm-wysiwym-image-shortcode-container.align-left,
.cm-editor .cm-wysiwym-video-shortcode-container.align-left,
.cm-editor .cm-wysiwym-component-shortcode.align-left,
.cm-editor .cm-wysiwym-figure-shortcode.align-left { margin: 0 auto 0 0 !important; }

.cm-editor .cm-wysiwym-image-shortcode-container.align-right,
.cm-editor .cm-wysiwym-video-shortcode-container.align-right,
.cm-editor .cm-wysiwym-component-shortcode.align-right,
.cm-editor .cm-wysiwym-figure-shortcode.align-right { margin: 0 0 0 auto !important; }

.cm-editor .cm-wysiwym-image-shortcode-container.align-center,
.cm-editor .cm-wysiwym-video-shortcode-container.align-center,
.cm-editor .cm-wysiwym-component-shortcode.align-center,
.cm-editor .cm-wysiwym-figure-shortcode.align-center { margin: 0 auto !important; }

.article-content.traven-preview .align-left { float: left !important; margin: 1.5rem 1.5rem 1.5rem 0 !important; }
.article-content.traven-preview .align-right { float: right !important; margin: 1.5rem 0 1.5rem 1.5rem !important; }
.article-content.traven-preview .align-center,
.article-content.traven-preview .gallery-single.inline-image-center,
.article-content.traven-preview .gallery-single.align-center,
.article-content.traven-preview .gallery-single:not(.align-left):not(.align-right):not(.inline-image-left):not(.inline-image-right):not(.align-fullbleed) {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  text-align: center;
}

/* Width Classes */
.size-small { width: 30% !important; max-width: 300px; }
.size-medium { width: 50% !important; max-width: 500px; }
.size-large { width: 70% !important; }
.size-full { width: 100% !important; }

/* Fullbleed */
.cm-editor .cm-wysiwym-image-shortcode-container.align-fullbleed,
.cm-editor .cm-wysiwym-figure-shortcode.align-fullbleed {
  width: 100% !important;
  max-width: 100% !important;
}
.article-content.traven-preview .align-fullbleed {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  display: block !important;
  float: none !important;
  clear: both !important;
}

/* Captions */
.gallery-single .caption,
.figure-full .caption,
.classic-markdown-figure .caption,
figcaption.caption,
span.caption,
figcaption.traven-image-caption,
figcaption.traven-video-caption,
figcaption.traven-audio-caption,
.cm-editor .cm-wysiwym-image-caption,
.cm-editor .figure-caption {
  font-size: var(--text-xs) !important;
  color: var(--color-muted) !important;
  padding-top: 0.5rem !important;
  border-bottom: 1px solid var(--color-border) !important;
  padding-bottom: 0.5rem !important;
  margin-top: 0 !important;
  display: block;
  text-align: left;
  line-height: 1.4 !important;
}

/* Components */
.cm-editor .cm-wysiwym-component-shortcode blockquote,
.cm-editor .cm-wysiwym-component-shortcode p,
.cm-editor .cm-wysiwym-figure-shortcode p {
  margin: 0 !important;
  padding: 0 !important;
}
.cm-editor .cm-wysiwym-component-shortcode p + p,
.cm-editor .cm-wysiwym-figure-shortcode p + p {
  margin-top: 0.8em !important;
}

.cm-editor .cm-wysiwym-component-shortcode.component-blockquote,
.article-content.traven-preview .traven-component-blockquote {
  font-size: var(--text-l) !important;
  line-height: var(--leading-standfirst) !important;
  border-left: 3px solid var(--color-accent) !important;
  padding-left: 1rem !important;
  margin: 1.75rem 0 !important;
}
.cm-editor .cm-wysiwym-component-shortcode.component-blockquote {
  margin: 0 !important;
  padding-top: 1.75rem !important;
  padding-bottom: 1.75rem !important;
  overflow: hidden;
}

.cm-editor .cm-wysiwym-component-shortcode cite,
.article-content.traven-preview .traven-component-blockquote cite {
  font-family: var(--font-sans) !important;
  font-size: var(--text-s) !important;
  color: var(--color-muted) !important;
  display: block;
  margin-top: 1rem;
}

.cm-editor .cm-wysiwym-component-shortcode.component-info,
.cm-editor .cm-wysiwym-component-shortcode.component-warning,
.article-content.traven-preview .traven-component-info,
.article-content.traven-preview .traven-component-warning {
  border: 1px solid var(--color-accent) !important;
  border-radius: var(--radius) !important;
  padding: 1rem !important;
  background-color: var(--color-bg) !important;
  margin: 1.75rem 0 !important;
}
.cm-editor .cm-wysiwym-component-shortcode.component-info,
.cm-editor .cm-wysiwym-component-shortcode.component-warning {
  margin: 0 !important;
}

/* 9. Blank line collapse & specific fixes */
.cm-editor .cm-wysiwym-collapsed-fence {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-codeblock-line-first),
.cm-editor .cm-wysiwym-codeblock-line-last + .cm-line:has(br:only-child),
.cm-editor .cm-wysiwym-h1 + .cm-line:has(br:only-child),
.cm-editor .cm-wysiwym-h2 + .cm-line:has(br:only-child),
.cm-editor .cm-wysiwym-h3 + .cm-line:has(br:only-child),
.cm-editor .cm-wysiwym-h4 + .cm-line:has(br:only-child),
.cm-editor .cm-wysiwym-mermaid-container + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-mermaid-container),
.cm-editor .cm-wysiwym-table-widget + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-table-widget),
.cm-editor .cm-wysiwym-image-shortcode-container + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-image-shortcode-container),
.cm-editor .cm-wysiwym-video-shortcode-container + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-video-shortcode-container),
.cm-editor .cm-wysiwym-audio-shortcode-container + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-audio-shortcode-container),
.cm-editor .cm-wysiwym-block-math-widget + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-block-math-widget),
.cm-editor .cm-wysiwym-component-shortcode + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-component-shortcode),
.cm-editor .cm-wysiwym-figure-shortcode + .cm-line:has(br:only-child),
.cm-editor .cm-line:has(br:only-child):has(+ .cm-wysiwym-figure-shortcode) {
  height: 0.4em !important;
  min-height: 0.4em !important;
}

/* Math */
.cm-editor .cm-wysiwym-mermaid-container { margin: 0 auto !important; padding-top: 16px !important; padding-bottom: 16px !important; box-sizing: border-box; }
.cm-wysiwym-block-math-widget { margin: 0 auto !important; padding: 12px !important; box-sizing: border-box; }
.cm-editor .katex-display-fallback { margin: 0 auto !important; padding: 12px !important; box-sizing: border-box; }

/* Alerts */
.cm-editor .cm-wysiwym-alert { margin: 0 !important; padding: 1rem !important; }
/* GitHub Alerts & Callouts (GOTCHAS §4) ------------------------------------- */

.traven-preview .markdown-alert,
.traven-preview .traven-alert,
.article-content .markdown-alert,
.article-content .traven-alert {
  margin: 1.5rem 0 !important;
  padding: 1rem 1.25rem !important;
  border-left: 4px solid var(--color-accent, #8b0000) !important;
  border-radius: 0 2px 2px 0 !important;
  background-color: var(--color-panel, #f4f3f0) !important;
  color: var(--color-text, #111111) !important;
  font-style: normal !important;
}

.traven-preview .markdown-alert p,
.traven-preview .traven-alert p,
.article-content .markdown-alert p,
.article-content .traven-alert p {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
  font-style: normal !important;
}

.traven-preview .markdown-alert p:last-child,
.traven-preview .traven-alert p:last-child,
.article-content .markdown-alert p:last-child,
.article-content .traven-alert p:last-child {
  margin-bottom: 0 !important;
}

.traven-preview .markdown-alert-title,
.traven-preview .traven-alert-title,
.article-content .markdown-alert-title,
.article-content .traven-alert-title {
  font-family: var(--font-sans, 'Inter', sans-serif) !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  margin-bottom: 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-style: normal !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.traven-preview .markdown-alert-title svg,
.traven-preview .traven-alert-title svg,
.article-content .markdown-alert-title svg,
.article-content .traven-alert-title svg {
  width: 1em !important;
  height: 1em !important;
  fill: currentColor !important;
}

/* Alert Variants — Light Mode */
.traven-preview .markdown-alert-note,
.traven-preview .traven-alert-note,
.article-content .markdown-alert-note,
.article-content .traven-alert-note {
  border-left-color: #2563eb !important;
  background-color: #eff6ff !important;
  color: #1e40af !important;
}
.traven-preview .markdown-alert-note *,
.traven-preview .traven-alert-note *,
.article-content .markdown-alert-note *,
.article-content .traven-alert-note * {
  color: #1e40af !important;
}

.traven-preview .markdown-alert-tip,
.traven-preview .traven-alert-tip,
.article-content .markdown-alert-tip,
.article-content .traven-alert-tip {
  border-left-color: #16a34a !important;
  background-color: #f0fdf4 !important;
  color: #166534 !important;
}
.traven-preview .markdown-alert-tip *,
.traven-preview .traven-alert-tip *,
.article-content .markdown-alert-tip *,
.article-content .traven-alert-tip * {
  color: #166534 !important;
}

.traven-preview .markdown-alert-important,
.traven-preview .traven-alert-important,
.article-content .markdown-alert-important,
.article-content .traven-alert-important {
  border-left-color: #9333ea !important;
  background-color: #faf5ff !important;
  color: #6b21a8 !important;
}
.traven-preview .markdown-alert-important *,
.traven-preview .traven-alert-important *,
.article-content .markdown-alert-important *,
.article-content .traven-alert-important * {
  color: #6b21a8 !important;
}

.traven-preview .markdown-alert-warning,
.traven-preview .traven-alert-warning,
.article-content .markdown-alert-warning,
.article-content .traven-alert-warning {
  border-left-color: #d97706 !important;
  background-color: #fffbeb !important;
  color: #92400e !important;
}
.traven-preview .markdown-alert-warning *,
.traven-preview .traven-alert-warning *,
.article-content .markdown-alert-warning *,
.article-content .traven-alert-warning * {
  color: #92400e !important;
}

.traven-preview .markdown-alert-caution,
.traven-preview .traven-alert-caution,
.article-content .markdown-alert-caution,
.article-content .traven-alert-caution {
  border-left-color: #dc2626 !important;
  background-color: #fef2f2 !important;
  color: #991b1b !important;
}
.traven-preview .markdown-alert-caution *,
.traven-preview .traven-alert-caution *,
.article-content .markdown-alert-caution *,
.article-content .traven-alert-caution * {
  color: #991b1b !important;
}

/* Alert Variants — Dark Mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .traven-preview .markdown-alert-note,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-note,
  :root:not([data-theme="light"]) .article-content .markdown-alert-note,
  :root:not([data-theme="light"]) .article-content .traven-alert-note {
    border-left-color: #3b82f6 !important;
    background-color: rgba(37, 99, 235, 0.15) !important;
    color: #93c5fd !important;
  }
  :root:not([data-theme="light"]) .traven-preview .markdown-alert-note *,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-note *,
  :root:not([data-theme="light"]) .article-content .markdown-alert-note *,
  :root:not([data-theme="light"]) .article-content .traven-alert-note * {
    color: #93c5fd !important;
  }

  :root:not([data-theme="light"]) .traven-preview .markdown-alert-tip,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-tip,
  :root:not([data-theme="light"]) .article-content .markdown-alert-tip,
  :root:not([data-theme="light"]) .article-content .traven-alert-tip {
    border-left-color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
  }
  :root:not([data-theme="light"]) .traven-preview .markdown-alert-tip *,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-tip *,
  :root:not([data-theme="light"]) .article-content .markdown-alert-tip *,
  :root:not([data-theme="light"]) .article-content .traven-alert-tip * {
    color: #6ee7b7 !important;
  }

  :root:not([data-theme="light"]) .traven-preview .markdown-alert-important,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-important,
  :root:not([data-theme="light"]) .article-content .markdown-alert-important,
  :root:not([data-theme="light"]) .article-content .traven-alert-important {
    border-left-color: #a855f7 !important;
    background-color: rgba(168, 85, 247, 0.15) !important;
    color: #d8b4fe !important;
  }
  :root:not([data-theme="light"]) .traven-preview .markdown-alert-important *,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-important *,
  :root:not([data-theme="light"]) .article-content .markdown-alert-important *,
  :root:not([data-theme="light"]) .article-content .traven-alert-important * {
    color: #d8b4fe !important;
  }

  :root:not([data-theme="light"]) .traven-preview .markdown-alert-warning,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-warning,
  :root:not([data-theme="light"]) .article-content .markdown-alert-warning,
  :root:not([data-theme="light"]) .article-content .traven-alert-warning {
    border-left-color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fde047 !important;
  }
  :root:not([data-theme="light"]) .traven-preview .markdown-alert-warning *,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-warning *,
  :root:not([data-theme="light"]) .article-content .markdown-alert-warning *,
  :root:not([data-theme="light"]) .article-content .traven-alert-warning * {
    color: #fde047 !important;
  }

  :root:not([data-theme="light"]) .traven-preview .markdown-alert-caution,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-caution,
  :root:not([data-theme="light"]) .article-content .markdown-alert-caution,
  :root:not([data-theme="light"]) .article-content .traven-alert-caution {
    border-left-color: #f43f5e !important;
    background-color: rgba(244, 63, 94, 0.15) !important;
    color: #fca5a5 !important;
  }
  :root:not([data-theme="light"]) .traven-preview .markdown-alert-caution *,
  :root:not([data-theme="light"]) .traven-preview .traven-alert-caution *,
  :root:not([data-theme="light"]) .article-content .markdown-alert-caution *,
  :root:not([data-theme="light"]) .article-content .traven-alert-caution * {
    color: #fca5a5 !important;
  }
}

html[data-theme="dark"] .traven-preview .markdown-alert-note,
html[data-theme="dark"] .traven-preview .traven-alert-note,
html[data-theme="dark"] .article-content .markdown-alert-note,
html[data-theme="dark"] .article-content .traven-alert-note,
html.cm-wysiwym-dark .traven-preview .markdown-alert-note,
html.cm-wysiwym-dark .traven-preview .traven-alert-note,
html.cm-wysiwym-dark .article-content .markdown-alert-note,
html.cm-wysiwym-dark .article-content .traven-alert-note,
.cm-wysiwym-dark .traven-preview .markdown-alert-note,
.cm-wysiwym-dark .traven-preview .traven-alert-note,
.cm-wysiwym-dark .article-content .markdown-alert-note,
.cm-wysiwym-dark .article-content .traven-alert-note,
.traven-preview.dark .markdown-alert-note,
.traven-preview.dark .traven-alert-note {
  border-left-color: #3b82f6 !important;
  background-color: rgba(37, 99, 235, 0.15) !important;
  color: #93c5fd !important;
}
html[data-theme="dark"] .traven-preview .markdown-alert-note *,
html[data-theme="dark"] .traven-preview .traven-alert-note *,
html[data-theme="dark"] .article-content .markdown-alert-note *,
html[data-theme="dark"] .article-content .traven-alert-note *,
html.cm-wysiwym-dark .traven-preview .markdown-alert-note *,
html.cm-wysiwym-dark .traven-preview .traven-alert-note *,
html.cm-wysiwym-dark .article-content .markdown-alert-note *,
html.cm-wysiwym-dark .article-content .traven-alert-note *,
.cm-wysiwym-dark .traven-preview .markdown-alert-note *,
.cm-wysiwym-dark .traven-preview .traven-alert-note *,
.cm-wysiwym-dark .article-content .markdown-alert-note *,
.cm-wysiwym-dark .article-content .traven-alert-note *,
.traven-preview.dark .markdown-alert-note *,
.traven-preview.dark .traven-alert-note * {
  color: #93c5fd !important;
}

html[data-theme="dark"] .traven-preview .markdown-alert-tip,
html[data-theme="dark"] .traven-preview .traven-alert-tip,
html[data-theme="dark"] .article-content .markdown-alert-tip,
html[data-theme="dark"] .article-content .traven-alert-tip,
html.cm-wysiwym-dark .traven-preview .markdown-alert-tip,
html.cm-wysiwym-dark .traven-preview .traven-alert-tip,
html.cm-wysiwym-dark .article-content .markdown-alert-tip,
html.cm-wysiwym-dark .article-content .traven-alert-tip,
.cm-wysiwym-dark .traven-preview .markdown-alert-tip,
.cm-wysiwym-dark .traven-preview .traven-alert-tip,
.cm-wysiwym-dark .article-content .markdown-alert-tip,
.cm-wysiwym-dark .article-content .traven-alert-tip,
.traven-preview.dark .markdown-alert-tip,
.traven-preview.dark .traven-alert-tip {
  border-left-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] .traven-preview .markdown-alert-tip *,
html[data-theme="dark"] .traven-preview .traven-alert-tip *,
html[data-theme="dark"] .article-content .markdown-alert-tip *,
html[data-theme="dark"] .article-content .traven-alert-tip *,
html.cm-wysiwym-dark .traven-preview .markdown-alert-tip *,
html.cm-wysiwym-dark .traven-preview .traven-alert-tip *,
html.cm-wysiwym-dark .article-content .markdown-alert-tip *,
html.cm-wysiwym-dark .article-content .traven-alert-tip *,
.cm-wysiwym-dark .traven-preview .markdown-alert-tip *,
.cm-wysiwym-dark .traven-preview .traven-alert-tip *,
.cm-wysiwym-dark .article-content .markdown-alert-tip *,
.cm-wysiwym-dark .article-content .traven-alert-tip *,
.traven-preview.dark .markdown-alert-tip *,
.traven-preview.dark .traven-alert-tip * {
  color: #6ee7b7 !important;
}

html[data-theme="dark"] .traven-preview .markdown-alert-important,
html[data-theme="dark"] .traven-preview .traven-alert-important,
html[data-theme="dark"] .article-content .markdown-alert-important,
html[data-theme="dark"] .article-content .traven-alert-important,
html.cm-wysiwym-dark .traven-preview .markdown-alert-important,
html.cm-wysiwym-dark .traven-preview .traven-alert-important,
html.cm-wysiwym-dark .article-content .markdown-alert-important,
html.cm-wysiwym-dark .article-content .traven-alert-important,
.cm-wysiwym-dark .traven-preview .markdown-alert-important,
.cm-wysiwym-dark .traven-preview .traven-alert-important,
.cm-wysiwym-dark .article-content .markdown-alert-important,
.cm-wysiwym-dark .article-content .traven-alert-important,
.traven-preview.dark .markdown-alert-important,
.traven-preview.dark .traven-alert-important {
  border-left-color: #a855f7 !important;
  background-color: rgba(168, 85, 247, 0.15) !important;
  color: #d8b4fe !important;
}
html[data-theme="dark"] .traven-preview .markdown-alert-important *,
html[data-theme="dark"] .traven-preview .traven-alert-important *,
html[data-theme="dark"] .article-content .markdown-alert-important *,
html[data-theme="dark"] .article-content .traven-alert-important *,
html.cm-wysiwym-dark .traven-preview .markdown-alert-important *,
html.cm-wysiwym-dark .traven-preview .traven-alert-important *,
html.cm-wysiwym-dark .article-content .markdown-alert-important *,
html.cm-wysiwym-dark .article-content .traven-alert-important *,
.cm-wysiwym-dark .traven-preview .markdown-alert-important *,
.cm-wysiwym-dark .traven-preview .traven-alert-important *,
.cm-wysiwym-dark .article-content .markdown-alert-important *,
.cm-wysiwym-dark .article-content .traven-alert-important *,
.traven-preview.dark .markdown-alert-important *,
.traven-preview.dark .traven-alert-important * {
  color: #d8b4fe !important;
}

html[data-theme="dark"] .traven-preview .markdown-alert-warning,
html[data-theme="dark"] .traven-preview .traven-alert-warning,
html[data-theme="dark"] .article-content .markdown-alert-warning,
html[data-theme="dark"] .article-content .traven-alert-warning,
html.cm-wysiwym-dark .traven-preview .markdown-alert-warning,
html.cm-wysiwym-dark .traven-preview .traven-alert-warning,
html.cm-wysiwym-dark .article-content .markdown-alert-warning,
html.cm-wysiwym-dark .article-content .traven-alert-warning,
.cm-wysiwym-dark .traven-preview .markdown-alert-warning,
.cm-wysiwym-dark .traven-preview .traven-alert-warning,
.cm-wysiwym-dark .article-content .markdown-alert-warning,
.cm-wysiwym-dark .article-content .traven-alert-warning,
.traven-preview.dark .markdown-alert-warning,
.traven-preview.dark .traven-alert-warning {
  border-left-color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #fde047 !important;
}
html[data-theme="dark"] .traven-preview .markdown-alert-warning *,
html[data-theme="dark"] .traven-preview .traven-alert-warning *,
html[data-theme="dark"] .article-content .markdown-alert-warning *,
html[data-theme="dark"] .article-content .traven-alert-warning *,
html.cm-wysiwym-dark .traven-preview .markdown-alert-warning *,
html.cm-wysiwym-dark .traven-preview .traven-alert-warning *,
html.cm-wysiwym-dark .article-content .markdown-alert-warning *,
html.cm-wysiwym-dark .article-content .traven-alert-warning *,
.cm-wysiwym-dark .traven-preview .markdown-alert-warning *,
.cm-wysiwym-dark .traven-preview .traven-alert-warning *,
.cm-wysiwym-dark .article-content .markdown-alert-warning *,
.cm-wysiwym-dark .article-content .traven-alert-warning *,
.traven-preview.dark .markdown-alert-warning *,
.traven-preview.dark .traven-alert-warning * {
  color: #fde047 !important;
}

html[data-theme="dark"] .traven-preview .markdown-alert-caution,
html[data-theme="dark"] .traven-preview .traven-alert-caution,
html[data-theme="dark"] .article-content .markdown-alert-caution,
html[data-theme="dark"] .article-content .traven-alert-caution,
html.cm-wysiwym-dark .traven-preview .markdown-alert-caution,
html.cm-wysiwym-dark .traven-preview .traven-alert-caution,
html.cm-wysiwym-dark .article-content .markdown-alert-caution,
html.cm-wysiwym-dark .article-content .traven-alert-caution,
.cm-wysiwym-dark .traven-preview .markdown-alert-caution,
.cm-wysiwym-dark .traven-preview .traven-alert-caution,
.cm-wysiwym-dark .article-content .markdown-alert-caution,
.cm-wysiwym-dark .article-content .traven-alert-caution,
.traven-preview.dark .markdown-alert-caution,
.traven-preview.dark .traven-alert-caution {
  border-left-color: #f43f5e !important;
  background-color: rgba(244, 63, 94, 0.15) !important;
  color: #fca5a5 !important;
}
html[data-theme="dark"] .traven-preview .markdown-alert-caution *,
html[data-theme="dark"] .traven-preview .traven-alert-caution *,
html[data-theme="dark"] .article-content .markdown-alert-caution *,
html[data-theme="dark"] .article-content .traven-alert-caution *,
html.cm-wysiwym-dark .traven-preview .markdown-alert-caution *,
html.cm-wysiwym-dark .traven-preview .traven-alert-caution *,
html.cm-wysiwym-dark .article-content .markdown-alert-caution *,
html.cm-wysiwym-dark .article-content .traven-alert-caution *,
.cm-wysiwym-dark .traven-preview .markdown-alert-caution *,
.cm-wysiwym-dark .traven-preview .traven-alert-caution *,
.cm-wysiwym-dark .article-content .markdown-alert-caution *,
.cm-wysiwym-dark .article-content .traven-alert-caution *,
.traven-preview.dark .markdown-alert-caution *,
.traven-preview.dark .traven-alert-caution * {
  color: #fca5a5 !important;
}

/* Image Shortcode & Photo Wrapper Support */
.gallery-single, .figure-full {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  clear: both;
}

.photo-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius, 2px);
  border: 1px solid var(--color-border, #ddd);
  background-color: var(--color-bg, #fff);
}

.photo-wrapper img,
.gallery-single img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Classic Markdown Images & Figures */
img.classic-markdown {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: var(--radius, 2px);
  border: 1px solid var(--color-border, #ddd);
}

.classic-markdown-figure {
  display: block;
  margin: 1.5rem auto;
  clear: both;
}

.classic-markdown-figure img.classic-markdown {
  margin: 0 auto;
}

