/*
 * Reset y tipografía base. Deriva íntegramente de 05A §2 (Global Fonts) —
 * ningún tamaño, peso o line-height se ha inventado aquí.
 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ce-surface-canvas);
	color: var(--ce-text-primary);
	font-family: var(--ce-font-brand);
	font-size: 1rem;
	line-height: 1.55;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
	font-family: var(--ce-font-brand);
	font-weight: 700;
	color: var(--ce-text-primary);
	margin: 0;
}

h1 { font-size: 2rem; line-height: 1.12; letter-spacing: -0.015em; }
h2 { font-size: 1.75rem; line-height: 1.18; letter-spacing: -0.01em; }
h3 { font-size: 1.375rem; line-height: 1.25; font-weight: 600; }
h4 { font-size: 1rem; line-height: 1.55; font-weight: 700; }

@media (min-width: 768px) {
	h1 { font-size: 2.4rem; }
	h2 { font-size: 2rem; }
}
@media (min-width: 1025px) {
	h1 { font-size: 2.75rem; }
	h2 { font-size: 2.25rem; }
}

p { margin: 0 0 var(--ce-space-3); color: var(--ce-text-secondary); }
p:last-child { margin-bottom: 0; }

a { color: var(--ce-text-link); }

ul, ol { margin: 0; padding-left: 1.2em; color: var(--ce-text-secondary); }
li { margin-bottom: var(--ce-space-2); }
li:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--ce-text-primary); }
em { font-style: italic; }

blockquote {
	margin: var(--ce-space-6) 0;
	padding-left: var(--ce-space-4);
	border-left: 2px solid var(--ce-border-focus);
	font-family: var(--ce-font-brand);
	font-size: 1.125rem;
	font-style: italic;
	color: var(--ce-text-secondary);
}

figure { margin: var(--ce-space-6) 0; }
figcaption {
	font-family: var(--ce-font-ui);
	font-size: 0.75rem;
	color: var(--ce-text-secondary);
	text-align: center;
	margin-top: var(--ce-space-2);
}

hr {
	border: none;
	border-top: 1px solid var(--ce-border-default);
	margin: var(--ce-space-8) 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--ce-font-ui);
	font-size: 0.875rem;
}
th, td {
	text-align: left;
	padding: var(--ce-space-3);
	border-bottom: 1px solid var(--ce-border-default);
}
th {
	font-family: var(--ce-font-ui);
	font-weight: 500;
	color: var(--ce-text-primary);
}
.ce-table-scroll { overflow-x: auto; }

/* Enlaces de cuerpo editorial: subrayado permanente, nunca solo color */
.ce-prose a {
	color: var(--ce-text-link);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Foco visible consistente en todo elemento interactivo (05C §11) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--ce-border-focus);
	outline-offset: 2px;
}

/* Reduced motion consistente (05C §11) */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Skip link (accesibilidad — navegación por teclado) */
.ce-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ce-brand-green);
	color: var(--ce-neutral-white);
	padding: var(--ce-space-3) var(--ce-space-4);
	z-index: 100;
	font-family: var(--ce-font-ui);
	font-weight: 600;
	text-decoration: none;
}
.ce-skip-link:focus {
	left: var(--ce-space-4);
	top: var(--ce-space-4);
}

.ce-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}
