/* Canonical blog post-body styles, served at /blog-content.css.
 *
 * Consumed by BOTH:
 *   1. this site's post pages (src/pages/post/[slug].astro links it), and
 *   2. the bridgeport-data blog editor's preview modal, so what authors see
 *      in Preview is exactly what ships (parity audit 2026-07).
 *
 * Keep every rule scoped under .post-body. The custom properties below are
 * inlined copies of src/styles/tokens.css values so this file works
 * standalone outside the site (the editor admin doesn't load tokens.css) —
 * if tokens change, sync them here.
 */

.post-body {
  --c-orange: #F26522;
  --c-orange-dark: #D94E0F;
  --c-orange-rgb: 242, 101, 34;
  --c-gray-900: #1a1a1a;
  --c-gray-800: #2d2d2d;
  --c-gray-700: #404040;
  --c-gray-500: #737373;
  --c-gray-300: #d4d4d4;
  --c-gray-200: #e5e5e5;
  --c-gray-100: #f5f5f5;
  --c-gray-50: #fafafa;
  --r-sm: 4px;
  --r-md: 8px;
  --font-display: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-lede: 18px;
  --fs-h3: clamp(19px, 2.2vw, 22px);

  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-gray-800);
}

/* Heading hierarchy */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-gray-900);
  margin: 2em 0 0.6em;
  line-height: 1.3;
}

.post-body h2 { font-size: 28px; }
.post-body h3 { font-size: 22px; }
.post-body h4 { font-size: var(--fs-lede); }

/* Paragraphs */
.post-body p {
  margin: 0 0 1.4em;
}

/* Links */
.post-body a {
  color: var(--c-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.post-body a:hover {
  color: var(--c-orange-dark);
}

/* Lists */
.post-body ul,
.post-body ol {
  padding-left: 1.5em;
  margin: 0 0 1.4em;
}

.post-body li {
  margin-bottom: 0.5em;
}

/* Blockquotes */
.post-body blockquote {
  margin: 1.6em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--c-orange);
  background: var(--c-gray-50);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--c-gray-700);
  font-style: italic;
}

.post-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.post-body code {
  font-size: 0.875em;
  background: var(--c-gray-100);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  color: var(--c-gray-900);
}

.post-body pre {
  background: var(--c-gray-900);
  color: var(--c-gray-100);
  padding: 20px 24px;
  border-radius: var(--r-md);
  overflow-x: auto;
  margin: 0 0 1.4em;
  font-size: 14px;
  line-height: 1.6;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Callout boxes: the blog editor's callout node emits
   <div class="callout callout-{note|tip|warning}">.
   Tones: note = neutral, tip = teal, warning = orange. */
.post-body .callout {
  padding: 16px 20px;
  margin: 0 0 1.4em;
  border-left: 3px solid var(--c-gray-300);
  border-radius: var(--r-sm);
  background: var(--c-gray-50);
  font-size: 0.95em;
}

.post-body .callout-tip {
  border-left-color: #14b8a6;
  background: rgba(20, 184, 166, 0.07);
}

.post-body .callout-warning {
  border-left-color: var(--c-orange);
  background: rgba(var(--c-orange-rgb), 0.07);
}

/* Images */
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 1em 0;
  display: block;
}

/* Figures (the editor wraps images in figure/figcaption) */
.post-body figure {
  margin: 1em 0;
}

.post-body figcaption {
  font-size: 0.85em;
  color: var(--c-gray-500);
  margin-top: 0.4em;
}

/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 0.95em;
}

.post-body th,
.post-body td {
  border: 1px solid var(--c-gray-200);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.post-body th {
  background: var(--c-gray-50);
  font-weight: 600;
}

/* Highlight */
.post-body mark {
  background: rgba(var(--c-orange-rgb), 0.18);
  padding: 0 2px;
  border-radius: 2px;
}

/* Horizontal rules */
.post-body hr {
  border: none;
  border-top: 1px solid var(--c-gray-200);
  margin: 2.5em 0;
}

@media (max-width: 640px) {
  .post-body {
    font-size: 16px;
  }

  .post-body h2 { font-size: var(--fs-h3); }
  .post-body h3 { font-size: 20px; }
}
