/* SCRUM-982: the blog posts migrated from Webflow. Only article typography;
   the page shell is site.css (SCRUM-980). Linked from the posts only. */

.blog-article { padding-top: calc(var(--nav-h, 72px) + clamp(32px, 6vw, 72px)); }
/* SCRUM-982 · lectura: 65-72 caracteres por línea. Geist es angosta: a 19 px,
   640 px dan una mediana de 69-71 (medido). La columna entera (texto, caja
   "En 30 segundos", CTAs y bloque final) mide eso más el gutter de site.css. */
.blog-article .wrap { max-width: calc(640px + 2 * var(--gutter, 48px)); }

/* Texto del cuerpo: contraste alto en los dos temas (antes era --fg-2, gris). */
:root { --prose-fg: #1C1A2E; --prose-link: var(--violet, #6b46ff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --prose-fg: #E6E3F0; --prose-link: #A996FF; } }
[data-theme=dark] { --prose-fg: #E6E3F0; --prose-link: #A996FF; }

.blog-article .crumbs { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }
.blog-article .crumbs a { color: var(--prose-link); }

.blog-article h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; }
.blog-article .article-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; font-size: 14px; color: var(--fg-3); }

.article-cover { margin: 32px 0 8px; border-radius: var(--r-lg, 24px); overflow: hidden; background: var(--surface-2); }
.article-cover img { display: block; width: 100%; height: auto; }

