/* Lunarico — hoja de estilos. Dirección «El nombre como monumento»: azul noche, marfil y plata.
   Mobile-first (480, 640, 1024 px). Sin estilos en línea: la CSP solo admite este archivo. */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Marca: azul noche, marfil y plata */
  --c-noche:        #13233f;   /* encabezado, portada y pie */
  --c-noche-2:      #1c3256;   /* franja informativa, hover sobre noche */
  --c-noche-3:      #24406b;   /* nombre monumental del pie (decorativo) */
  --c-marfil:       #f6f2e8;   /* fondo de página */
  --c-marfil-2:     #ebe4d2;   /* superficies: un escalón de tono */
  --c-marfil-3:     #e2d9c3;   /* superficie presionada */
  --c-papel:        #fffdf8;   /* campos y tarjetas */
  --c-linea:        #d6cdb8;   /* separadores de tabla (decorativos) */
  --c-plata:        #c7ccd4;   /* texto secundario sobre noche */
  --c-tinta:        #16181d;   /* texto */
  --c-tinta-2:      #4f5866;   /* texto secundario sobre marfil */
  --c-borde:        #6b7380;   /* borde de campos */
  --c-enlace:       #1d4c86;
  --c-enlace-hover: #13233f;
  --c-visitado:     #5b3d8a;
  --c-foco:         #1f6fd1;   /* foco sobre superficies claras */
  --c-foco-claro:   #8ab8ff;   /* foco sobre azul noche */
  --c-error:        #a50e0e;

  /* Semáforo: fondo claro + acento + texto oscuro; siempre con icono y palabra */
  --st-red-bg:    #f4e3db;  --st-red-border:    #b50909;  --st-red-text:    #5c1111;
  --st-amber-bg:  #faf3d1;  --st-amber-border:  #936f00;  --st-amber-text:  #3d2e00;
  --st-green-bg:  #e6f0e4;  --st-green-border:  #216e1f;  --st-green-text:  #19311e;
  --st-gray-bg:   #e6e6e3;  --st-gray-border:   #565c65;  --st-gray-text:   #1b1b1b;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Cinco tamaños hacen el trabajo visible */
  --step-small: .875rem;
  --step-body:  1.125rem;
  --step-lead:  clamp(1.1875rem, 1.1rem + .4vw, 1.375rem);
  --step-head:  clamp(1.625rem, 1.25rem + 1.5vw, 2.5rem);
  --step-title: clamp(2.125rem, 1.4rem + 3vw, 4rem);

  --m: clamp(1rem, 3vw, 3rem);         /* margen exterior único */
  --gap-section: clamp(4rem, 9vw, 8rem);
  --container: 90rem;
  --measure: 68ch;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--c-marfil); color: var(--c-tinta); font: 400 var(--step-body)/1.55 var(--sans);
  font-kerning: normal; text-rendering: optimizeLegibility; }
::selection { background: var(--c-noche); color: var(--c-marfil); }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; color: inherit; margin: 0 0 1rem;
  text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: var(--step-title); letter-spacing: -.02em; }
h2 { font-size: var(--step-head); letter-spacing: -.01em; margin-top: 3.5rem; }
h3 { font-size: var(--step-lead); font-weight: 600; margin-top: 2rem; margin-bottom: .5rem; }
p, li, dd { max-width: var(--measure); overflow-wrap: break-word; text-wrap: pretty; }
a { color: var(--c-enlace); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--c-enlace-hover); text-decoration-thickness: 2px; }
a:visited { color: var(--c-visitado); }
:focus-visible { outline: 3px solid var(--foco, var(--c-foco)); outline-offset: 2px; }
.notice-strip, .site-header, .hero, .site-footer { --foco: var(--c-foco-claro); }
.search-card { --foco: var(--c-foco); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--m); }
.reading { max-width: 52rem; }

