/* article.css — páginas de contenido (guías y estudios). Se carga después de styles.css y usa sus variables. */

.a-nav { border-bottom: 1px solid var(--border); padding: 18px 24px; background: rgba(5,10,20,0.7); }
.a-nav-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.a-nav a.back { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.a-nav a.back:hover { color: var(--primary); }

.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 40px; color: var(--text-muted); font-size: 17px; line-height: 1.75; }
.article .crumbs { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.article .crumbs a { color: var(--primary); }
.article h1 { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; color: var(--text);
  font-size: clamp(32px, 5.2vw, 52px); line-height: 1.04; letter-spacing: -.01em; margin: 14px 0 18px; text-wrap: balance; }
.article .dek { font-size: 19px; line-height: 1.6; color: var(--text-muted); margin-bottom: 18px; }
.article .byline { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: .04em; padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.article h2 { font-family: var(--font-display); font-weight: 800; color: var(--text); font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; margin: 48px 0 14px; text-wrap: balance; }
.article h3 { font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: 20px; margin: 30px 0 8px; }
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--text); font-weight: 600; }
.article a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article code { font-family: var(--font-mono); font-size: 14px; background: rgba(20,37,69,0.7); color: var(--text); padding: 1px 6px; border-radius: 5px; }

/* Cifras destacadas */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 28px 0 8px; }
.stat { border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--r-md); padding: 16px 18px; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .v.accent { color: var(--primary); }
.stat .l { font-size: 13.5px; line-height: 1.45; color: var(--text-muted); margin-top: 8px; }

/* Tablas */
.a-table { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: rgba(10,20,36,0.5); margin: 8px 0 22px; }
.a-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 520px; }
.a-table th, .a-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.a-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; background: rgba(10,20,36,0.6); }
.a-table tr:last-child td { border-bottom: 0; }
.a-table td:first-child { color: var(--text); font-weight: 500; }
.a-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-table .yes { color: var(--ok); }
.a-table .no { color: var(--text-dim); }

/* Barras horizontales (porcentajes) */
.bars { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 24px; }
.bar { display: grid; grid-template-columns: minmax(130px, 34%) 1fr 64px; gap: 12px; align-items: center; font-size: 14.5px; }
.bar .name { color: var(--text); }
.bar .name small { display: block; color: var(--text-dim); font-size: 12px; }
.bar .track { height: 10px; background: rgba(20,37,69,0.8); border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--primary); border-radius: 999px; }
.bar .fill.low { background: var(--text-dim); }
.bar .pct { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 13.5px; }
@media (max-width: 560px) { .bar { grid-template-columns: 1fr 56px; } .bar .track { grid-column: 1 / -1; grid-row: 2; } }

/* Recuadros */
.note { border: 1px solid var(--border-strong); border-left: 3px solid var(--primary); background: rgba(30,156,255,0.06); border-radius: var(--r-sm); padding: 14px 18px; margin: 8px 0 20px; font-size: 15.5px; }
.note.warn { border-left-color: var(--warn); background: rgba(255,166,71,0.06); }
.note p:last-child { margin-bottom: 0; }

.a-cta { margin: 48px 0 8px; border: 1px solid var(--border-strong); background: radial-gradient(600px 300px at 0% 0%, rgba(30,156,255,0.16), transparent 70%), var(--surface); border-radius: var(--r-lg); padding: 28px; }
.a-cta h2 { margin: 0 0 8px; }
.a-cta p { margin-bottom: 18px; }
.article a.btn { color: #fff; text-decoration: none; }
@media (max-width: 560px) {
  .a-table table { min-width: 0; font-size: 14px; }
  .a-table th, .a-table td { padding: 9px 10px; }
}

.a-related { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px; font-size: 15px; }
.a-related > a { display: inline-block; margin-top: 6px; }

.a-hero { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--border); margin: 4px 0 4px; }

/* Bitácora / línea de tiempo */
.timeline { list-style: none; margin: 8px 0 26px; padding: 0 0 0 4px; border-left: 2px solid var(--border-strong); }
.timeline li { position: relative; margin: 0; padding: 0 0 20px 24px; font-size: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -9px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-0); border: 2px solid var(--primary); }
.timeline li.hot::before { border-color: var(--danger); background: var(--danger); box-shadow: 0 0 12px rgba(255,77,77,.5); }
.timeline .when { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: 3px; }
.timeline li.hot .when { color: var(--danger); }
.article .sources { font-size: 14.5px; }

/* TL;DR al inicio de cada artículo */
.tldr { margin: 28px 0 8px; padding: 18px 22px; border: 1px solid var(--border-strong); border-left: 3px solid var(--primary);
  border-radius: var(--r-md); background: rgba(30,156,255,0.07); }
.tldr-label { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.tldr ul { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.6; }
.tldr li { margin-bottom: 6px; color: var(--text); }
.tldr li:last-child { margin-bottom: 0; }
.a-related .res-grid { margin-top: 6px; }
.a-related .res-title { font-size: 19px; }

.article.blog { max-width: 1080px; }
.blog-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin: 14px 0 6px; }
.blog-head h1 { margin: 0; }
.blog-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-filter button { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(20,37,69,0.6); color: var(--text-muted);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; transition: background .15s, color .15s, border-color .15s; }
.blog-filter button span { font-size: 10.5px; color: var(--text-dim); }
.blog-filter button:hover { color: var(--text); border-color: var(--primary); }
.blog-filter button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.blog-filter button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 20px rgba(30,156,255,0.35); }
.blog-filter button[aria-pressed="true"] span { color: rgba(255,255,255,0.8); }
.res-card[hidden] { display: none; }
.article.blog .dek { max-width: 640px; }
.blog-list { margin-top: 28px; }
.article .res-card { text-decoration: none; }

.a-foot { border-top: 1px solid var(--border); padding: 24px; text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.a-foot a { color: inherit; }
