/* GENERATED by theme/generate_theme_tokens.py — DO NOT EDIT BY HAND.
   Source of truth: config/sites/ciencia-curiosa.yaml (visual_template).
   Re-run the generator to update. Ownership: blog-theme fields ONLY;
   the Compositor's highlight_colors are intentionally absent. */
:root {
  --vb-heading-font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --vb-body-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --vb-background: #FAFAFA;
  --vb-text: #1A1A1A;
  --vb-text-muted: #6B6B6B;
  --vb-accent-link: #1B4F72;
  --vb-border: #E0E0E0;
  --vb-reading-width: 680px;
}

body {
  background: var(--vb-background);
  color: var(--vb-text);
  font-family: var(--vb-body-font);
  line-height: 1.7;
}
h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.wp-block-query-title,
.wp-block-site-title a {
  font-family: var(--vb-heading-font);
  color: var(--vb-text);
}
a { color: var(--vb-accent-link); }

/* -------------------------------------------------------------------------
 * A-2 — Portada (home) H1. The posts index emits no query-title, so home.html
 * carries one real <h1 class="vb-portada-title"> naming the vertical. Kept
 * visually modest (not a hero) so it reads as a quiet page label, while still
 * being the page's single, semantically-correct H1. The same class styles the
 * category archive title (wp:query-title), keeping both archive headings
 * consistent and unobtrusive.
 * ---------------------------------------------------------------------- */
.vb-portada-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--vb-text-muted);
  margin: 0.25rem 0 1.25rem;
  letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------
 * R-4 / WCAG 2.5.8 (AA) — pagination touch targets. The bare numbers/prev/next
 * links measured ~10x19px at 375px; give each an inline-flex box with a
 * >=24x24px minimum hit area (min-width/min-height + padding, centered). 24px
 * is small enough to stay proportionate on desktop — the visible glyph is
 * unchanged, only the tappable box grows. Covers the numbers, the current-page
 * marker, and the previous/next links.
 * ---------------------------------------------------------------------- */
.wp-block-query-pagination {
  gap: 0.25rem;
  flex-wrap: wrap;
}
.wp-block-query-pagination-numbers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.wp-block-query-pagination-numbers .page-numbers,
a.wp-block-query-pagination-previous,
a.wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0.25rem 0.5rem;
  box-sizing: border-box;
  line-height: 1;
}

/* Reading measure for the single-post body. */
.vb-single .wp-block-post-content {
  max-width: var(--vb-reading-width);
  margin-left: auto;
  margin-right: auto;
}

/* Hero (featured image on single). */
.vb-hero img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--vb-border);
}

/* Category + market chips. */
.vb-meta {
  font-family: var(--vb-body-font);
  color: var(--vb-text-muted);
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.vb-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--vb-border);
  border-radius: 999px;
  color: var(--vb-accent-link);
  text-decoration: none;
}

/* Citable source / DOI block (visible to the reader). */
.vb-citation {
  max-width: var(--vb-reading-width);
  margin: 2rem auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--vb-border);
  border-left: 4px solid var(--vb-accent-link);
  border-radius: 4px;
  background: #fff;
  font-family: var(--vb-body-font);
  font-size: 0.92rem;
}
.vb-citation .vb-citation-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: var(--vb-text-muted);
  margin-bottom: 0.35rem;
}
.vb-citation a { color: var(--vb-accent-link); word-break: break-word; }

/* Ad slots — placeholder only (no SDK / no network in the local mockup). */
.vb-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  border: 2px dashed var(--vb-border);
  color: var(--vb-text-muted);
  font-family: var(--vb-body-font);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px);
}
.vb-ad-leaderboard { max-width: 728px; height: 90px; }
.vb-ad-rectangle { max-width: 300px; height: 250px; }
.vb-ad-sidebar { max-width: 300px; height: 250px; }