/* Saltar al contenido */
.skip-link { position: absolute; left: .5rem; top: -100px; z-index: 10; background: var(--c-papel); color: var(--c-enlace);
  padding: .5rem 1rem; font-weight: 700; }
.skip-link:focus { top: .5rem; }

/* Franja informativa (no oficial) */
.notice-strip { background: var(--c-noche-2); color: var(--c-plata); font-size: var(--step-small); line-height: 1.4;
  padding: .5rem 0; }
.notice-strip p { margin: 0; max-width: none; }

/* Encabezado */
.site-header { background: var(--c-noche); color: var(--c-marfil); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .25rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; color: var(--c-marfil);
  text-decoration: none; font: 700 1.375rem/1 var(--serif); letter-spacing: -.01em; }
.brand:visited, .brand:hover { color: var(--c-marfil); }
.brand svg { width: 30px; height: 30px; flex: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.main-nav li { max-width: none; }
.main-nav a, .main-nav a:visited { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-marfil);
  font-weight: 600; text-decoration: underline 2px transparent; text-underline-offset: .35em;
  transition: text-decoration-color 160ms ease; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--c-marfil); text-decoration-color: currentColor; }

main { display: block; padding: 2.5rem 0 var(--gap-section); }
main:focus { outline: none; }
.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--c-tinta-2); max-width: 46ch; }

/* Migas */
.breadcrumb ol { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem;
  font-size: var(--step-small); color: var(--c-tinta-2); }
.breadcrumb li { max-width: none; }
.breadcrumb li + li::before { content: "›"; margin-right: .5rem; }
.breadcrumb a, .breadcrumb a:visited { color: var(--c-tinta-2); }

/* ---------- Portada (Inicio) ---------- */
.home main { padding-top: 0; }
.hero { background: var(--c-noche); color: var(--c-marfil); overflow: hidden; }
.hero__grid { display: grid; gap: 2rem; padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  align-items: end; }
.hero h1 { max-width: 13ch; }
.hero .lead { color: var(--c-plata); margin: 0; max-width: 34ch; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 32rem); gap: 4rem; } }

/* El nombre, con la Luna (mapa lunar antiguo) en lugar de la «o» */
.monument { display: block; margin: 0; padding: 0 var(--m); text-align: center; white-space: nowrap; user-select: none;
  font: 700 clamp(4.25rem, min(19vw, 27vh), 19rem)/.8 var(--serif); letter-spacing: -.045em; color: var(--c-marfil);
  margin-bottom: -.1em; max-width: none; }
.monument img { display: inline-block; width: .53em; height: .53em; vertical-align: baseline; margin: 0 0 -.012em .04em; }
.site-footer .monument { color: var(--c-noche-3); font-size: clamp(4rem, 17vw, 17rem); margin-top: 3rem; }

/* Buscador */
.search-card { background: var(--c-marfil); color: var(--c-tinta); }
.search-card .tab-panel { padding: 1.25rem; }
.search-card .form-group { margin-bottom: .9rem; }
.search-card .examples { margin-top: .75rem; }
.tabs [role="tablist"] { display: flex; }
.tabs [role="tab"], .tab-links a { flex: 1; font: 600 1.0625rem var(--sans); color: var(--c-tinta); background: var(--c-marfil-2);
  border: 0; border-top: 3px solid transparent; min-height: 48px; padding: .5rem .75rem; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; transition: background-color 160ms ease, border-color 200ms var(--ease-out); }
.tabs [role="tab"]:hover { background: var(--c-marfil-3); }
.tabs [role="tab"][aria-selected="true"] { background: var(--c-marfil); border-top-color: var(--c-noche); }
.tab-links { display: flex; }
.js .tab-links { display: none; }
.tab-panel[hidden] { display: none; }
.tab-panel.is-entering { animation: panel-in 200ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } }
.examples { font-size: var(--step-small); color: var(--c-tinta-2); margin: 1rem 0 0; }

