/* Páginas de contenido de Rowan Analytics: fichas de sector, guías, blog, legales y 404.
 * Tokens y piezas comunes en site.css. */

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5em; vertical-align: 1px; flex: none; }

/* — Migas de pan — */
.crumbs {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--space-lg)) var(--page-gutter) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--muted);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

/* ================= Ficha de sector ================= */
.shero {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--page-gutter) var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-2xl);
  align-items: center;
}
.shero--solo { grid-template-columns: 1fr; max-width: 56rem; }
.shero h1 { font-size: clamp(2.2rem, 2.6vw + 1rem, 3.6rem); line-height: 1.02; letter-spacing: -0.04em; margin-bottom: var(--space-lg); }
.shero__lede { font-size: var(--text-md); color: var(--ink-2); margin-bottom: var(--space-xl); }
.shero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.shero__shot { display: block; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--rule); box-shadow: var(--shadow-float); aspect-ratio: 16 / 10; }
.shero__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
@media (max-width: 60rem) { .shero { grid-template-columns: 1fr; } }
@media (max-width: 40rem) { .shero__actions .btn { flex: 1 1 100%; } }

.kpis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); counter-reset: kpi; }
.kpi { counter-increment: kpi; padding: var(--space-lg); border: 1px solid var(--rule); border-radius: var(--radius-lg); display: grid; gap: 0.4rem; align-content: start; }
.kpi::before { content: counter(kpi, decimal-leading-zero); font-family: var(--f-mono); font-size: var(--text-xs); color: var(--accent-text); }
.kpi h3 { font-size: var(--text-md); letter-spacing: -0.015em; }
.kpi p { font-size: var(--text-sm); color: var(--muted); }
@media (max-width: 60rem) { .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36rem) { .kpis { grid-template-columns: 1fr; } }

.others { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.others__item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-sm);
  transition: border-color 150ms, transform 150ms;
}
.others__item span[aria-hidden] { margin-left: auto; color: var(--neutral); }
.others__item:hover { border-color: var(--ink); transform: translateY(-1px); }
@media (max-width: 60rem) { .others { grid-template-columns: 1fr 1fr; } }
@media (max-width: 30rem) { .others { grid-template-columns: 1fr; } }

/* ================= Cabecera de listados (guías, blog) ================= */
.phead { max-width: var(--page-max); margin: 0 auto; padding: calc(var(--nav-h) + var(--space-2xl)) var(--page-gutter) 0; }
.phead h1 { font-size: clamp(2.2rem, 2.8vw + 1rem, 3.8rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 20ch; margin-bottom: var(--space-md); }
.phead > p:not(.eyebrow) { max-width: 44rem; color: var(--muted); font-size: var(--text-md); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-lg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 150ms, transform 150ms;
}
.card-link:hover { border-color: var(--ink); transform: translateY(-2px); }
.card-link h2 { font-size: var(--text-lg); letter-spacing: -0.02em; line-height: 1.2; }
.card-link p { font-size: var(--text-sm); color: var(--muted); }
.card-link__go { margin-top: auto; padding-top: var(--space-sm); font-size: var(--text-sm); font-weight: 600; }
.card-link:hover .card-link__go, .post-card:hover .card-link__go { color: var(--accent-text); }
@media (max-width: 60rem) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36rem) { .cards { grid-template-columns: 1fr; } }

