/* ── BLOG LAYOUT (contenido + sidebar) ── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 64px;
  align-items: start;
  margin-bottom: 80px;
}

/* ── BLOG HERO EXTRAS ── */
.blog-tag {
  display: inline-block;
  background: rgba(232, 255, 87, 0.12);
  color: var(--c-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(232, 255, 87, 0.3);
  margin-bottom: 24px;
}

.blog-hero-meta {
  margin-top: 32px;
  font-size: 13px;
  color: var(--c-on-dark-3);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.blog-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── ARTICLE BODY ── */
.article-body {
  max-width: 100%;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--c-ink);
  margin: 56px 0 18px;
  scroll-margin-top: 96px;
}

.article-body h2:first-of-type {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  margin: 36px 0 12px;
}

.article-body p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-muted);
  margin-bottom: 20px;
}

.article-body p strong {
  color: var(--c-ink);
  font-weight: 600;
}

.article-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.article-body ul li {
  font-size: 16px;
  color: var(--c-muted);
  line-height: 1.7;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--c-line);
  position: relative;
}

.article-body ul li:last-child {
  border-bottom: none;
}

.article-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--c-ink);
  font-weight: 700;
}

.article-body ol {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  counter-reset: ordered;
}

.article-body ol li {
  font-size: 16px;
  color: var(--c-muted);
  line-height: 1.7;
  padding: 10px 0 10px 36px;
  border-bottom: 1px solid var(--c-line);
  position: relative;
  counter-increment: ordered;
}

.article-body ol li:last-child {
  border-bottom: none;
}

.article-body ol li::before {
  content: counter(ordered, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-ink);
}

/* ── TABLA ── */
.article-body .table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

.article-body th {
  background: var(--c-ink);
  color: #fff;
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-body td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-muted);
  vertical-align: top;
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:hover td {
  background: rgba(17, 25, 12, 0.025);
}

/* ── TL;DR ── */
.tldr {
  background: var(--c-ink);
  border-radius: var(--r-md);
  padding: 28px 32px;
  margin: 0 0 52px;
}

.tldr-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 16px;
}

.tldr ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tldr ul li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  padding: 9px 0 9px 24px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tldr ul li:last-child {
  border-bottom: none;
}

.tldr ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-weight: 600;
}

/* ── CALLOUT ── */
.callout {
  background: #fff;
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.callout p {
  margin: 0;
  font-size: 16px;
}

/* ── SIDEBAR ── */
.blog-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── TOC ── */
.toc {
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  padding: 24px 28px;
}

.toc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list a {
  font-size: 13px;
  color: var(--c-muted);
  text-decoration: none;
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid var(--c-line);
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
  line-height: 1.45;
}

.toc-list li:last-child a {
  border-bottom: none;
}

.toc-list a:hover,
.toc-list a.toc-active {
  color: var(--c-ink);
  font-weight: 600;
  padding-left: 6px;
}

/* ── TOC CTA ── */
.toc-cta {
  background: var(--c-ink);
  border-radius: var(--r-md);
  padding: 24px;
  text-align: center;
}

.toc-cta p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 16px;
}

.toc-cta .btn-primary {
  font-size: 13px;
  padding: 11px 18px;
  width: 100%;
  justify-content: center;
}

.toc-cta .btn-primary .arrow {
  width: 26px;
  height: 26px;
}

/* ── FAQ ── */
.faq-section {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--c-line);
}

.faq-section>h2 {
  margin-top: 0 !important;
  margin-bottom: 32px;
}

.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.faq-item {
  border-bottom: 1px solid var(--c-line);
}

.faq-item:first-child {
  border-top: 1px solid var(--c-line);
}

.faq-question {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--c-ink);
  padding: 20px 40px 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  position: relative;
  user-select: none;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 24px;
  font-weight: 300;
  color: var(--c-muted);
  transition: transform var(--dur) var(--ease);
  font-family: var(--font-body);
  line-height: 1;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  font-size: 16px;
  color: var(--c-muted);
  line-height: 1.78;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s var(--ease);
}

.faq-item.open .faq-answer {
  max-height: 640px;
  padding-bottom: 22px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .tldr {
    padding: 22px 24px;
  }

  .article-body h2 {
    margin: 44px 0 16px;
  }

  .faq-question {
    font-size: 15px;
  }
}