/* ==========================================================================
   Página «Wiki»: imita un artículo de Wikipedia en su modo oscuro (Vector 2022),
   dentro de la cabecera y el pie de elmawi.es.
   ========================================================================== */

.wiki {
	--wiki-bg: #101418;
	--wiki-surface: #202122;
	--wiki-surface-2: #27292d;
	--wiki-text: #eaecf0;
	--wiki-subtle: #a2a9b1;
	--wiki-border: #54595d;
	--wiki-border-strong: #72777d;
	--wiki-link: #88a3e8;
	--wiki-link-visited: #a799cd;
	--wiki-header: #22382b;
	--wiki-serif: "Linux Libertine", Georgia, Times, "Source Serif Pro", serif;
	--wiki-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;

	background: var(--wiki-bg);
	color: var(--wiki-text);
	font-family: var(--wiki-sans);
	font-size: 1rem;
	line-height: 1.6;
	padding: calc(var(--header-h) + 1.5rem) 0 4rem;
}

.wiki__inner {
	max-width: 80rem;
	margin-inline: auto;
	padding-inline: var(--gutter);
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
}

@media (min-width: 1000px) {
	.wiki__inner {
		grid-template-columns: 13.5rem minmax(0, 1fr);
		gap: 2.5rem;
	}
}

.wiki a {
	color: var(--wiki-link);
	text-decoration: none;
}

.wiki a:visited {
	color: var(--wiki-link-visited);
}

.wiki a:hover {
	text-decoration: underline;
}

.wiki a.external::after {
	content: "";
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	margin-left: 0.2em;
	vertical-align: 0.05em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16zM2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16zM2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 0.8;
}

.wiki :focus-visible {
	outline: 2px solid var(--wiki-link);
	outline-offset: 2px;
}

/* --- Índice lateral «Contenido» (como Wikipedia en móvil, no se muestra en pantallas pequeñas) --- */
.wiki-toc {
	display: none;
	align-self: start;
	font-size: 0.875rem;
	line-height: 1.5;
}

@media (min-width: 1000px) {
	.wiki-toc {
		display: block;
		position: sticky;
		top: calc(var(--header-h) + 1rem);
		max-height: calc(100vh - var(--header-h) - 2rem);
		overflow-y: auto;
	}
}

.wiki-toc__title {
	margin: 0 0 0.5rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--wiki-border);
	font-family: var(--wiki-sans);
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--wiki-text);
}

.wiki-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wiki-toc ol ol {
	padding-left: 0.9rem;
}

.wiki-toc li {
	margin: 0.3rem 0;
}

.wiki-toc .tocnumber {
	color: var(--wiki-subtle);
	margin-right: 0.3rem;
}

/* --- Título del artículo --- */
.wiki-article {
	min-width: 0;
}

.wiki-article::after {
	content: "";
	display: table;
	clear: both;
}

.wiki-heading {
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--wiki-border);
}

.wiki-heading h1 {
	margin: 0;
	font-family: var(--wiki-serif);
	font-size: 2rem;
	font-weight: 400;
	line-height: 1.375;
	color: var(--wiki-text);
	letter-spacing: 0;
}

.wiki-tagline {
	margin: 0.2rem 0 0.5rem;
	font-size: 0.875rem;
	color: var(--wiki-subtle);
}

.hatnote {
	margin: 0 0 0.75rem;
	padding-left: 1.6em;
	font-style: italic;
	font-size: 0.95rem;
	color: var(--wiki-text);
}

.hatnote strong,
.hatnote i {
	font-style: normal;
}

/* --- Texto --- */
.wiki-article p {
	margin: 0.5em 0 1em;
}

.wiki-article h2 {
	margin: 1em 0 0.25em;
	padding-bottom: 0.1em;
	border-bottom: 1px solid var(--wiki-border);
	font-family: var(--wiki-serif);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.375;
	color: var(--wiki-text);
	overflow: hidden;
}

.wiki-article h3 {
	margin: 0.3em 0 0;
	padding-top: 0.5em;
	font-family: var(--wiki-sans);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.6;
	color: var(--wiki-text);
}

.wiki-article ul {
	margin: 0.3em 0 1em 1.6em;
	padding: 0;
	list-style: disc;
}