/* --em: el tamaño del cuerpo, para medir los aires de los títulos en el em del texto. */
.prose { --em: 19px; margin-top: 32px; font-size: var(--em); font-weight: 400; line-height: 1.7; color: var(--prose-fg); }
.prose p, .prose li, .prose blockquote, .prose figure { margin-block: 0; }
/* :not(:first-child) y no `* + *`: el reset de arriba (0,1,1) le ganaba, y los párrafos iban pegados. */
.prose > :not(:first-child) { margin-top: 1.15em; }
/* El primer párrafo, como entrada. */
.prose > p:first-child { font-size: 1.17em; line-height: 1.6; color: var(--fg); }
.prose h2 { margin-top: calc(var(--em) * 2.3); margin-bottom: 0; font-size: clamp(25px, 3vw, 31px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--fg); scroll-margin-top: calc(var(--nav-h, 72px) + 16px); }
.prose h3 { margin-top: calc(var(--em) * 1.8); font-size: 21px; font-weight: 650; line-height: 1.3; color: var(--fg); }
.prose h4, .prose h5, .prose h6 { margin-top: calc(var(--em) * 1.5); font-size: var(--em); font-weight: 650; line-height: 1.35; color: var(--fg); }
.prose > :is(h2, h3, h4) + :not(:first-child) { margin-top: .6em; }
.prose a { color: var(--prose-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: text-decoration-color .15s ease; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong, .prose b { font-weight: 650; color: var(--fg); }

/* site.css resets list markers; an article needs them back. */
.prose ul, .prose ol { padding-left: 1.6em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { padding-left: .2em; }
.prose li::marker { color: var(--prose-link); }
.prose li + li, .prose li > ul, .prose li > ol { margin-top: .55em; }

.prose blockquote { margin-inline: 0; padding: 14px 20px; border-left: 3px solid var(--violet, #6b46ff); border-radius: 0 12px 12px 0; background: var(--surface); font-size: 1.05em; line-height: 1.6; color: var(--fg); }
.prose blockquote > * + * { margin-top: .7em; }

/* Imágenes a todo el ancho de la columna; caption solo si el alt describe algo. */
.prose figure { margin-inline: 0; }
.prose figure > div { display: block; }
.prose img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: var(--r, 14px); }
.prose figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--fg-3); text-align: center; }
.prose .w-richtext-align-center { text-align: center; }

/* 15 posts carry tables (pricing, comparisons): scroll sideways on phones. */
.prose table { display: block; width: 100%; max-width: max-content; overflow-x: auto; border-collapse: collapse; border: 1px solid var(--line); border-radius: 12px; font-size: 15.5px; line-height: 1.45; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--fg); font-weight: 650; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }

/* Índice de posts de más de 8 min: cerrado, una línea de alto desde el primer pintado. */
.toc { margin-top: 28px; border: 1px solid var(--line-2); border-radius: var(--r, 14px); background: var(--surface); }
.toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 20px; font-size: 15px; font-weight: 600; color: var(--fg); cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.toc[open] summary::after { transform: rotate(-135deg); }
.toc ol { margin: 0; padding: 0 20px 16px 2.6em; list-style: decimal; font-size: 15.5px; line-height: 1.45; }
.toc li + li { margin-top: 8px; }
.toc a { color: var(--fg-2); text-decoration: none; }
.toc a:hover { color: var(--prose-link); }

/* Barra de progreso: fixed y crece con transform, no mueve nada. */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--violet, #6b46ff); transform: scaleX(0); transform-origin: 0 50%; }

@media (max-width: 720px) {
  .prose { --em: 17px; line-height: 1.68; }
  .prose > p:first-child { font-size: 1.12em; }
  .prose h2 { font-size: 24px; }
  .prose h3 { font-size: 19.5px; }
  .prose ul, .prose ol { padding-left: 1.35em; }
  .prose table { font-size: 14.5px; }
}

/* Byword's call-to-action block, inside 44 posts. */
.prose .byword_cta { padding: 20px 24px; border: 1px solid var(--line-2); border-radius: var(--r, 14px); background: var(--surface); }

/* SCRUM-982 · CTAs del blog (blog-ctas.mjs). Todo lo que va en el flujo trae
   su alto reservado; la barra es fixed y entra con transform: no hay CLS. */
.bc-box { margin: 28px 0 0; padding: 20px 22px; border: 1px solid var(--line-2); border-radius: var(--r, 14px); background: var(--surface); }
.bc-box-title { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--violet, #6b46ff); }
.bc-box ul { margin: 0; padding-left: 1.2em; list-style: disc; color: var(--fg-2); font-size: 16px; line-height: 1.55; }
.bc-box li + li { margin-top: 6px; }
/* Every bullet is exactly 2 lines (3 on mobile): the box keeps its height when the web font
   swaps in, so the cover below never moves (measured: 0.0051 of CLS before this). */
.bc-box li > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 3.1em; }
.bc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bc-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--violet, #6b46ff); color: #fff !important; text-decoration: none !important; }
.bc-btn.ghost { background: transparent; color: var(--fg) !important; border: 1px solid var(--line-3); }
.prose .bc-inline { margin: 32px 0; padding: 14px 18px; border-left: 3px solid var(--violet, #6b46ff); border-radius: 0 12px 12px 0; background: var(--surface); font-size: 16.5px; line-height: 1.55; }
.prose .bc-inline a { font-weight: 600; }
.bc-final { margin: 48px 0 8px; padding: 28px; border: 1px solid var(--line-2); border-radius: var(--r-lg, 24px); background: var(--surface); }
.bc-final h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 30px); }
.bc-final > p { margin: 0; color: var(--fg-2); }
.bc-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.bc-case { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.bc-case img { flex: none; width: 96px; height: 54px; object-fit: cover; border-radius: 10px; }
.bc-case b { display: block; font-size: 15px; color: var(--fg); }
.bc-case span { font-size: 13px; color: var(--fg-3); }
.bc-sticky { position: fixed; left: 50%; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100vw - 120px)); padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink, #0b0a14); color: #fff; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35); transform: translate(-50%, 160%); transition: transform .25s ease; }
.bc-sticky.on { transform: translate(-50%, 0); }
.bc-sticky p { margin: 0; font-size: 14.5px; line-height: 1.3; color: #fff; }
.bc-sticky .bc-btn { min-height: 40px; padding: 8px 16px; white-space: nowrap; }
.bc-close { min-width: 40px; min-height: 40px; border: 0; background: none; color: #fff; opacity: .7; font-size: 22px; line-height: 1; cursor: pointer; }
.bc-short { display: none; }
@media (max-width: 720px) {
  .bc-box .bc-desktop { display: none; }
  .bc-box li > span { -webkit-line-clamp: 3; min-height: 4.65em; }
  .bc-cases { grid-template-columns: 1fr; }
  .bc-long { display: none; }
  .bc-short { display: inline; }
  .bc-sticky { left: 12px; right: 84px; bottom: 12px; max-width: none; gap: 6px; padding-left: 14px; transform: translateY(160%); }
  .bc-sticky p { flex: 1; min-width: 0; font-size: 13px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .bc-sticky .bc-btn { padding: 8px 12px; font-size: 14px; }
  .bc-close { min-width: 36px; }
  .bc-sticky.on { transform: translateY(0); }
}
/* In dark mode --ink is the page background: the bar needs its own surface. */
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .bc-sticky { background: var(--surface-2); border: 1px solid var(--line-2); } }
[data-theme=dark] .bc-sticky { background: var(--surface-2); border: 1px solid var(--line-2); }
@media (prefers-reduced-motion: reduce) { .bc-sticky { transition: none; } }
