/* Rafónica · estilos del blog (/blog). Se cargan DESPUÉS de styles.css.
   Paleta y tipografía: Sistema/06 · Identidad de Marca. Prefijo rb- para no
   chocar con las clases rf- del resto del sitio. */

.rb-page { min-height: 100vh; background: #FBFBFA; overflow-x: clip; }
.rb-wrap { max-width: 1120px; margin: 0 auto; padding-left: 30px; padding-right: 30px; }

/* barra de lectura */
.rb-readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.rb-readbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7777FF, #FF7792, #EAFF77); }

.rb-draft {
  background: #1A1A19; color: #EAFF77; text-align: center;
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .06em; padding: 8px 16px;
}

/* ---------- cabecera del artículo ---------- */
.rb-post-head { padding: 56px 0 34px; border-bottom: 1px solid rgba(55,53,47,0.09); position: relative; }
.rb-post-head .rb-wrap { max-width: 860px; }
.rb-crumbs { font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #787774; display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.rb-crumbs a { color: #787774; }
.rb-crumbs a:hover { color: #1A1A19; }
.rb-post-head h1, .rb-index-head h1 {
  font-size: 50px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; color: #1A1A19; margin: 0 0 18px;
}
.rb-dek { font-size: 19.5px; line-height: 1.55; color: #504E49; margin: 0 0 26px; max-width: 720px; }
.rb-byline { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #787774; }
.rb-byline img { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; }
.rb-byline strong { color: #1A1A19; display: block; font-size: 14.5px; }

/* ---------- layout ---------- */
.rb-layout { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 64px; padding-top: 44px; padding-bottom: 40px; justify-content: center; }
.rb-toc { position: sticky; top: 88px; align-self: start; font-size: 14px; }
.rb-toc-title { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #787774; display: block; margin-bottom: 12px; }
.rb-toc ol { list-style: none; padding: 0; margin: 0 0 22px; border-left: 1.5px solid #EDEDEB; }
.rb-toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1.5px; border-left: 1.5px solid transparent; color: #787774; line-height: 1.35; transition: color .2s, border-color .2s; }
.rb-toc li a:hover { color: #1A1A19; }
.rb-toc li a.is-on { color: #1A1A19; border-left-color: #FF7792; font-weight: 600; }
.rb-toc-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; background: #1A1A19; color: #fff; padding: 9px 14px; border-radius: 10px; }

/* ---------- cuerpo ---------- */
.rb-body { font-size: 18px; line-height: 1.72; color: #37352F; min-width: 0; }
.rb-body > p:first-child { font-size: 20px; line-height: 1.6; color: #1A1A19; }
.rb-body h2 { font-size: 32px; line-height: 1.12; letter-spacing: -0.024em; color: #1A1A19; margin: 56px 0 16px; scroll-margin-top: 90px; }
.rb-body h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; color: #1A1A19; margin: 34px 0 10px; scroll-margin-top: 90px; }
.rb-body h4 { font-size: 18px; color: #1A1A19; margin: 24px 0 6px; }
.rb-body p { margin: 0 0 20px; }
.rb-body a { color: #1A1A19; text-decoration: underline; text-decoration-color: #FF7792; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rb-body a:hover { text-decoration-color: #7777FF; }
.rb-body a.rf-btn-primary, .rb-body a.rf-btn-secondary { text-decoration: none; }
/* La regla de ligas del artículo (.rb-body a, texto tinta) le ganaba al blanco del botón. */
.rb-body a.rf-btn-primary, .rb-body a.rf-btn-primary:hover { color: #fff; }
.rb-body a.rf-btn-secondary { color: #1A1A19; }
.rb-body ul, .rb-body ol { padding-left: 24px; margin: 0 0 22px; }
.rb-body li { margin-bottom: 8px; }
.rb-body ul li::marker { color: #FF7792; }
.rb-body ol li::marker { color: #7777FF; font-weight: 700; }
.rb-body strong { color: #1A1A19; }
.rb-body code { font-family: 'Space Mono', monospace; font-size: .86em; background: #EDEDEB; padding: 2px 6px; border-radius: 6px; }
.rb-body hr { border: 0; height: 1px; background: rgba(55,53,47,0.12); margin: 40px 0; }
.rb-body blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid #EAFF77; font-family: 'Newsreader', serif; font-style: italic; font-size: 22px; line-height: 1.45; color: #1A1A19; }
.rb-body blockquote p { margin: 0; }
.rb-body mark.rf-highlight { color: inherit; }

/* tablas */
.rb-table { overflow-x: auto; margin: 26px 0 30px; border: 1px solid rgba(55,53,47,0.12); border-radius: 14px; background: #fff; }
.rb-table table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.45; }
.rb-table th { text-align: left; font-family: 'Space Mono', monospace; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #787774; font-weight: 400; background: #FBFBFA; }
.rb-table th, .rb-table td { padding: 13px 16px; border-bottom: 1px solid rgba(55,53,47,0.08); vertical-align: top; }
.rb-table tr:last-child td { border-bottom: 0; }
.rb-table td:first-child { font-weight: 600; color: #1A1A19; }

/* callouts */
.rb-callout { margin: 30px 0; padding: 22px 24px 6px; border-radius: 16px; background: #fff; border: 1px solid rgba(55,53,47,0.1); position: relative; box-shadow: 0 1px 2px rgba(55,53,47,0.05); }
.rb-callout::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; }
.rb-ejemplo::before { background: linear-gradient(180deg, #7777FF, #EAFF77); }
.rb-ojo::before { background: #FF7792; }
.rb-dato::before { background: #7777FF; }
.rb-nota::before { background: #EAFF77; border: 1px solid rgba(26,26,25,.2); }
.rb-callout-tag { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #787774; display: block; margin-bottom: 6px; }
.rb-callout-title { display: block; font-weight: 700; color: #1A1A19; font-size: 18.5px; margin-bottom: 8px; }
.rb-callout p, .rb-callout li { font-size: 16.5px; line-height: 1.62; }
.rb-callout .rb-table { margin: 14px 0 20px; }

/* pasos */
.rb-pasos { counter-reset: paso; margin: 30px 0; border-left: 2px solid #EDEDEB; padding-left: 28px; }
.rb-pasos h3, .rb-pasos h4 { counter-increment: paso; position: relative; margin-top: 28px; }
.rb-pasos h3:first-child, .rb-pasos h4:first-child { margin-top: 0; }
.rb-pasos h3::before, .rb-pasos h4::before {
  content: counter(paso); position: absolute; left: -45px; top: -1px; width: 32px; height: 32px; border-radius: 999px;
  background: #1A1A19; color: #EAFF77; font-family: 'Space Mono', monospace; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px #FBFBFA;
}

/* CTA a media lectura */
.rb-cta-inline { margin: 36px 0; padding: 22px 24px; border-radius: 18px; display: flex; gap: 20px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(119,119,255,.10), rgba(255,119,146,.10), rgba(234,255,119,.22)); border: 1px solid rgba(55,53,47,0.08); }
.rb-cta-inline strong { color: #1A1A19; font-size: 18px; }
.rb-cta-inline p { margin: 4px 0 0; font-size: 15.5px; line-height: 1.5; }
.rb-cta-inline .rf-btn-primary { flex: none; white-space: nowrap; }

/* FAQ */
.rb-faq { margin-top: 56px; }
.rb-faq details { border-bottom: 1px solid rgba(55,53,47,0.12); padding: 4px 0; }
.rb-faq summary { cursor: pointer; list-style: none; font-weight: 700; color: #1A1A19; font-size: 18px; padding: 16px 40px 16px 0; position: relative; line-height: 1.4; }
.rb-faq summary::-webkit-details-marker { display: none; }
.rb-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 400; color: #FF7792; transition: transform .2s; }
.rb-faq details[open] summary::after { transform: rotate(45deg); }
.rb-faq details div { padding: 0 0 10px; }
.rb-faq details p { font-size: 16.5px; }

/* cierre */
.rb-end-cta { margin: 60px 0 34px; padding: 34px 32px; border-radius: 22px; background: #1A1A19; color: #EDEDEB; position: relative; overflow: hidden; }
.rb-end-cta::after { content: ""; position: absolute; width: 280px; height: 280px; right: -90px; top: -110px; border-radius: 999px; background: radial-gradient(circle, rgba(234,255,119,.32), transparent 65%); }
.rb-end-cta .rf-eyebrow { color: #EAFF77; margin-bottom: 10px; }
.rb-end-cta h2 { color: #fff; margin: 0 0 10px; font-size: 28px; }
.rb-end-cta p { color: #C9C8C4; font-size: 16.5px; margin-bottom: 22px; }
.rb-end-ctas { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.rb-body .rb-end-cta a.rf-btn-primary, .rb-body .rb-end-cta a.rf-btn-primary:hover { background: #EAFF77; color: #1A1A19; }
.rb-end-cta .rf-btn-primary .rf-dot { background: #1A1A19; }
.rb-body .rb-end-cta a.rf-btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

.rb-author { display: flex; gap: 16px; align-items: flex-start; padding: 22px 0; border-top: 1px solid rgba(55,53,47,0.12); }
.rb-author img { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; flex: none; }
.rb-author strong { color: #1A1A19; }
.rb-author p { font-size: 15px; line-height: 1.55; margin: 4px 0 0; color: #504E49; }

/* ---------- widgets ---------- */
.rb-widget { margin: 34px 0; padding: 24px; border-radius: 20px; background: #fff; border: 1px solid rgba(55,53,47,0.12); box-shadow: 0 10px 30px -18px rgba(55,53,47,.35); font-size: 16px; line-height: 1.55; }
.rb-widget-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.rb-widget-tag { align-self: flex-start; font-family: 'Space Mono', monospace; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #1A1A19; background: #EAFF77; padding: 4px 9px; border-radius: 999px; }
.rb-widget-title { font-size: 21px; font-weight: 700; color: #1A1A19; letter-spacing: -0.015em; line-height: 1.25; }
.rb-widget button { font-family: inherit; }

/* checklist */
.rb-progress { height: 8px; border-radius: 999px; background: #EDEDEB; overflow: hidden; }
.rb-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7777FF, #EAFF77); transition: width .35s; }
.rb-progress-label { font-size: 13.5px; color: #787774; margin: 8px 0 12px !important; }
.rb-checklist ul { list-style: none; padding: 0; margin: 0; }
.rb-checklist li { margin: 0; border-top: 1px solid rgba(55,53,47,0.08); }
.rb-checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; cursor: pointer; }
.rb-checklist input { position: absolute; opacity: 0; pointer-events: none; }
.rb-box { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid rgba(55,53,47,0.3); background: #fff; position: relative; transition: background .2s, border-color .2s; }
.rb-checklist input:checked + .rb-box { background: #1A1A19; border-color: #1A1A19; }
.rb-checklist input:checked + .rb-box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #EAFF77; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.rb-checklist input:focus-visible + .rb-box { outline: 2px solid #7777FF; outline-offset: 2px; }
.rb-checklist input:checked ~ .rb-txt { color: #787774; text-decoration: line-through; text-decoration-color: rgba(55,53,47,.35); }
.rb-txt { font-size: 16px; }

/* calculadora */
.rb-calc-help { font-size: 14.5px; color: #787774; margin: -6px 0 18px !important; }
.rb-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rb-calc-inputs { display: grid; gap: 12px; }
.rb-calc-inputs label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: #504E49; }
.rb-calc-inputs label > span { display: flex; align-items: center; border: 1px solid rgba(55,53,47,0.2); border-radius: 10px; background: #FBFBFA; padding: 0 12px; }
.rb-calc-inputs label > span:focus-within { border-color: #7777FF; box-shadow: 0 0 0 3px rgba(119,119,255,.16); }
.rb-calc-inputs i { font-style: normal; color: #787774; font-family: 'Space Mono', monospace; font-size: 13px; }
.rb-calc-inputs input[type=number] { border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 500; color: #1A1A19; padding: 10px 6px; width: 100%; outline: none; }
.rb-calc-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px !important; font-weight: 500 !important; }
.rb-calc-check input { width: 18px; height: 18px; accent-color: #1A1A19; }
.rb-calc-out { background: #FBFBFA; border: 1px solid rgba(55,53,47,0.1); border-radius: 16px; padding: 20px; align-self: start; position: sticky; top: 90px; }
.rb-calc-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.rb-calc-state .rf-lvl { background: #EDEDEB; }
.rb-calc-big { margin: 14px 0 2px; display: flex; flex-direction: column; }
.rb-calc-big span { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: #1A1A19; }
.rb-calc-big small { font-size: 13.5px; color: #787774; margin-top: 6px; }
.rb-calc-pct { font-size: 14.5px; color: #504E49; margin-bottom: 16px; }
.rb-calc-pct span { font-weight: 700; color: #1A1A19; }
.rb-stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: #EDEDEB; margin-bottom: 12px; }
.rb-stack span { height: 100%; transition: width .3s; }
.rb-legend { list-style: none; padding: 0 !important; margin: 0 0 12px !important; display: grid; gap: 5px; }
.rb-legend li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 0 !important; }
.rb-legend li b { margin-left: auto; color: #1A1A19; font-weight: 600; font-variant-numeric: tabular-nums; }
.rb-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rb-calc-note { font-size: 12.5px !important; line-height: 1.45 !important; color: #787774; margin: 0 !important; }

/* diagnóstico y árbol de decisión */
.rb-q { padding: 14px 0; border-top: 1px solid rgba(55,53,47,0.08); }
.rb-q p { margin: 0 0 10px !important; font-weight: 600; color: #1A1A19; font-size: 16px; }
.rb-q-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rb-opt { border: 1px solid rgba(55,53,47,0.2); background: #fff; color: #37352F; border-radius: 999px; padding: 8px 16px; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.rb-opt:hover { border-color: #1A1A19; }
.rb-opt.is-on { background: #1A1A19; border-color: #1A1A19; color: #fff; }
.rb-result { margin-top: 18px; padding: 18px 20px; border-radius: 16px; background: #FBFBFA; border: 1px solid rgba(55,53,47,0.1); }
.rb-result h4 { margin: 0 0 10px; font-size: 17px; color: #1A1A19; }
.rb-result ul { list-style: none; padding: 0 !important; margin: 0 0 14px !important; }
.rb-result li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 9px !important; }
.rb-result li .rf-lvl { margin-top: 7px; }
.rb-result p { font-size: 15.5px; margin: 0 0 12px !important; }
.rb-result .rf-btn-primary { font-size: 14.5px; }
.rb-path { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rb-path span { font-size: 12.5px; color: #787774; background: #F4F4F2; border-radius: 999px; padding: 3px 10px; }
.rb-reset { background: none; border: 0; color: #787774; font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 0; margin-left: 12px; }

/* ---------- índice del blog ---------- */
.rb-index-head { padding: 70px 0 40px; position: relative; overflow: hidden; border-bottom: 1px solid rgba(55,53,47,0.09); }
.rb-index-head .rb-wrap { position: relative; z-index: 1; max-width: 900px; margin-left: max(30px, calc((100% - 1120px) / 2 + 30px)); }
.rb-index-head h1 { font-size: 58px; }
.rb-hero-blob { position: absolute; width: 520px; height: 520px; right: -120px; top: -180px; border-radius: 999px; background: radial-gradient(circle, rgba(255,119,146,.26), rgba(119,119,255,.18) 45%, transparent 70%); animation: rf-drift 20s ease-in-out infinite; }
.rb-index { padding-top: 34px; padding-bottom: 80px; }
.rb-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.rb-chip { border: 1px solid rgba(55,53,47,0.16); background: #fff; color: #37352F; border-radius: 999px; padding: 8px 15px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; scroll-margin-top: 90px; }
.rb-chip.is-on { background: #1A1A19; color: #fff; border-color: #1A1A19; }
.rb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rb-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid rgba(55,53,47,0.1); transition: transform .2s, box-shadow .2s; min-height: 100%; }
.rb-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(55,53,47,.45); }
.rb-card h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; color: #1A1A19; }
.rb-card p { margin: 0; font-size: 15px; line-height: 1.5; color: #504E49; }
.rb-card-cat { display: inline-flex; align-items: center; gap: 8px; font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #787774; }
.rb-card-meta { margin-top: auto; font-size: 13px; color: #787774; padding-top: 6px; }
.rb-card[hidden] { display: none; }
.rb-empty { grid-column: 1 / -1; font-size: 17px; color: #504E49; }
.rb-related { padding: 46px 0 70px; border-top: 1px solid rgba(55,53,47,0.09); background: #F6F6F4; }
.rb-related .rb-card h3 { font-size: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .rb-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rb-toc { display: none; }
  .rb-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .rb-wrap { padding-left: 16px; padding-right: 16px; }
  .rb-index-head .rb-wrap { margin-left: 0; }
  .rb-post-head { padding: 36px 0 26px; }
  .rb-post-head h1, .rb-index-head h1 { font-size: 34px; }
  .rb-dek { font-size: 17.5px; }
  .rb-body { font-size: 17px; }
  .rb-body > p:first-child { font-size: 18px; }
  .rb-body h2 { font-size: 26px; margin-top: 44px; }
  .rb-body h3 { font-size: 20px; }
  .rb-calc-grid { grid-template-columns: 1fr; }
  .rb-calc-out { position: static; }
  .rb-widget { padding: 18px 16px; }
  .rb-cta-inline { flex-direction: column; align-items: stretch; }
  .rb-cta-inline .rf-btn-primary { justify-content: center; white-space: normal; }
  .rb-end-cta { padding: 26px 20px; }
  .rb-cards { grid-template-columns: 1fr; }
  .rb-pasos { padding-left: 24px; }
  .rb-pasos h3::before, .rb-pasos h4::before { left: -40px; width: 28px; height: 28px; font-size: 12px; }
  .rb-table table { font-size: 14px; }
  .rb-table th, .rb-table td { padding: 10px 12px; }
}


/* ---------- calculadoras con filas y contador ---------- */
.rb-rows li { justify-content: space-between; gap: 14px; align-items: baseline; border-top: 1px solid rgba(55,53,47,0.08); padding-top: 6px; }
.rb-rows li:first-child { border-top: 0; padding-top: 0; }
.rb-rows li b { text-align: right; flex: none; max-width: 55%; }
.rb-contador { display: flex; align-items: center; gap: 20px; background: #1A1A19; color: #EDEDEB; border-color: #1A1A19; box-shadow: none; }
.rb-contador strong { color: #fff; font-size: 19px; }
.rb-contador p { margin: 2px 0 0; color: #C9C8C4; font-size: 15px; }
.rb-contador-num { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; color: #EAFF77; display: flex; flex-direction: column; align-items: center; min-width: 92px; }
.rb-contador-small { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #C9C8C4; font-weight: 400; margin-top: 6px; }
@media (max-width: 720px) { .rb-contador { gap: 14px; } .rb-contador-num { font-size: 44px; min-width: 76px; } }
