/* Cuerpo de las páginas importadas de WordPress con el lenguaje de la portada (17/10/2026).
   Se carga después de los estilos de WordPress y solo toca sus bloques; el contenido no cambia. */
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono-var.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif.woff2) format("woff2"); }
body {
  --a-ink: #061619; --a-ink-2: #3f474c; --a-ink-3: #868d93; --a-line: #ebebeb; --a-line-2: #dedede; --a-bg-2: #fafafa; --a-bg-3: #f2f3f3;
  --a-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wp--preset--color--contrast-2: #4c5459;
  /* Lienzo casi blanco como las páginas propias (18/10/2026): el "base" de WordPress también */
  --wp--preset--color--base: #fafaf9;
  background: #fafaf9; -webkit-font-smoothing: antialiased;
}

/* Modo oscuro: sigue al sistema salvo que el visitante elija con el botón de la cabecera (data-tema).
   Se redefinen las fichas propias y los colores de WordPress, que el contenido importado usa por clase. */
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) body { --a-ink: #f3f5f5; --a-ink-2: #b4bbbf; --a-ink-3: #6f777c; --a-line: #1d2023; --a-line-2: #2a2e31; --a-bg-2: #101213; --a-bg-3: #16191b;
  --wp--preset--color--base: #0a0b0c; --wp--preset--color--base-2: #101213; --wp--preset--color--contrast: #f3f5f5; --wp--preset--color--contrast-2: #a3aaaf; --wp--preset--color--contrast-3: #6f777c;
  --wp--preset--color--accent: #1a1e20; --wp--preset--color--accent-2: #2a2e31;
  background: #0a0b0c; color: #f3f5f5; color-scheme: dark; } }
:root[data-tema="oscuro"] body { --a-ink: #f3f5f5; --a-ink-2: #b4bbbf; --a-ink-3: #6f777c; --a-line: #1d2023; --a-line-2: #2a2e31; --a-bg-2: #101213; --a-bg-3: #16191b;
  --wp--preset--color--base: #0a0b0c; --wp--preset--color--base-2: #101213; --wp--preset--color--contrast: #f3f5f5; --wp--preset--color--contrast-2: #a3aaaf; --wp--preset--color--contrast-3: #6f777c;
  --wp--preset--color--accent: #1a1e20; --wp--preset--color--accent-2: #2a2e31;
  background: #0a0b0c; color: #f3f5f5; color-scheme: dark; }
/* Sobre lima o azul pastel el texto sigue oscuro en los dos modos */
body :is(.has-accent-4-background-color, .has-accent-5-background-color, [style*="background-color:#dbecff"], [style*="background-color:#cef5a4"]),
body :is(.has-accent-4-background-color, .has-accent-5-background-color, [style*="background-color:#dbecff"], [style*="background-color:#cef5a4"]) :is(p, li, h2, h3, h4, strong, a, span) { color: #061619 !important; }
/* Iconos de WordPress con el color escrito a mano */
body [style*="#081619"] { color: var(--a-ink) !important; fill: var(--a-ink) !important; }
/* Tabla de contenidos (plugin con colores fijos, alguno morado) */
body #ez-toc-container { background: var(--a-bg-2) !important; border: 1px solid var(--a-line) !important; }
body #ez-toc-container .ez-toc-title, body #ez-toc-container p.ez-toc-title { color: var(--a-ink) !important; }
body #ez-toc-container ul.ez-toc-list a, body #ez-toc-container ul.ez-toc-list a:visited { color: var(--a-ink-2) !important; }
body #ez-toc-container ul.ez-toc-list a:hover { color: var(--a-ink) !important; }
body #ez-toc-container .ez-toc-js-icon-con, body .ez-toc-counter nav ul li a::before { background: transparent !important; color: var(--a-ink-3) !important; }
body input[type="email"], body input[type="text"], body textarea { background: var(--wp--preset--color--base, #fff); color: var(--a-ink); }

/* Títulos */
body .wp-block-post-title { font-weight: 600; letter-spacing: -.045em; line-height: 1.02; font-size: clamp(36px, 5.2vw, 64px); color: var(--a-ink); text-wrap: balance; }
/* El título de la página en serif de exhibición, como los heros de las páginas propias (18/10/2026) */
body main h1, body main h1.wp-block-post-title, body main h1.wp-block-heading { font-family: "Instrument Serif", "Times New Roman", Georgia, serif !important; font-weight: 400 !important; letter-spacing: -.025em !important; line-height: 1.02 !important; font-size: clamp(40px, 5.4vw, 70px) !important; text-wrap: balance; }
/* Campo de caracteres detrás de los títulos centrados (campo.js) */
body main { position: relative; isolation: isolate; }
body main > .rg-campo-wp { position: absolute; left: 0; right: 0; top: 0; height: 640px; z-index: -1; pointer-events: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
body h1, body h2, body h3, body h4 { text-wrap: balance; }
body .entry-content h2, body .wp-block-post-content h2 { font-weight: 600; letter-spacing: -.035em; line-height: 1.1; font-size: clamp(26px, 3.2vw, 36px); margin-top: 2.2em; color: var(--a-ink); }
body .entry-content h3, body .wp-block-post-content h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.25; font-size: clamp(19px, 2vw, 22px); margin-top: 1.8em; color: var(--a-ink); }
body .entry-content h4 { font-weight: 600; letter-spacing: -.01em; }
body main h1.wp-block-heading, body main h2.wp-block-heading { letter-spacing: -.035em; font-weight: 600; color: var(--a-ink); }

/* Texto */
body .entry-content p, body .entry-content li { color: var(--a-ink-2); font-size: 17px; line-height: 1.72; text-wrap: pretty; }
body .entry-content strong { color: var(--a-ink); font-weight: 600; }
body .entry-content a:not(.wp-block-button__link):not(.wp-element-button) { color: var(--a-ink); text-decoration: underline; text-decoration-color: var(--a-line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
body .entry-content a:not(.wp-block-button__link):not(.wp-element-button):hover { text-decoration-color: var(--a-ink); }
body .entry-content ul, body .entry-content ol { padding-left: 1.2em; }
body .entry-content li::marker { color: var(--a-ink-3); }
body .wp-block-post-excerpt__excerpt { color: var(--a-ink-2); font-size: 18px; line-height: 1.6; }

/* Fecha y categoría: etiquetas técnicas */
body .wp-block-post-date, body .wp-block-post-date a, body .taxonomy-category, body .taxonomy-category a { font-family: var(--a-mono) !important; font-size: 13px !important; letter-spacing: .02em; color: var(--a-ink-3) !important; text-decoration: none !important; }
body .wp-block-post-date + .taxonomy-category::before { content: "·"; margin-right: 8px; color: var(--a-line-2); }

/* Etiqueta de categoría en pastilla: el hover de WordPress la ponía gris oscuro con texto gris */
body .taxonomy-category.is-style-pill a { background: var(--a-bg-3) !important; transition: background .2s, color .2s; }
body .taxonomy-category.is-style-pill a:hover { background: var(--a-line-2) !important; color: var(--a-ink) !important; }

/* Artículos: aire entre la cabecera de la web y el principio del contenido */
body.single main > :first-child { padding-top: clamp(48px, 6vw, 88px) !important; }

/* Botones: redondos, como en la portada */
body .wp-block-button__link, body .wp-element-button { border-radius: 999px !important; font-weight: 500; font-size: 14px; letter-spacing: 0; padding: .8em 1.4em; transition: box-shadow .2s, background .2s; }
body .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { box-shadow: 0 0 0 4px var(--a-line-2); }
body .wp-block-button.is-style-outline .wp-block-button__link { border: 1px solid var(--a-line-2) !important; }
body .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--a-bg-3); }

/* Imágenes, tablas, citas y código */
body .wp-block-post-featured-image img, body .entry-content .wp-block-image img { border-radius: 18px; }
body .wp-block-post-featured-image { border-radius: 18px; overflow: hidden; border: 1px solid var(--a-line); }
body .entry-content .wp-block-table { overflow-x: auto; }
body .entry-content table { border-collapse: collapse; width: 100%; font-size: 15px; border: 0; }
body .entry-content table th { font-family: var(--a-mono); font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--a-ink-3); text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--a-line-2); padding: 10px 12px 12px 0; }
body .entry-content table td { border: 0; border-top: 1px solid var(--a-line); padding: 12px 12px 12px 0; color: var(--a-ink-2); vertical-align: top; }
body .entry-content table thead { border: 0; }
body .entry-content blockquote, body .wp-block-quote { border: 0 !important; border-left: 2px solid var(--a-ink) !important; border-radius: 0 !important; background: none !important; padding: 4px 0 4px 20px !important; margin-left: 0; }
body .entry-content blockquote p { color: var(--a-ink); font-size: 19px; }
body .entry-content code { font-family: var(--a-mono); font-size: .88em; background: var(--a-bg-3); border-radius: 6px; padding: .12em .4em; }
body .entry-content pre { font-family: var(--a-mono); background: #08090a; color: #e9ecec; border-radius: 14px; padding: 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
body .entry-content pre code { background: none; padding: 0; color: inherit; }
body .entry-content hr, body .wp-block-separator { border: 0; border-top: 1px solid var(--a-line); }
body .entry-content details { border-bottom: 1px solid var(--a-line); padding: 14px 0; }
body .entry-content summary { cursor: pointer; font-weight: 500; color: var(--a-ink); }

/* Recuadros grises (bloques hacia la app, herramientas): tarjetas con borde fino */
body .entry-content .has-base-2-background-color.has-background, body main .wp-block-group.has-base-2-background-color.has-background { border: 1px solid var(--a-line-2); border-radius: 20px !important; background: var(--a-bg-2) !important; }
body .entry-content .has-contrast-3-border-color { border-color: var(--a-line-2) !important; border-radius: 18px !important; }

/* Recuadros con fondo de color (llamadas a la acción oscuras): el texto hereda el color del recuadro.
   Sin esto, las reglas de negrita y párrafo de arriba le ponían tinta oscura sobre fondo oscuro. */
body :is(.has-contrast-background-color, .has-text-color.has-background) :is(p, li, strong, h2, h3, h4):not([class*="-color"]) { color: inherit !important; }
body :is(.has-contrast-background-color, .has-text-color.has-background) a:not(.wp-element-button):not(.wp-block-button__link) { color: inherit !important; text-decoration-color: currentColor; }

/* Rejillas de artículos (blog, categorías, relacionados) */
body .wp-block-post-template .wp-block-post-featured-image { border-radius: 16px; }
body .wp-block-post-template .taxonomy-category { margin-top: 18px !important; }
body .wp-block-post-template .wp-block-post-title { margin-top: 12px !important; font-size: 20px; letter-spacing: -.02em; line-height: 1.25; }
body .wp-block-post-template .wp-block-post-title a { text-decoration: none !important; color: var(--a-ink); }
body .wp-block-post-template .wp-block-post-title a:hover { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-color: var(--a-line-2); }
body .wp-block-post-terms a { text-decoration: none; }
/* En las tarjetas la categoría ya va en la pastilla de arriba: la segunda, tras la fecha, sobra */
body .wp-block-post-template .wp-block-post-date + .taxonomy-category { display: none; }
body .wp-block-query-pagination a, body .wp-block-query-pagination-numbers .page-numbers { font-family: var(--a-mono); font-size: 13px; text-decoration: none; }

/* Formularios de descarga */
body .wpcf7-form input[type="email"], body .wpcf7-form input[type="text"] { border-radius: 999px !important; border: 1px solid var(--a-line-2) !important; padding: 12px 18px !important; font-size: 15px; }
body .wpcf7-form input[type="submit"] { border-radius: 999px !important; }

/* Sin ligaduras estándar: "Article 7(1)" no debe salir "7①" */
body, body * { font-variant-ligatures: no-common-ligatures; }
