:root {
  --bg: #ffffff;
  --soft: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .09);
  --accent: #0071e3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .07);
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --soft: #1a1a1d;
    --surface: #1c1c1f;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .1);
    --accent: #4da3ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.shell { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 7px; }
.nav nav { display: flex; gap: 20px; font-size: 15px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }

/* Índice */
.blog-hero { padding: 56px 0 28px; }
.blog-hero h1 { font-size: clamp(40px, 7vw, 64px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 12px; }
.blog-hero p { font-size: 19px; color: var(--muted); max-width: 56ch; margin: 0 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { appearance: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); min-height: 38px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 12px 0 72px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .shell { width: calc(100% - 32px); } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s ease; }
.card[hidden] { display: none; }
.card:hover { transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c); }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.card-desc { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Artículo */
.article { max-width: 760px; padding: 36px 0 24px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.article h1 { font-size: clamp(32px, 5.4vw, 48px); letter-spacing: -.035em; line-height: 1.08; margin: 0 0 14px; }
.meta { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.cover { width: 100%; border-radius: 22px; box-shadow: var(--shadow); }
.lead { font-size: 21px; line-height: 1.45; color: var(--muted); margin: 28px 0 8px; letter-spacing: -.01em; }
.prose { font-size: 18px; }
.prose h2 { font-size: 27px; letter-spacing: -.02em; line-height: 1.2; margin: 40px 0 12px; }
.prose h3 { font-size: 21px; margin: 28px 0 8px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose a { font-weight: 600; }

.app-cta { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; margin: 44px 0 0; padding: 22px; border-radius: 22px; background: var(--soft); border: 1px solid var(--line); border-left: 5px solid var(--c); }
.app-cta img { border-radius: 16px; }
.app-cta p { margin: 0; }
.app-cta-kicker { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.app-cta-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.app-cta-pitch { font-size: 15px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border-radius: 999px; background: var(--c, var(--accent)); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
@media (max-width: 600px) {
  .app-cta { grid-template-columns: 56px 1fr; }
  .app-cta img { width: 56px; height: 56px; }
  .app-cta .btn { grid-column: 1 / -1; }
  .prose { font-size: 17px; }
}

.related { margin-top: 56px; }
.related h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.related .grid { padding-bottom: 40px; }
@media (min-width: 601px) { .related .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p { margin: 0; }