/* Formularios */
.form-group { margin-bottom: 1.1rem; }
label, .label { display: block; font-weight: 700; margin-bottom: .15rem; }
.hint { display: block; color: var(--c-tinta-2); font-size: var(--step-small); margin-bottom: .4rem; }
input[type="text"], input[type="search"], select, input[type="file"] {
  font: inherit; font-size: 1.0625rem; color: var(--c-tinta); background: var(--c-papel); width: 100%; max-width: 40rem;
  min-height: 48px; padding: .5rem .75rem; border: 1px solid var(--c-borde); border-radius: 0;
  transition: border-color 160ms ease; }
input:hover, select:hover { border-color: var(--c-tinta); }
input[type="file"] { padding: .55rem; }
input::file-selector-button { font: 600 1rem var(--sans); margin-right: .75rem; padding: .45rem .9rem; border: 0;
  background: var(--c-marfil-2); color: var(--c-tinta); cursor: pointer; }
.filter-label { font-weight: 400; font-size: var(--step-small); color: var(--c-tinta-2); margin-bottom: .2rem; }
.country-filter { margin-bottom: .5rem; }
.country-filter-wrap[hidden] { display: none; }
.filter-status { font-size: var(--step-small); color: var(--c-tinta-2); margin: -.25rem 0 .5rem; }
.field-error input, .field-error select { border: 2px solid var(--c-error); }
.error-message { color: var(--c-error); font-weight: 700; display: block; margin-bottom: .25rem; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font: 700 1.0625rem var(--sans);
  min-height: 48px; padding: .6rem 1.75rem; background: var(--c-noche); color: var(--c-marfil); border: 0; border-radius: 0;
  cursor: pointer; text-decoration: none; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.button:hover { background: var(--c-noche-2); color: var(--c-marfil); }
.button:visited { color: var(--c-marfil); }
.button:active { transform: scale(.97); }
.button-block { width: 100%; }
.button-secondary { background: transparent; color: var(--c-noche); border: 2px solid var(--c-noche); padding: calc(.6rem - 2px) calc(1.75rem - 2px); }
.button-secondary:hover { background: var(--c-marfil-2); color: var(--c-noche); }
.button-secondary:visited { color: var(--c-noche); }
.button-on-dark { background: var(--c-marfil); color: var(--c-noche); }
.button-on-dark:hover { background: var(--c-papel); color: var(--c-noche); }
.button-on-dark:visited { color: var(--c-noche); }

/* Estado de carga del buscador (lo pone el JavaScript al enviar) */
.button .spinner { display: none; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; }
.button.is-loading { cursor: progress; }
.button.is-loading .spinner { display: inline-block; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Secciones de la portada */
.home-section { padding-top: var(--gap-section); }
.home-section > h2 { margin-top: 0; }
.section-intro { display: grid; gap: 1rem 2rem; align-items: end; margin-bottom: 2rem; }
.section-intro h2, .section-intro p { margin: 0; }
.section-intro p { color: var(--c-tinta-2); max-width: 46ch; }
@media (min-width: 1024px) { .section-intro { grid-template-columns: 1fr 1fr; } }

/* Semáforo: cuatro campos de color */
.status-icon { width: 1.4em; height: 1.4em; flex: none; vertical-align: -.3em; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
@media (min-width: 640px) { .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .legend { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } }
.legend li { max-width: none; padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; gap: .6rem; }
.legend .status-icon { width: 2.25rem; height: 2.25rem; }
.legend strong { display: block; font: 700 clamp(1.375rem, 1.2rem + .6vw, 1.625rem)/1.15 var(--serif); }
.legend span { font-size: 1rem; }
@media (min-width: 1024px) { .legend li { min-height: 15rem; } }
.st-rojo { background: var(--st-red-bg); color: var(--st-red-text); --st-accent: var(--st-red-border); }
.st-amarillo { background: var(--st-amber-bg); color: var(--st-amber-text); --st-accent: var(--st-amber-border); }
.st-verde { background: var(--st-green-bg); color: var(--st-green-text); --st-accent: var(--st-green-border); }
.st-gris { background: var(--st-gray-bg); color: var(--st-gray-text); --st-accent: var(--st-gray-border); }
[class*="st-"] .status-icon { color: var(--st-accent); }

/* Cómo funciona: líneas que avanzan en escalera */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { font: 600 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.3 var(--serif); padding: .85rem 0; max-width: 38ch; }
.steps li span { display: block; font: 400 1.0625rem/1.5 var(--sans); color: var(--c-tinta-2); margin-top: .2rem; }
@media (min-width: 640px) { .steps li:nth-child(2) { margin-left: 12%; } .steps li:nth-child(3) { margin-left: 24%; } }

/* Países en la portada: todos al mismo tamaño */
.country-line { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem 1.75rem;
  font: 600 clamp(1.375rem, 1rem + 1.4vw, 2.25rem)/1.45 var(--serif); }
.country-line li { max-width: none; }
.country-line a, .country-line a:visited { color: var(--c-noche); text-decoration: none; }
.country-line a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.country-line small { font: 400 1rem var(--sans); color: var(--c-tinta-2); margin-left: .35rem; white-space: nowrap; }

/* ---------- Resultado: la tarjeta del semáforo manda ---------- */
.verdict { margin: 0 calc(-1 * var(--m)); padding: clamp(1.5rem, 4vw, 3rem) var(--m) clamp(2rem, 4vw, 3rem); }
@media (min-width: 1024px) { .verdict { margin: 0; } }
.verdict__work { margin: 0 0 1.75rem; }
.verdict__work h1 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.375rem); font-weight: 600; margin: 0; max-width: 32ch; }
.verdict__work p { margin: .35rem 0 0; font-size: 1.0625rem; }
.verdict__status { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; font: 700 clamp(2.25rem, 1.5rem + 3.4vw, 4.5rem)/1 var(--serif);
  letter-spacing: -.02em; }
.verdict__status .status-icon { width: .9em; height: .9em; vertical-align: 0; }
.verdict__status span { min-width: 0; overflow-wrap: break-word; }
.verdict__headline { font-size: var(--step-lead); line-height: 1.45; margin: 0; max-width: 44ch; }
.verdict__side { margin-top: 1.75rem; }
.verdict__meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem 1.25rem; margin: 0; font-size: 1rem; }
.verdict__meta dt { font-weight: 400; }
.verdict__meta dd { margin: 0; font-weight: 700; }
.verdict__country { margin-top: .75rem; font-size: 1rem; }
@media (min-width: 1024px) {
  .verdict { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr); column-gap: 3rem; align-items: end; }
  .verdict__work { grid-column: 1 / -1; }
  .verdict__side { margin-top: 0; }
}
.verdict summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700;
  color: inherit; text-decoration: underline; text-underline-offset: .18em; }
