/* Blog (/blog/{es,en,pt}). Same tokens and visual language as radarial-us.css; classes prefixed b-. */
:root {
  --bg: #ffffff; --surface: #fafaf8; --surface2: #f3f3ef;
  --ink: #0a0e14; --muted: #5b6470; --faint: #9aa1ab; --line: #e7e5df;
  --accent: #2b6fff; --accent-ink: #ffffff; --accent-soft: #eef3ff;
  --warn: #e0922f; --pos: #0f9d6b;
  --head: 'Space Grotesk', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --measure: 680px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--head); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.b-pad { max-width: 1240px; margin: 0 auto; padding-left: 56px; padding-right: 56px; }
.b-kicker, .b-label { font: 600 10px/1 var(--mono); color: var(--accent); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 16px; }
.b-label { color: var(--faint); margin-bottom: 14px; }
.b-h1 { font-size: 50px; line-height: 1.04; font-weight: 600; letter-spacing: -.035em; margin: 0 0 20px; }
.b-h2 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; margin: 0 0 28px; }
.b-lead { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 560px; margin: 0; }

.b-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 15px 24px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); text-decoration: none; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.b-btn:hover { background: #1f5ae0; }
.b-btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }
.b-btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

/* PROGRESS (posts) */
.b-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.b-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

/* NAV */
.b-nav { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }
.b-nav-inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.b-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.b-brand-name { font-weight: 700; font-size: 17px; letter-spacing: .14em; }
.b-nav-blog { font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; padding-left: 20px; border-left: 1px solid var(--line); }
.b-nav-blog:hover { color: var(--ink); }
.b-nav-end { margin-left: auto; display: flex; align-items: center; }
.b-lang { display: flex; align-items: center; gap: 4px; font: 600 11px/1 var(--mono); letter-spacing: .1em; color: var(--faint); }
.b-lang a { padding: 10px 7px; text-decoration: none; color: var(--muted); }
.b-lang a:hover { color: var(--ink); }
.b-lang a.is-on { color: var(--accent); }

/* INDEX */
.b-index { padding-top: 72px; padding-bottom: 96px; }
.b-index-head { margin-bottom: 48px; }
.b-empty { font-size: 16px; color: var(--muted); padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0; }

.b-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.b-chip { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 10px 14px; cursor: pointer; transition: color .15s, border-color .15s; }
.b-chip:hover { color: var(--ink); border-color: var(--ink); }
.b-chip.is-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.b-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.b-more { display: flex; justify-content: center; margin-top: 44px; }

/* CARD */
.b-card { display: flex; }
.b-card-link { display: flex; flex-direction: column; width: 100%; text-decoration: none; background: var(--bg); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.b-card-link:hover { border-color: var(--ink); box-shadow: 0 18px 44px rgba(10,14,20,.08); }
.b-card-link:hover .b-card-title { color: var(--accent); }
.b-card-img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--surface); }
.b-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 20px; }
.b-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.b-cat { display: inline-flex; align-items: center; gap: 7px; font: 600 9.5px/1 var(--mono); color: var(--accent); letter-spacing: .12em; text-transform: uppercase; }
.b-cat::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-badge { font: 600 8.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--faint); padding: 4px 6px; }
.b-card-title { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; margin: 0 0 10px; transition: color .15s; }
.b-card-desc { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 18px; flex: 1; }
.b-card-meta { font: 500 10.5px/1.4 var(--mono); color: var(--faint); letter-spacing: .04em; margin: 0; }

.b-card.is-featured { grid-column: 1 / -1; }
.b-card.is-featured .b-card-link { flex-direction: row; }
.b-card.is-featured .b-card-img { width: 58%; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--line); }
.b-card.is-featured .b-card-body { justify-content: center; padding: 36px 40px; }
.b-card.is-featured .b-card-title { font-size: 32px; line-height: 1.12; letter-spacing: -.025em; }
.b-card.is-featured .b-card-desc { font-size: 15.5px; flex: 0 1 auto; }

/* POST */
.b-post { padding-top: 32px; padding-bottom: 96px; }
.b-back { display: inline-block; font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; margin-bottom: 40px; }
.b-back:hover { color: var(--accent); }
.b-post-layout { display: grid; grid-template-columns: minmax(0, var(--measure)) 220px; justify-content: space-between; gap: 64px; }
.b-article { min-width: 0; }
.b-article-head { margin-bottom: 32px; }
.b-title { font-size: 46px; line-height: 1.06; font-weight: 600; letter-spacing: -.035em; margin: 0 0 20px; }
.b-byline { font: 500 11.5px/1.5 var(--mono); color: var(--muted); letter-spacing: .03em; margin: 0; }
.b-translations { font: 500 11.5px/1.5 var(--mono); color: var(--faint); margin: 10px 0 0; }
.b-translations a { color: var(--accent); text-decoration: none; }
.b-translations a:hover { text-decoration: underline; }
.b-cover { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--line); margin-bottom: 40px; }

/* TOC */
.b-toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding-top: 4px; }
.b-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.b-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
.b-toc a:hover { color: var(--ink); }
.b-toc a.is-active { color: var(--accent); border-left-color: var(--accent); }
.b-toc .b-toc-h3 a { padding-left: 26px; font-size: 12.5px; }

