/* =========================================================
   Linkdasher — long-form content (Blog, Knowledge Base, Updates)
   Styles the HTML produced by Core\Markdown. Loaded by the public
   layout and by the admin blog editor's live preview, so what the
   admin previews is exactly what visitors see.
   ========================================================= */

.ld-prose {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.ld-prose > * + * { margin-top: 1.15em; }
.ld-prose h2, .ld-prose h3, .ld-prose h4, .ld-prose h5 {
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: 6rem;
  letter-spacing: -0.01em;
}
.ld-prose h1 { color: #f8fafc; font-size: 1.875rem; font-weight: 800; margin-top: 2em; }
.ld-prose h2 { font-size: 1.5rem;  margin-top: 2em; }
.ld-prose h3 { font-size: 1.2rem;  margin-top: 1.75em; }
.ld-prose h4 { font-size: 1.05rem; margin-top: 1.5em; }
.ld-prose h2 + *, .ld-prose h3 + *, .ld-prose h4 + * { margin-top: 0.6em; }
.ld-prose > :first-child { margin-top: 0; }
.ld-prose a { color: #60a5fa; text-decoration: underline; text-decoration-color: rgba(96,165,250,.4); text-underline-offset: 3px; }
.ld-prose a:hover { color: #93c5fd; text-decoration-color: currentColor; }
.ld-prose strong { color: #f1f5f9; font-weight: 600; }
.ld-prose ul, .ld-prose ol { padding-left: 1.4em; }
.ld-prose ul { list-style: disc; }
.ld-prose ol { list-style: decimal; }
.ld-prose li { margin-top: .35em; padding-left: .2em; }
.ld-prose li::marker { color: #64748b; }
.ld-prose li > ul, .ld-prose li > ol { margin-top: .35em; }
.ld-prose li.md-task { list-style: none; margin-left: -1.3em; }
.ld-prose li.md-task input { margin-right: .4em; accent-color: #3b82f6; }
.ld-prose hr { border: 0; border-top: 1px solid #1e293b; margin: 2.5em 0; }
.ld-prose blockquote {
  border-left: 3px solid #3b82f6;
  padding: .25em 0 .25em 1em;
  color: #94a3b8;
  font-style: italic;
}
.ld-prose code {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: .375rem;
  padding: .1em .4em;
  font-size: .875em;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ld-prose pre {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: .75rem;
  padding: 1em 1.15em;
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.6;
}
.ld-prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: #e2e8f0; }
.ld-prose img, .ld-prose video { max-width: 100%; height: auto; border-radius: .75rem; }
.ld-prose figure { margin-top: 1.75em; margin-bottom: 1.75em; }
.ld-prose figure img, .ld-prose figure video { display: block; margin: 0 auto; border: 1px solid #1e293b; }
.ld-prose figcaption { text-align: center; color: #64748b; font-size: .875rem; margin-top: .6em; }
.ld-prose .md-table { overflow-x: auto; border: 1px solid #1e293b; border-radius: .75rem; }
.ld-prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ld-prose th { background: #111a2e; color: #f1f5f9; font-weight: 600; text-align: left; }
.ld-prose th, .ld-prose td { padding: .6em .9em; border-bottom: 1px solid #1e293b; vertical-align: top; }
.ld-prose tr:last-child td { border-bottom: 0; }
.ld-prose .md-embed { position: relative; aspect-ratio: 16 / 9; border-radius: .75rem; overflow: hidden; background: #0f172a; }
.ld-prose .md-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Callouts: > [!TIP] / [!NOTE] / [!WARNING] / [!IMPORTANT] / [!CAUTION] */
.ld-prose .md-callout {
  border: 1px solid; border-radius: .75rem; padding: .85em 1.1em;
  font-size: .95em;
}
.ld-prose .md-callout > * + * { margin-top: .5em; }
.ld-prose .md-callout-title { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.ld-prose .md-callout-tip       { background: rgba(16,185,129,.07); border-color: rgba(16,185,129,.3); }
.ld-prose .md-callout-tip .md-callout-title { color: #34d399; }
.ld-prose .md-callout-note      { background: rgba(59,130,246,.07); border-color: rgba(59,130,246,.3); }
.ld-prose .md-callout-note .md-callout-title { color: #60a5fa; }
.ld-prose .md-callout-important { background: rgba(168,85,247,.07); border-color: rgba(168,85,247,.3); }
.ld-prose .md-callout-important .md-callout-title { color: #c084fc; }
.ld-prose .md-callout-warning, .ld-prose .md-callout-caution { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.3); }
.ld-prose .md-callout-warning .md-callout-title, .ld-prose .md-callout-caution .md-callout-title { color: #fbbf24; }

/* Compact variant (Knowledge Base answers, Updates descriptions) */
.ld-prose-sm { font-size: .975rem; line-height: 1.7; }
.ld-prose-sm h2 { font-size: 1.25rem; }
.ld-prose-sm h3 { font-size: 1.075rem; }

/* Heading anchor (blog) */
.ld-prose .h-anchor { opacity: 0; margin-left: .35em; color: #475569; text-decoration: none; font-weight: 400; }
.ld-prose h2:hover .h-anchor, .ld-prose h3:hover .h-anchor, .ld-prose .h-anchor:focus { opacity: 1; }

/* Search highlight */
mark.ld-hl { background: rgba(250, 204, 21, .22); color: inherit; border-radius: .2em; padding: 0 .1em; }

/* Reading progress bar (blog post) */
#ld-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg,#3b82f6,#8b5cf6); z-index: 60; transition: width .1s linear; }

/* Line clamp helpers (Tailwind CDN has line-clamp built in, kept for safety) */
.ld-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ld-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  #ld-progress { transition: none; }
  html { scroll-behavior: auto !important; }
}