.verdict details > div { margin-top: .75rem; max-width: 30rem; }
.verdict__note { font-size: var(--step-small); }
.badge-license { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; padding: .3rem .75rem;
  background: var(--c-papel); color: var(--c-noche); font-weight: 700; }

/* Aparición del resultado (sutil, < 300 ms, sin escala desde 0) */
.reveal { animation: rise 280ms var(--ease-out) both; }
.reveal-2 { animation-delay: 60ms; }
.reveal-3 { animation-delay: 120ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.result-body { max-width: 56rem; }
.result-body > h2:first-child { margin-top: 3rem; }

.badge-status { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem .15rem .45rem;
  font-weight: 700; white-space: nowrap; }

/* Tablas (se apilan en móvil) */
.table-wrap { width: 100%; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 1rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; padding-bottom: .5rem; color: var(--c-tinta-2); font-size: var(--step-small); }
th, td { text-align: left; vertical-align: top; padding: .8rem .75rem; border-bottom: 1px solid var(--c-linea); }
th[scope="row"] { font-weight: 600; }
thead th { background: var(--c-marfil-2); border-bottom: 0; font-size: var(--step-small); }
tbody tr { transition: background-color 160ms ease; }
@media (hover: hover) { tbody tr:hover { background: var(--c-papel); } }
@media (max-width: 639px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: block; background: var(--c-papel); margin-bottom: .5rem; padding: .75rem; }
  table.stack th, table.stack td { display: block; border: 0; padding: .2rem 0; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; }
  table.stack td[data-label] .badge-status { vertical-align: middle; }
}