/* PROSE */
.b-prose { font-size: 17.5px; line-height: 1.72; color: #262c35; }
.b-prose > :first-child { margin-top: 0; }
.b-prose p, .b-prose ul, .b-prose ol, .b-prose blockquote, .b-prose table, .b-prose pre, .b-prose figure { margin: 0 0 1.35em; }
.b-prose h2, .b-prose h3, .b-prose h4 { color: var(--ink); font-weight: 600; scroll-margin-top: 88px; }
.b-prose h2 { font-size: 30px; line-height: 1.18; letter-spacing: -.025em; margin: 2em 0 .7em; }
.b-prose h3 { font-size: 22px; line-height: 1.3; letter-spacing: -.015em; margin: 1.7em 0 .6em; }
.b-prose h4 { font-size: 18px; margin: 1.5em 0 .5em; }
.b-prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.b-prose a:hover { text-decoration-thickness: 2px; }
.b-prose strong { color: var(--ink); font-weight: 600; }
.b-prose ul, .b-prose ol { padding-left: 1.3em; }
.b-prose li { margin: .35em 0; }
.b-prose li::marker { color: var(--accent); }
.b-prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 22px; color: var(--muted); font-style: italic; }
.b-prose img { display: block; border: 1px solid var(--line); }
.b-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.b-prose code { font: 500 .86em/1.4 var(--mono); background: var(--surface2); padding: 2px 6px; }
.b-prose pre { background: var(--ink); color: #eef2f6; padding: 18px 20px; overflow-x: auto; font-size: 14px; }
.b-prose pre code { background: none; padding: 0; color: inherit; }
.b-prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.b-prose th, .b-prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.b-prose th { font: 600 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); white-space: nowrap; }

/* COMPONENTS: <Callout>, <FAQ>, <BlogCTA> (selectors outrank .b-prose p / a) */
.b-callout { margin: 0 0 1.35em; padding: 18px 22px; background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: 16px; line-height: 1.65; }
.b-callout-warning { background: #fdf5ea; border-left-color: var(--warn); }
.b-callout-tip { background: #ecf8f3; border-left-color: var(--pos); }
.b-callout .b-callout-label { font: 600 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.b-callout-warning .b-callout-label { color: var(--warn); }
.b-callout-tip .b-callout-label { color: var(--pos); }
.b-callout > :last-child { margin-bottom: 0; }

.b-faq { border-top: 1px solid var(--line); }
.b-faq:not(:has(+ .b-faq)) { border-bottom: 1px solid var(--line); margin-bottom: 1.35em; }
.b-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.b-faq summary::-webkit-details-marker { display: none; }
.b-faq summary::after { content: '+'; font: 500 20px/1 var(--mono); color: var(--accent); transition: transform .15s; }
.b-faq[open] summary::after { transform: rotate(45deg); }
.b-faq-answer { padding: 0 0 6px; font-size: 16.5px; }

.b-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 2em 0; padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.b-cta .b-cta-title { font-size: 21px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; color: var(--ink); margin: 0 0 8px; }
.b-cta .b-cta-body { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.b-prose .b-cta a { color: var(--accent-ink); text-decoration: none; }
.b-prose .b-cta a.b-btn-ghost { color: var(--ink); }
.b-cta-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }

/* SHARE */
.b-share { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.b-share-links { display: flex; flex-wrap: wrap; gap: 8px; }
.b-share-links a, .b-share-links button { font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 10px 14px; text-decoration: none; cursor: pointer; transition: color .15s, border-color .15s; }
.b-share-links a:hover, .b-share-links button:hover { color: var(--ink); border-color: var(--ink); }
.b-share-links button.is-done { color: var(--pos); border-color: var(--pos); }

/* RELATED */
.b-related { margin-top: 88px; padding-top: 56px; border-top: 1px solid var(--line); }

/* STUB (missing translation) */
.b-stub { padding-top: 120px; padding-bottom: 120px; font-size: 18px; color: var(--muted); }

/* FOOTER */
.b-footer { border-top: 1px solid var(--line); }
.b-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.b-footer .b-brand-name { font-size: 15px; }
.b-footer-links { display: flex; flex-wrap: wrap; gap: 22px; font: 500 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.b-footer-links a { text-decoration: none; color: var(--muted); }
.b-footer-links a:hover { color: var(--ink); }

@media (max-width: 1080px) {
  .b-pad { padding-left: 36px; padding-right: 36px; }
  .b-post-layout { grid-template-columns: minmax(0, var(--measure)); justify-content: center; }
  .b-toc { display: none; }
  .b-back { display: block; max-width: var(--measure); margin-left: auto; margin-right: auto; }
  .b-related { max-width: var(--measure); margin-left: auto; margin-right: auto; }
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-related .b-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .b-pad { padding-left: 20px; padding-right: 20px; }
  .b-nav-inner { gap: 14px; }
  .b-nav-blog { padding-left: 14px; }
  .b-h1 { font-size: 36px; }
  .b-title { font-size: 34px; }
  .b-index { padding-top: 48px; }
  .b-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .b-card.is-featured .b-card-link { flex-direction: column; }
  .b-card.is-featured .b-card-img { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .b-card.is-featured .b-card-body { padding: 22px 22px 20px; }
  .b-card.is-featured .b-card-title { font-size: 24px; }
  .b-prose { font-size: 16.5px; }
  .b-prose h2 { font-size: 25px; }
  .b-prose h3 { font-size: 20px; }
  .b-cta { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .b-cta-actions { flex-direction: row; flex-wrap: wrap; }
  .b-footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
