/* ==========================================================================
   Herramienta de accesibilidad.
   ========================================================================== */

@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }

/* ---------- Botón y panel ---------- */
.rt-a11y { position: fixed; bottom: 18px; z-index: 90; }
.rt-a11y--left { left: 18px; }
.rt-a11y--right { right: 18px; }
.rt-a11y--right ~ .rt-top { right: 84px; }
.rt-a11y__btn {
	width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
	background: var(--rt-marino); color: #fff; box-shadow: 0 0 0 3px #fff, 0 12px 28px -10px rgba(18, 26, 44, .6);
	transition: transform .25s var(--rt-ease), background .2s;
}
.rt-a11y__btn:hover { background: #2d3b5c; transform: scale(1.05); }
.rt-a11y__btn .rt-icon { width: 30px; height: 30px; }
.rt-a11y__btn[aria-expanded="true"] { background: var(--rt-dorado); color: var(--rt-marino); }
.rt-a11y__btn:focus-visible { outline: 3px solid var(--rt-dorado-2); outline-offset: 3px; }

.rt-a11y__panel {
	position: absolute; bottom: 68px; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain;
	background: #fff; color: #1f2636; border-radius: 22px; padding: 18px; font-family: var(--wp--preset--font-family--inter, Inter, system-ui, sans-serif);
	box-shadow: 0 0 0 1px rgba(18, 26, 44, .08), 0 30px 60px -20px rgba(18, 26, 44, .45);
	transform-origin: bottom left; animation: rt-a11y-in .28s var(--rt-ease);
}
.rt-a11y--left .rt-a11y__panel { left: 0; }
.rt-a11y--right .rt-a11y__panel { right: 0; transform-origin: bottom right; }
.rt-a11y__panel[hidden] { display: none; }
@keyframes rt-a11y-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.rt-a11y__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rt-a11y__head h2 { margin: 0; font-size: 20px; color: var(--rt-marino); font-family: var(--wp--preset--font-family--outfit, Outfit, sans-serif); font-weight: 500; }
.rt-a11y__x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f2f3f7; color: var(--rt-marino); cursor: pointer; display: grid; place-items: center; }
.rt-a11y__x .rt-icon { width: 20px; height: 20px; }