.wiki-article li {
	margin-bottom: 0.1em;
}

.wiki-article b,
.wiki-article strong {
	font-weight: 700;
}

/* --- Llamadas a nota --- */
sup.reference {
	font-size: 0.75em;
	line-height: 1;
	white-space: nowrap;
	vertical-align: super;
	font-style: normal;
	font-weight: 400;
}

/* --- Ficha (infobox) --- */
.infobox {
	float: none;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0.2em;
	border: 1px solid var(--wiki-border);
	border-spacing: 3px;
	background: var(--wiki-surface);
	color: var(--wiki-text);
	font-size: 0.88rem;
	line-height: 1.5;
}

@media (min-width: 720px) {
	.infobox {
		float: right;
		clear: right;
		width: 22em;
		margin: 0.5em 0 1em 1.4em;
	}
}

.infobox th,
.infobox td {
	padding: 0.2em 0.4em;
	vertical-align: top;
	text-align: left;
}

.infobox th[scope="row"] {
	width: 40%;
	font-weight: 700;
}

.infobox-above {
	padding: 0.25em 0.4em !important;
	font-size: 125%;
	font-weight: 700;
	text-align: center !important;
	background: var(--wiki-header);
}

.infobox-header {
	text-align: center !important;
	font-weight: 700;
	background: var(--wiki-header);
}

.infobox-image {
	text-align: center !important;
	padding: 0.4em 0.4em 0.2em !important;
}

.infobox-image img {
	display: block;
	width: 250px;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.infobox-caption {
	margin-top: 0.3em;
	font-size: 0.85em;
	color: var(--wiki-subtle);
}

.flag {
	display: inline-block;
	width: 1.4em;
	height: 0.93em;
	margin: 0.3em 0.35em 0 0;
	vertical-align: -0.1em;
	border: 1px solid var(--wiki-border);
}

/* --- Fotos en miniatura («thumb») --- */
.thumb {
	float: none;
	margin: 0.5em auto 1.3em;
	padding: 3px;
	max-width: 22rem;
	background: var(--wiki-surface);
	border: 1px solid var(--wiki-border);
}

@media (min-width: 720px) {
	.thumb {
		float: right;
		clear: right;
		width: 222px;
		margin: 0.5em 0 1.3em 1.4em;
	}
}

.thumb img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--wiki-border);
}

.thumb figcaption {
	padding: 0.3em 0.2em 0.2em;
	font-size: 0.88rem;
	line-height: 1.4;
	color: var(--wiki-text);
}

/* --- Tablas --- */
.wikitable {
	margin: 1em 0;
	border-collapse: collapse;
	border: 1px solid var(--wiki-border-strong);
	background: var(--wiki-surface);
	color: var(--wiki-text);
	font-size: 0.94rem;
}

.wikitable caption {
	padding: 0.3em;
	font-weight: 700;
	text-align: center;
}

.wikitable th,
.wikitable td {
	padding: 0.2em 0.4em;
	border: 1px solid var(--wiki-border-strong);
	text-align: left;
	vertical-align: top;
}

.wikitable th {
	background: var(--wiki-surface-2);
	text-align: center;
}

@media (max-width: 719px) {
	.wikitable {
		display: block;
		overflow-x: auto;
	}
}

/* --- Referencias --- */
.references {
	margin: 0.3em 0 1em 1.6em;
	padding: 0;
	font-size: 0.9rem;
	line-height: 1.5;
}

@media (min-width: 720px) {
	.references {
		column-width: 30em;
		column-gap: 2em;
	}
}

.references li {
	margin-bottom: 0.1em;
	break-inside: avoid-column;
	scroll-margin-top: calc(var(--header-h) + 1rem);
}

.references li:target {
	background: rgba(136, 163, 232, 0.16);
}

.mw-cite-backlink {
	margin-right: 0.2em;
}

.mw-cite-backlink sup {
	font-size: 0.75em;
}

sup.reference {
	scroll-margin-top: calc(var(--header-h) + 1rem);
}

sup.reference:target {
	background: rgba(136, 163, 232, 0.25);
}

.wiki-article h2,
.wiki-article h3 {
	scroll-margin-top: calc(var(--header-h) + 1rem);
}
