/* sky-prose.css — shared long-form article/blog content styling for SkySuite.
   Everything is scoped under .sky-prose so it cannot leak into other UI.
   Colors come from the live theme tokens, so it is correct in light and dark. */

.sky-prose{
  --prose-accent: var(--sky-accent, #6366f1);
  --prose-text:   var(--sky-text, #16181d);
  --prose-muted:  var(--sky-text-muted, #5b6472);
  --prose-border: var(--sky-border, #e3e8ef);
  --prose-surface:var(--sky-surface, #f6f8fb);
  --prose-measure: 68ch;

  color: var(--prose-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.075rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}

/* Reading column: text sits at a comfortable measure and is centered;
   figures are allowed to run wider, which gives the page a magazine rhythm. */
.sky-prose > p,
.sky-prose > ul,
.sky-prose > ol,
.sky-prose > h2,
.sky-prose > h3,
.sky-prose > blockquote,
.sky-prose > pre,
.sky-prose > hr{
  max-width: var(--prose-measure);
  margin-left: auto;
  margin-right: auto;
}

.sky-prose p{ margin: 0 auto 1.25em; }
.sky-prose p:first-child{ margin-top: 0; }

/* Headings — Geist, a clear scale, and a quiet hairline under section heads. */
.sky-prose h2,
.sky-prose h3{
  font-family: Geist, Inter, sans-serif;
  color: var(--prose-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.sky-prose h2{
  font-size: clamp(1.4rem, 3.2vw, 1.75rem);
  font-weight: 650;
  margin: 2.2em auto 0.7em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--prose-border);
}
.sky-prose h3{
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
  font-weight: 600;
  margin: 1.8em auto 0.5em;
}
.sky-prose strong{ font-weight: 650; color: var(--prose-text); }
.sky-prose em{ font-style: italic; }

/* Links */
.sky-prose a{
  color: var(--prose-accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--prose-accent) 35%, transparent);
  transition: border-color .15s ease;
}
.sky-prose a:hover{ border-bottom-color: var(--prose-accent); }

/* Lists */
.sky-prose ul,
.sky-prose ol{ padding-left: 1.4em; margin: 0 auto 1.25em; }
.sky-prose ul{ list-style: disc; }
.sky-prose ol{ list-style: decimal; }
.sky-prose li{ margin: 0.4em 0; padding-left: 0.2em; }
.sky-prose li::marker{ color: var(--prose-accent); }
.sky-prose li > ul,
.sky-prose li > ol{ margin: 0.4em 0; }

/* Blockquote — an accented pull, not a plain indent. */
.sky-prose blockquote{
  margin: 1.6em auto;
  padding: 0.15em 0 0.15em 1.15em;
  border-left: 3px solid var(--prose-accent);
  color: var(--prose-muted);
  font-size: 1.15em;
  font-style: italic;
  line-height: 1.6;
}
.sky-prose blockquote p{ margin: 0 0 0.6em; max-width: none; }
.sky-prose blockquote p:last-child{ margin-bottom: 0; }

/* Images & figures — contained (never bleed off the page) with size variety:
   the lead figure runs full width, later figures sit in the text column. */
.sky-prose figure{ margin: 1.8em auto; max-width: 100%; }
.sky-prose img{
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--prose-border);
}
.sky-prose figure img{ width: 100%; }
.sky-prose figure:not(:first-of-type):not(.wide):not(.left):not(.right){
  max-width: var(--prose-measure);
}
.sky-prose figcaption{
  margin-top: 0.6em;
  text-align: center;
  font-size: 0.85em;
  color: var(--prose-muted);
  line-height: 1.45;
}

/* Optional alignment variants for future content that opts in. */
.sky-prose figure.wide{ max-width: 100%; }
.sky-prose figure.left,
.sky-prose figure.right{ max-width: 42%; margin-top: 0.4em; }
.sky-prose figure.left{ float: left; margin-right: 1.4em; }
.sky-prose figure.right{ float: right; margin-left: 1.4em; }
@media (max-width: 640px){
  .sky-prose figure.left,
  .sky-prose figure.right{ float: none; max-width: 100%; margin-inline: auto; }
}

/* Rules */
.sky-prose hr{
  border: 0;
  border-top: 1px solid var(--prose-border);
  margin: 2.4em auto;
}

/* Code */
.sky-prose code{
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--prose-surface);
  border: 1px solid var(--prose-border);
  border-radius: 5px;
  padding: 0.12em 0.38em;
}
.sky-prose pre{
  background: var(--prose-surface);
  border: 1px solid var(--prose-border);
  border-radius: 10px;
  padding: 1em 1.15em;
  overflow-x: auto;
  line-height: 1.5;
}
.sky-prose pre code{ background: none; border: 0; padding: 0; font-size: 0.88em; }

/* Tables — contained and readable; scroll rather than break the layout. */
.sky-prose table{
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.6em auto;
  font-size: 0.96em;
}
.sky-prose th,
.sky-prose td{
  border: 1px solid var(--prose-border);
  padding: 0.55em 0.8em;
  text-align: left;
  vertical-align: top;
}
.sky-prose thead th{ background: var(--prose-surface); font-weight: 650; }
.sky-prose tbody tr:nth-child(even){
  background: color-mix(in srgb, var(--prose-surface) 55%, transparent);
}

/* Contain any floated figures. */
.sky-prose::after{ content: ""; display: block; clear: both; }