/* Alertas: superficie de tono, sin barra lateral */
.alert { padding: 1.1rem 1.25rem; margin: 1.5rem 0; display: flex; gap: .75rem; align-items: flex-start; }
.alert > svg { width: 1.5rem; height: 1.5rem; flex: none; margin-top: .1rem; }
.alert p, .alert ul { margin: 0 0 .5rem; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-info { background: var(--c-marfil-2); color: var(--c-tinta); }
.alert-info > svg { color: var(--c-noche); }
.alert-warning { background: var(--c-marfil-2); color: var(--c-tinta); border: 2px solid var(--c-tinta-2); }
.alert-warning > svg { color: var(--c-tinta); }
.alert-error { background: var(--st-red-bg); color: var(--st-red-text); }
.alert-error > svg { color: var(--st-red-border); }
.alert-error a, .alert-error a:visited { color: var(--st-red-text); }
.alert-legal { background: var(--c-marfil-2); color: var(--c-tinta); font-size: 1rem; }
.alert-legal > svg { color: var(--c-tinta-2); }
.alert:focus { outline: 3px solid var(--c-foco); outline-offset: 2px; }

/* Acordeón */
details.accordion { margin: 1.5rem 0; background: var(--c-marfil-2); }
details.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer;
  font-weight: 700; padding: .75rem 1.1rem; min-height: 48px; list-style: none; }
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after { content: ""; flex: none; width: .55rem; height: .55rem; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: translateY(-25%) rotate(45deg); transition: transform 200ms var(--ease-out); }
details.accordion[open] summary::after { transform: translateY(15%) rotate(-135deg); }
details.accordion > div { padding: .25rem 1.1rem 1.1rem; }
details[open] > div { animation: rise 220ms var(--ease-out); }

/* Listas */
.candidate-list { list-style: none; padding: 0; margin: 0; }
.candidate-list li { max-width: none; }
.candidate-list a { display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .9rem 1rem; margin: 0 -1rem; text-decoration: none; min-height: 48px;
  color: var(--c-tinta); transition: background-color 160ms ease; }
.candidate-list a:visited { color: var(--c-tinta); }
.candidate-list a:hover { background: var(--c-marfil-2); }
.candidate-list a:active { background: var(--c-marfil-3); }
.candidate-list .title { font: 600 1.25rem/1.3 var(--serif); color: var(--c-enlace); overflow-wrap: break-word; }
.candidate-list a:visited .title { color: var(--c-visitado); }
.candidate-list .sub { color: var(--c-tinta-2); font-size: 1rem; overflow-wrap: break-word; }
.result-count { color: var(--c-tinta-2); }
.search-inline { display: grid; gap: .75rem; margin: 0 0 2rem; max-width: 46rem; }
.search-inline .form-group { margin: 0; }
@media (min-width: 640px) { .search-inline { grid-template-columns: 1fr auto; align-items: end; } }

/* Filas de dos extremos (países con regla verificada) */
.rows { list-style: none; margin: 0; padding: 0; max-width: 40rem; font-variant-numeric: tabular-nums; }
.rows li { max-width: none; }
.rows a, .rows a:visited { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .7rem 0;
  min-height: 48px; color: var(--c-tinta); text-decoration: none; }