.rt-a11y__size { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #f6f7fa; margin-bottom: 10px; font-weight: 600; font-size: 15px; color: var(--rt-marino); }
.rt-a11y__stepper { display: flex; align-items: center; gap: 4px; }
.rt-a11y__stepper button { width: 44px; height: 40px; border: 0; border-radius: 12px; background: #fff; color: var(--rt-marino); font: 700 16px/1 inherit; font-family: inherit; cursor: pointer; box-shadow: 0 0 0 1px var(--rt-linea); }
.rt-a11y__stepper button:hover { box-shadow: 0 0 0 2px var(--rt-dorado); }
.rt-a11y__stepper button:disabled { opacity: .4; cursor: default; box-shadow: 0 0 0 1px var(--rt-linea); }
.rt-a11y__stepper output { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }

.rt-a11y__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rt-a11y__opt {
	display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; min-height: 104px;
	border: 0; border-radius: 16px; background: #f6f7fa; color: #1f2636; font: inherit; cursor: pointer; transition: background .2s, box-shadow .2s;
}
.rt-a11y__opt:hover { box-shadow: inset 0 0 0 2px var(--rt-linea); }
.rt-a11y__opt .rt-icon { width: 24px; height: 24px; color: var(--rt-marino); margin-bottom: 4px; }
.rt-a11y__opt strong { font-size: 14.5px; line-height: 1.25; color: var(--rt-marino); }
.rt-a11y__opt small { font-size: 12.5px; line-height: 1.35; color: #5a6170; }
.rt-a11y__opt[aria-pressed="true"] { background: var(--rt-marino); }
.rt-a11y__opt[aria-pressed="true"] .rt-icon, .rt-a11y__opt[aria-pressed="true"] strong { color: var(--rt-dorado); }
.rt-a11y__opt[aria-pressed="true"] small { color: rgba(255, 255, 255, .8); }

.rt-a11y__voice { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: #fff8e6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rt-a11y__voice-row { display: flex; gap: 6px; }
.rt-a11y__play, .rt-a11y__stop { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--rt-marino); color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.rt-a11y__stop { width: 42px; padding: 0; justify-content: center; background: #fff; color: var(--rt-marino); box-shadow: 0 0 0 1px var(--rt-linea); }
.rt-a11y__play .rt-icon, .rt-a11y__stop .rt-icon { width: 18px; height: 18px; }
.rt-a11y__rate { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #5a6170; }
.rt-a11y__rate select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid #cfd4de; background: #fff; color: #1f2636; }

.rt-a11y__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.rt-a11y__reset { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 0; color: var(--rt-marino); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.rt-a11y__reset .rt-icon { width: 18px; height: 18px; }
.rt-a11y__foot small { color: #6b7180; font-size: 12.5px; text-align: right; }

@media (max-width: 600px) {
	.rt-a11y { bottom: 14px; }
	.rt-a11y--left { left: 12px; }
	.rt-a11y--right { right: 12px; }
	.rt-a11y__btn { width: 50px; height: 50px; }
	.rt-a11y__panel { position: fixed; left: 8px !important; right: 8px !important; bottom: 74px; width: auto; }
}
@media print { .rt-a11y, .rt-a11y-guide { display: none !important; } }

/* ---------- Los ajustes ---------- */

/* Tamaño: se aplica al contenido y al pie; el encabezado se queda igual para no romper el menú. */
html.rt-a-zoom .rt-main, html.rt-a-zoom .rt-footer { zoom: var(--rt-a-zoom, 1); }

/* Texto espaciado (WCAG 1.4.12). */
html.rt-a-spacing .rt-main, html.rt-a-spacing .rt-footer { letter-spacing: .04em; word-spacing: .14em; }
html.rt-a-spacing .rt-main :is(p, li, dd, td, blockquote, figcaption, .rt-card__excerpt) { line-height: 1.95 !important; }
html.rt-a-spacing .rt-main p { margin-bottom: 1.6em !important; }

/* Letra más legible. */
html.rt-a-font body, html.rt-a-font .rt-main *:not(.rt-icon):not(svg):not(path) { font-family: 'Atkinson Hyperlegible', Verdana, Tahoma, sans-serif !important; }

/* Resaltar enlaces. */
html.rt-a-links .rt-main a:not(.rt-btn):not(.wp-block-button__link):not(.wp-element-button),
html.rt-a-links .rt-footer a, html.rt-a-links .rt-menu a {
	text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: .2em !important;
}
html.rt-a-links a:not(.rt-btn):hover, html.rt-a-links a:focus-visible { background: #ffe9a8 !important; color: #111 !important; }
html.rt-a-links .rt-banner a:not(.rt-btn), html.rt-a-links .rt-cats a { text-decoration: underline !important; }

/* Alto contraste: en el tema y en los boletines con colores fijos; en las demás páginas se refuerza el contraste del contenido. */
html.rt-a-contrast { --rt-texto: #000; --rt-ink: #000; --rt-muted: #1f1f1f; --rt-linea: #6b6b6b; }
html.rt-a-contrast body, html.rt-a-contrast .rt-main, html.rt-a-contrast body.rt-gray .rt-main { background: #fff !important; color: #000; }
html.rt-a-contrast .rt-prose, html.rt-a-contrast .rt-prose :is(p, li, td, th, figcaption, h2, h3, h4, blockquote),
html.rt-a-contrast .rt-post__title, html.rt-a-contrast .rt-post__dek, html.rt-a-contrast .rt-post__meta,
html.rt-a-contrast .rt-card__excerpt, html.rt-a-contrast .rt-card__meta, html.rt-a-contrast .rt-card__time, html.rt-a-contrast .rt-card__title a,
html.rt-a-contrast .rt-lead__title a, html.rt-a-contrast .rt-lead__excerpt, html.rt-a-contrast .rt-crumbs:not(.rt-crumbs--dark) ol { color: #000 !important; }
html.rt-a-contrast .rt-prose a, html.rt-a-contrast .rt-card__more, html.rt-a-contrast .rt-footer a { color: #0a2a7a !important; text-decoration: underline !important; text-decoration-color: currentColor !important; }
html.rt-a-contrast .rt-card, html.rt-a-contrast .rt-lead, html.rt-a-contrast .rt-toc__box, html.rt-a-contrast .rt-post .rt-postnav a { box-shadow: 0 0 0 2px #000 !important; background: #fff !important; }
html.rt-a-contrast .rt-banner { background: #000 !important; color: #fff; }
html.rt-a-contrast .rt-chip, html.rt-a-contrast .rt-card__cat { background: #000 !important; color: #fff !important; }
html.rt-a-contrast .rt-pill, html.rt-a-contrast .rt-share__btn { background: #fff !important; color: #000 !important; box-shadow: inset 0 0 0 2px #000; }
html.rt-a-contrast .rt-page .rt-content { filter: contrast(1.25); }
html.rt-a-contrast .rt-footer { background: #fff; border-top: 2px solid #000; }
html.rt-a-contrast *:focus-visible { outline: 3px solid #000 !important; outline-offset: 3px !important; box-shadow: 0 0 0 6px #ffd400 !important; }

/* Detener animaciones. */
html.rt-a-motion *, html.rt-a-motion *::before, html.rt-a-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html.rt-a-motion { scroll-behavior: auto !important; }

/* Guía de lectura: oscurece todo menos una franja alrededor del cursor. */
.rt-a11y-guide { display: none; }
html.rt-a-guide .rt-a11y-guide { display: block; position: fixed; inset: 0; z-index: 80; pointer-events: none; --y: 50vh; --h: 64px; }
.rt-a11y-guide span { position: absolute; left: 0; right: 0; background: rgba(12, 18, 32, .5); }
.rt-a11y-guide span:first-child { top: 0; height: max(0px, calc(var(--y) - var(--h) / 2)); border-bottom: 3px solid var(--rt-dorado); }
.rt-a11y-guide span:last-child { top: calc(var(--y) + var(--h) / 2); bottom: 0; border-top: 3px solid var(--rt-dorado); }
.rt-a11y [hidden] { display: none !important; }
.rt-a11y.is-on .rt-a11y__btn::after { content: ""; position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--rt-dorado); box-shadow: 0 0 0 2px #fff; }
.rt-a11y__btn { position: relative; }
/* With bigger text the side index goes back above the text. */
html.rt-a-zoom .rt-post.has-toc .rt-post__layout { display: block; width: min(var(--rt-read), 100% - 2 * var(--rt-gutter)); }
html.rt-a-zoom .rt-post.has-toc .rt-toc { position: static; }
html.rt-a-zoom .rt-toc__box summary { pointer-events: auto; }