/* -------------------------------------------------------------------------
 * P3 / R-1 — Homepage card image: the image must FILL its grid cell (no white
 * gap when the text column is taller), WITHOUT losing CLS protection.
 *   - In the horizontal layout the row height is set by the (taller) text
 *     column; the image cell stretches to it (`.vb-card` align-items:stretch)
 *     and the img fills it via height:100% + object-fit:cover — gap gone.
 *   - When the card stacks (mobile) the cell height is indefinite, so
 *     height:100% resolves to auto and the `aspect-ratio` reserves the box
 *     before load (anti-CLS). One rule covers both because aspect-ratio only
 *     takes effect when the height is not otherwise definite.
 * ---------------------------------------------------------------------- */
.vb-card-image img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

/* -------------------------------------------------------------------------
 * P5 — Homepage: one card per row, large horizontal layout (boredpanda-style).
 * The wp:post-template runs in a single column (layout "default"); each <li>
 * holds a .vb-card grid = image column + text column.
 * ---------------------------------------------------------------------- */
.wp-block-query .wp-block-post-template {
  padding-left: 0;
  margin-left: 0;
}
.wp-block-query .wp-block-post-template > li {
  list-style: none;
  margin: 0 0 2rem 0;
}
.vb-card {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 1.5rem;
  /* R-1: stretch (not center) so the image cell fills the row height and the
     featured image has a definite box to cover — no leftover white gap. */
  align-items: stretch;
  border: 1px solid var(--vb-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.vb-card-image {
  margin: 0;
  height: 100%;
}
.vb-card-image a { display: block; height: 100%; }
.vb-card-body {
  padding: 1.25rem 1.5rem 1.5rem 0;
  min-width: 0;
  /* Keep the text optically centered now that the row no longer centers. */
  align-self: center;
}
.vb-card-body > * { margin-top: 0.4rem; }
.vb-card-body > *:first-child { margin-top: 0; }
.vb-card-date {
  color: var(--vb-text-muted);
  font-size: 0.8rem;
}
@media (max-width: 640px) {
  .vb-card { grid-template-columns: minmax(0, 1fr); }
  .vb-card-body { padding: 0 1.25rem 1.25rem; }
}

/* -------------------------------------------------------------------------
 * P1 — Related posts grid at the end of the single (image + title cards).
 * ---------------------------------------------------------------------- */
.vb-related {
  max-width: var(--vb-reading-width);
  margin: 2.5rem auto 0;
}
.vb-related-heading {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--vb-border);
}
.vb-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.25rem;
}
.vb-related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--vb-text);
  border: 1px solid var(--vb-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.vb-related-image img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  height: auto;
  display: block;
}
.vb-related-title {
  font-family: var(--vb-heading-font);
  font-size: 0.95rem;
  line-height: 1.35;
  padding: 0.6rem 0.75rem 0.8rem;
}

/* -------------------------------------------------------------------------
 * Byline (single) — declared editorial persona, name linked to author page
 * (E-E-A-T MISSION §7). Sits under the title, above the hero/content.
 * ---------------------------------------------------------------------- */
.vb-byline {
  align-items: baseline;
  gap: 0.4rem;
}
.vb-byline .vb-byline-by {
  margin: 0;
  color: var(--vb-text-muted);
}
.vb-byline .vb-byline-author a,
.vb-byline .wp-block-post-author-name a {
  color: var(--vb-accent-link);
  text-decoration: none;
  font-weight: 600;
}
.vb-byline .vb-byline-author a:hover,
.vb-byline .wp-block-post-author-name a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Author page header (illustrated avatar + name + honest bio).
 * ---------------------------------------------------------------------- */
.vb-author-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: var(--vb-reading-width);
  margin: 1rem auto 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--vb-border);
}
.vb-author-avatar-wrap { flex: 0 0 auto; }
.vb-author-avatar,
img.vb-author-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: block;
}
.vb-author-identity { min-width: 0; }
.vb-author-name {
  font-family: var(--vb-heading-font);
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.vb-author-bio {
  margin: 0;
  color: var(--vb-text-muted);
  font-family: var(--vb-body-font);
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .vb-author-header { flex-direction: column; text-align: center; }
}