.rows .name { font: 600 1.25rem var(--serif); color: var(--c-enlace); }
.rows a:hover .name { text-decoration: underline; }
.rows .term { color: var(--c-tinta-2); font-size: 1rem; text-align: right; }
.columns { columns: 1; column-gap: 2rem; padding-left: 0; list-style: none; }
@media (min-width: 640px) { .columns { columns: 2; } }
@media (min-width: 1024px) { .columns { columns: 3; } }
.columns li { break-inside: avoid; padding: .2rem 0; }

dl.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 1.5rem 0; }
@media (min-width: 640px) { dl.facts { grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr); } }
dl.facts dt { font-weight: 700; padding-top: .8rem; padding-right: 2rem; }
dl.facts dd { margin: 0; padding: .1rem 0 1rem; max-width: 62ch; }
@media (min-width: 640px) { dl.facts dt, dl.facts dd { padding-top: .6rem; padding-bottom: .6rem; } dl.facts > :nth-child(4n+1), dl.facts > :nth-child(4n+2) { background: var(--c-marfil-2); } dl.facts dt { padding-left: .75rem; } dl.facts dd { padding-right: .75rem; } }

/* Páginas de texto y legales: sobrias */
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.375rem, 1.15rem + .9vw, 1.875rem); margin-top: 2.75rem; }
.prose .lead { max-width: 52ch; }
@media (min-width: 1024px) { .prose .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } .prose .legend li { min-height: 0; } }

/* Error 404/500 */
.error-page { display: grid; gap: 2rem; align-items: center; padding-top: 1rem; }
.error-page img { width: clamp(7rem, 22vw, 14rem); height: auto; }
@media (min-width: 640px) { .error-page { grid-template-columns: auto minmax(0, 1fr); gap: 3rem; } }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }

/* Pie */
.site-footer { background: var(--c-noche); color: var(--c-plata); padding: 3rem 0 0; font-size: 1rem; overflow: hidden; }
.site-footer a, .site-footer a:visited { color: var(--c-marfil); }
.site-footer .cols { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.site-footer h2 { color: var(--c-marfil); font: 700 1rem var(--sans); letter-spacing: 0; margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-h2-gap { margin-top: 1.25rem; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .legal { margin-top: 2.5rem; font-size: var(--step-small); }
.site-footer .legal p { margin: 0 0 .5rem; max-width: 72ch; }

/* Movimiento reducido: menos y más suave, no cero. Se quitan desplazamientos y giros; quedan los fundidos. */
@media (prefers-reduced-motion: reduce) {
  @keyframes rise { from { opacity: 0; } }
  @keyframes panel-in { from { opacity: 0; } }
  .reveal-2, .reveal-3 { animation-delay: 0ms; }
  .button:active { transform: none; }
  details.accordion summary::after { transition: none; }
  .button.is-loading .spinner { animation: none; border-right-color: currentColor; opacity: .6; }
}
@media print {
  .site-header nav, .notice-strip, .site-footer, .skip-link, .monument, .actions, details.accordion summary::after { display: none; }
  body { background: var(--c-papel); }
  .hero, .verdict { background: none !important; color: var(--c-tinta); }
  .reveal, .tab-panel { animation: none !important; }
}

/* Ajustes tras la prueba de estrés */
.verdict__work--long h1 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.75rem); max-width: 48ch; }
@media (max-width: 479px) {
  .main-nav ul { gap: 0 .8rem; }
  .main-nav a { font-size: .9375rem; }
}
/* Enlaces sueltos pequeños: al menos 24 px de alto para tocarlos con el dedo (WCAG 2.5.8) */
.breadcrumb a, .examples a, .site-footer .legal a { display: inline-block; padding: .2rem 0; }

/* Ajustes tras la crítica «después» */
.country-filter-wrap { margin-top: .6rem; }
.field-error .country-filter { border: 1px solid var(--c-borde); }
.result-body h2 { font-size: clamp(1.375rem, 1.15rem + .9vw, 1.875rem); }
.home .site-footer .monument { display: none; }
.search-card input, .search-card select { max-width: none; }