/* — Blog — */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; transition: border-color 150ms, transform 150ms; }
.post-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.post-card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f4f4f2; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { display: flex; flex-direction: column; gap: 0.5rem; padding: var(--space-lg); flex: 1; }
.post-card h2 { font-size: var(--text-lg); letter-spacing: -0.02em; line-height: 1.2; }
.post-card p { font-size: var(--text-sm); color: var(--muted); }
.post-card--lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.post-card--lead.post-card--nophoto { grid-template-columns: 1fr; }
.post-card--lead .post-card__img { aspect-ratio: auto; min-height: 100%; }
.post-card--lead h2 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); }
.post-card--lead .post-card__body { padding: var(--space-xl); justify-content: center; }
@media (max-width: 60rem) {
  .posts { grid-template-columns: 1fr 1fr; }
  .post-card--lead { grid-template-columns: 1fr; }
  .post-card--lead .post-card__img { aspect-ratio: 16 / 9; }
}
@media (max-width: 36rem) { .posts { grid-template-columns: 1fr; } }
.empty { padding: var(--space-2xl); border: 1px dashed var(--rule-strong); border-radius: var(--radius-xl); display: grid; gap: var(--space-md); justify-items: start; max-width: 46rem; }
.empty h2 { font-size: var(--text-lg); }
.empty p { color: var(--muted); }
.rss { margin-top: var(--space-md); font-size: var(--text-sm); }
.rss a { color: var(--accent-text); }

/* ================= Artículo (guía, post, legales) ================= */
.article { max-width: 46rem; margin: 0 auto; padding: var(--space-xl) var(--page-gutter) var(--space-2xl); box-sizing: content-box; }
.article__head { margin-bottom: var(--space-xl); }
.article__head h1 { font-size: clamp(2rem, 2.2vw + 1rem, 3.1rem); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: var(--space-md); }
.article__lead { font-size: var(--text-md); color: var(--ink-2); }
.article__meta { margin-top: var(--space-md); font-family: var(--f-mono); font-size: var(--text-xs); color: var(--muted); }
.article__cover { margin: 0 0 var(--space-xl); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--rule); }
.article__cover img { display: block; width: 100%; height: auto; }

/* Texto largo: lo que sale del Markdown de guías y posts, y de las plantillas legales. */
.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; letter-spacing: -0.025em; line-height: 1.2; color: var(--ink); margin-top: 2.2em; }
.prose h3 { font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { color: var(--accent-text); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--bronze); }
.prose blockquote { margin-left: 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--gold); color: var(--ink); }
.prose code { font-family: var(--f-mono); font-size: 0.88em; background: #f4f4f2; padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { background: var(--ink); color: #e8e6df; padding: 1em 1.2em; border-radius: var(--radius-md); overflow-x: auto; font-size: 0.88rem; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 0.6em 0.8em; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; color: var(--ink); border-bottom-color: var(--rule-strong); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

.page-cta {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--rule);
  box-shadow: inset 0 3px 0 var(--gold);
  display: grid;
  gap: var(--space-md);
}
.page-cta p { font-size: var(--text-md); color: var(--ink-2); }
.page-cta__btns { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.more { margin-top: var(--space-xl); }
.more h2 { font-family: var(--f-mono); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--space-sm); }
.more__links { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.more__links a { padding: 0.45rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius-pill); font-size: var(--text-sm); text-decoration: none; }
.more__links a:hover { border-color: var(--ink); }

/* — Legales — */
.legal__tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: var(--space-lg); }
.legal__tabs a { padding: 0.45rem 0.9rem; border: 1px solid var(--rule); border-radius: var(--radius-pill); font-size: var(--text-sm); text-decoration: none; color: var(--ink-2); }
.legal__tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.legal .prose { font-size: 1rem; }

/* ================= 404 ================= */
.nf { max-width: var(--page-max); margin: 0 auto; padding: calc(var(--nav-h) + var(--space-2xl)) var(--page-gutter) var(--space-lg); }
.nf__code { font-family: var(--f-display); font-size: clamp(6rem, 16vw, 12rem); font-weight: 700; letter-spacing: -0.07em; line-height: 0.85; color: var(--gold); margin-bottom: var(--space-lg); }
.nf h1 { font-size: clamp(2.2rem, 3vw + 1rem, 3.8rem); letter-spacing: -0.04em; margin-bottom: var(--space-md); }
.nf__lede { max-width: 42rem; color: var(--ink-2); font-size: var(--text-md); margin-bottom: var(--space-xl); }
.nf__lede a { color: var(--accent-text); }
.nf__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
